Skip to content

feat/k8s-authn - #1

Merged
RaveNoX merged 24 commits into
deckhousefrom
feat/k8s-authn
Nov 10, 2025
Merged

RaveNoX merged 24 commits into
deckhousefrom
feat/k8s-authn

Conversation

@chupakobra6

@chupakobra6 chupakobra6 commented Oct 16, 2025 •

Copy link
Copy Markdown

Description

Adds a new "Kubernetes" authentication provider. Users can now docker login with a Kubernetes bearer token as their password, which is validated against the Kubernetes API server via a TokenReview.
User groups from the token can be exposed as labels, enabling ACL matching based on Kubernetes group membership.

Why do we need it, and what problem does it solve?

This change enables native Kubernetes authentication for the Docker registry, removing the need for static passwords or separate SSO credentials. CI/CD pipelines and users can authenticate using their existing ServiceAccount tokens or kubeconfig.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: docker-auth
type: feat
summary: Add Kubernetes authenticator to allow `docker login` using Kubernetes bearer tokens via the TokenReview API.
impact_level: default

@chupakobra6
chupakobra6 requested a review from RaveNoX October 16, 2025 08:35
@chupakobra6 chupakobra6 self-assigned this Oct 16, 2025
@chupakobra6 chupakobra6 added the enhancement New feature or request label Oct 16, 2025
@chupakobra6
chupakobra6 marked this pull request as draft October 16, 2025 08:35
@chupakobra6
chupakobra6 marked this pull request as ready for review October 20, 2025 05:18
@chupakobra6 chupakobra6 changed the title Feat/k8s authn feat/k8s-authn Oct 20, 2025
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread examples/reference.yml Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
chupakobra6 and others added 3 commits November 5, 2025 14:43
* Add Kubernetes authorization support with SubjectAccessReview

Signed-off-by: chupakobra6 <[email protected]>

* Refactor KubernetesAuthzConfig struct

Signed-off-by: chupakobra6 <[email protected]>

* Handle empty name for create verb in SubjectAccessReview authorization

Signed-off-by: chupakobra6 <[email protected]>

* Refactor KubernetesAuthzConfig by removing the 'namespaced' field

Signed-off-by: chupakobra6 <[email protected]>

* Refactor KubernetesAuthzConfig by removing the namespace struct

Signed-off-by: chupakobra6 <[email protected]>

* Add user_label field to KubernetesAuthzConfig

Signed-off-by: chupakobra6 <[email protected]>

* Add rate limit configuration to KubernetesAuthzConfig

Signed-off-by: chupakobra6 <[email protected]>

* Refactor rate limiting logic in Kubernetes authorization to ensure effective defaults for RPS and Burst parameters

Signed-off-by: chupakobra6 <[email protected]>

* Implement account validation in Kubernetes authorization to restrict access to "token" only

Signed-off-by: chupakobra6 <[email protected]>

* Refactor Kubernetes authorization to remove rate limiter

Signed-off-by: chupakobra6 <[email protected]>

* Add documentation for Kubernetes authorization rate limiting

Signed-off-by: chupakobra6 <[email protected]>

* Update Kubernetes authorization

Signed-off-by: chupakobra6 <[email protected]>

---------

Signed-off-by: chupakobra6 <[email protected]>
Signed-off-by: Artur Kraev <[email protected]>
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
Comment thread auth_server/authn/kubernetes_auth.go Resolved
…ettings with token review structure

Signed-off-by: chupakobra6 <[email protected]>
chupakobra6 and others added 5 commits November 10, 2025 13:17
…ng and caching settings under a single 'limits' structure

Signed-off-by: chupakobra6 <[email protected]>
…try backoff instead of a custom backoff configuration

Signed-off-by: chupakobra6 <[email protected]>
Signed-off-by: Artur Kraev <[email protected]>
Signed-off-by: Artur Kraev <[email protected]>
@RaveNoX
RaveNoX merged commit 21c5578 into deckhouse Nov 10, 2025
@RaveNoX
RaveNoX deleted the feat/k8s-authn branch November 24, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants