Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/github.com/go-ldap/l…
Browse files Browse the repository at this point in the history
…dap/v3-3.4.8
  • Loading branch information
vbouchaud authored Nov 28, 2024
2 parents 957e6c3 + 68957e4 commit 81d81de
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 35 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/pr-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@ on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'hopopops/k8s-ldap-auth'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
github.vianney@bouchaud.org.
vianney@hopopops.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ APPNAME := k8s-ldap-auth
BIN ?= $(APPNAME)

ORG ?= registry.aegir.bouchaud.org
PKG := vbouchaud/$(APPNAME)
PKG := hopopops/$(APPNAME)
PLATFORM ?= "linux/arm/v7,linux/arm64/v8,linux/amd64"
GO ?= go
SED ?= sed
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# k8s-ldap-auth

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/vbouchaud/k8s-ldap-auth?style=for-the-badge)](https://github.com/vbouchaud/k8s-ldap-auth/releases/latest)
[![License](https://img.shields.io/github/license/vbouchaud/k8s-ldap-auth?style=for-the-badge)](https://opensource.org/licenses/MPL-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/vbouchaud/k8s-ldap-auth?style=for-the-badge)](https://goreportcard.com/report/github.com/vbouchaud/k8s-ldap-auth)
[![Artifact Hub](https://img.shields.io/endpoint?style=for-the-badge&url=https://artifacthub.io/badge/repository/vbouchaud)](https://artifacthub.io/packages/search?repo=vbouchaud)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hopopops/k8s-ldap-auth?style=for-the-badge)](https://github.com/hopopops/k8s-ldap-auth/releases/latest)
[![License](https://img.shields.io/github/license/hopopops/k8s-ldap-auth?style=for-the-badge)](https://opensource.org/licenses/MPL-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/hopopops/k8s-ldap-auth?style=for-the-badge)](https://goreportcard.com/report/github.com/hopopops/k8s-ldap-auth)
[![Artifact Hub](https://img.shields.io/endpoint?style=for-the-badge&url=https://artifacthub.io/badge/repository/hopopops)](https://artifacthub.io/packages/search?repo=hopopops)

A webhook token authentication plugin implementation backed by LDAP.

Expand Down Expand Up @@ -217,7 +217,7 @@ users:

installHint: |
k8s-ldap-auth is required to authenticate to the current context.
It can be installed from https://github.com/vbouchaud/k8s-ldap-auth.
It can be installed from https://github.com/hopopops/k8s-ldap-auth.
# This parameter, when true, tells `kubectl` to fill the TokenReview in
# the `$KUBERNETES_EXEC_INFO` environment variable with extra config
Expand Down Expand Up @@ -331,7 +331,7 @@ PLATFORM="linux/arm/v7,linux/amd64" make docker

## Distribution
### Docker
Docker images of this project are available for arm/v7, arm64/v8 and amd64 at [vbouchaud/k8s-ldap-auth](https://hub.docker.com/r/vbouchaud/k8s-ldap-auth) on docker hub and on quay.io at [vbouchaud/k8s-ldap-auth](https://quay.io/vbouchaud/k8s-ldap-auth).
Docker images of this project are available for arm/v7, arm64/v8 and amd64 at [hopopops/k8s-ldap-auth](https://hub.docker.com/r/hopopops/k8s-ldap-auth) on docker hub and on quay.io at [hopopops/k8s-ldap-auth](https://quay.io/hopopops/k8s-ldap-auth).

### Binary
Binaries for the following OS and architectures are available on the release page:
Expand All @@ -352,15 +352,15 @@ Binaries for the following OS and architectures are available on the release pag

### Darwin
#### With `brew`
`k8s-ldap-auth.rb` is not in the official repository, you can install it from [my repository](https://github.com/vbouchaud/homebrew-tap) with the following commands:
`k8s-ldap-auth.rb` is not in the official repository, you can install it from [my repository](https://github.com/hopopops/homebrew-tap) with the following commands:

`brew install vbouchaud/tap/k8s-ldap-auth`
`brew install hopopops/tap/k8s-ldap-auth`

Or `brew tap vbouchaud/tap` and then `brew install k8s-ldap-auth`.
Or `brew tap hopopops/tap` and then `brew install k8s-ldap-auth`.

### Kubernetes
#### Helm Chart
A Chart is hosted at [vbouchaud/chartrepo](https://vbouchaud.github.io/chartrepo/). Please see [its readme](https://github.com/vbouchaud/chartrepo/blob/main/charts/k8s-ldap-auth/README.md) for more information on how to install it.
A Chart is hosted at [hopopops/chartrepo](https://hopopops.github.io/chartrepo/). Please see [its readme](https://github.com/hopopops/chartrepo/blob/main/charts/k8s-ldap-auth/README.md) for more information on how to install it.

## Inspiration
I originally started this project after reading Daniel Weibel's article "Implementing LDAP authentication for Kubernetes" (https://learnk8s.io/kubernetes-custom-authentication or https://itnext.io/implementing-ldap-authentication-for-kubernetes-732178ec2155).
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/rs/zerolog/log"

"vbouchaud/k8s-ldap-auth/types"
"k8s-ldap-auth/types"
)

func Auth(addr, user, pass string) error {
Expand Down
2 changes: 1 addition & 1 deletion client/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/zalando/go-keyring"
"golang.org/x/term"

"vbouchaud/k8s-ldap-auth/types"
"k8s-ldap-auth/types"
)

func readData(readLine func(screen io.ReadWriter) (string, error)) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/adrg/xdg"
"github.com/urfave/cli/v2"

"vbouchaud/k8s-ldap-auth/client"
"k8s-ldap-auth/client"
)

func getAuthenticationCmd() *cli.Command {
Expand Down
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/urfave/cli/v2"

"vbouchaud/k8s-ldap-auth/version"
"k8s-ldap-auth/version"
)

type action func(*cli.Context) error
Expand All @@ -27,7 +27,7 @@ func Start() error {
app.Authors = []*cli.Author{
{
Name: "Vianney Bouchaud",
Email: "vianney@bouchaud.org",
Email: "vianney@hopopops.org",
},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/urfave/cli/v2"

"vbouchaud/k8s-ldap-auth/client"
"k8s-ldap-auth/client"
)

func getResetCmd() *cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/urfave/cli/v2"

"vbouchaud/k8s-ldap-auth/server"
"k8s-ldap-auth/server"
)

func getServerCmd() *cli.Command {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module vbouchaud/k8s-ldap-auth
module k8s-ldap-auth

go 1.22.0

Expand All @@ -14,7 +14,7 @@ require (
github.com/rs/zerolog v1.32.0
github.com/urfave/cli/v2 v2.27.1
github.com/zalando/go-keyring v0.2.3
golang.org/x/term v0.18.0
golang.org/x/term v0.20.0
k8s.io/api v0.30.0
k8s.io/apimachinery v0.30.0
k8s.io/client-go v0.30.0
Expand Down Expand Up @@ -47,7 +47,7 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,17 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"vbouchaud/k8s-ldap-auth/cmd"
"k8s-ldap-auth/cmd"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/gorilla/mux"
"github.com/rs/zerolog/log"

"vbouchaud/k8s-ldap-auth/ldap"
"vbouchaud/k8s-ldap-auth/server/middlewares"
"vbouchaud/k8s-ldap-auth/types"
"k8s-ldap-auth/ldap"
"k8s-ldap-auth/server/middlewares"
"k8s-ldap-auth/types"
)

// Option function for configuring a server instance
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
machinery "k8s.io/apimachinery/pkg/apis/meta/v1"
client "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1"

"vbouchaud/k8s-ldap-auth/ldap"
"vbouchaud/k8s-ldap-auth/types"
"k8s-ldap-auth/ldap"
"k8s-ldap-auth/types"
)

const ContentTypeHeader = "Content-Type"
Expand Down

0 comments on commit 81d81de

Please sign in to comment.