diff --git a/.github/workflows/pr-dependabot.yml b/.github/workflows/pr-dependabot.yml index 354f827..f0c7f03 100644 --- a/.github/workflows/pr-dependabot.yml +++ b/.github/workflows/pr-dependabot.yml @@ -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: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 56de08e..08c1729 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/Makefile b/Makefile index c097ded..f6b96ce 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 942b828..7a73eef 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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: @@ -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). diff --git a/client/client.go b/client/client.go index 18c2dc4..5f4272d 100644 --- a/client/client.go +++ b/client/client.go @@ -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 { diff --git a/client/interactive.go b/client/interactive.go index 7c4aaa1..ab217a2 100644 --- a/client/interactive.go +++ b/client/interactive.go @@ -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) { diff --git a/cmd/authentication.go b/cmd/authentication.go index 97890b0..688c5bd 100644 --- a/cmd/authentication.go +++ b/cmd/authentication.go @@ -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 { diff --git a/cmd/main.go b/cmd/main.go index d6bbf9d..2ac8fa2 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -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 @@ -27,7 +27,7 @@ func Start() error { app.Authors = []*cli.Author{ { Name: "Vianney Bouchaud", - Email: "vianney@bouchaud.org", + Email: "vianney@hopopops.org", }, } diff --git a/cmd/reset.go b/cmd/reset.go index c7592b5..70f4ef4 100644 --- a/cmd/reset.go +++ b/cmd/reset.go @@ -5,7 +5,7 @@ import ( "github.com/urfave/cli/v2" - "vbouchaud/k8s-ldap-auth/client" + "k8s-ldap-auth/client" ) func getResetCmd() *cli.Command { diff --git a/cmd/server.go b/cmd/server.go index 2616a42..0cbd1d6 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -5,7 +5,7 @@ import ( "github.com/urfave/cli/v2" - "vbouchaud/k8s-ldap-auth/server" + "k8s-ldap-auth/server" ) func getServerCmd() *cli.Command { diff --git a/go.mod b/go.mod index ba91aed..381a5d8 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module vbouchaud/k8s-ldap-auth +module k8s-ldap-auth go 1.22.0 @@ -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 @@ -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 diff --git a/go.sum b/go.sum index 306d17e..2ff8ca2 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index 1e6e7a8..b2862e9 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "vbouchaud/k8s-ldap-auth/cmd" + "k8s-ldap-auth/cmd" ) func main() { diff --git a/server/options.go b/server/options.go index fb6f139..1127c17 100644 --- a/server/options.go +++ b/server/options.go @@ -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 diff --git a/server/server.go b/server/server.go index 59d9c95..2fff6c1 100644 --- a/server/server.go +++ b/server/server.go @@ -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"