Scalable and flexible JWT based authentication #103110
alex-berger
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for filing this @alex-berger. We'll discuss it internally and then get back to you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Scalable and flexible JWT based authentication
Motivation / Goals
We intend to leverage CockroachDB's
Cluster Single Sign-on (SSO) using a JSON web token (JWT) capability to enable secure database access for Kubernetes workloads (Pods) without the need to explicitly have to maintain (create, rotate, delete) authentication credentials. We can achieve this by using ServiceAccount token volume projection to provision such workloads with JWT tokens suitable for authentication with CockroachDB.
Problem Statement
Starting with
v22.2
CockroachDB added support for OpenID Connect (OIDC) compatible JWT based authentication as documented in Cluster Single Sign-on (SSO) using a JSON web token (JWT). However, the current implementation based on the below outlined cluster settings has several drawbacks and limitations.server.jwt_authentication.enabled
server.jwt_authentication.jwks
server.jwt_authentication.issuers
server.jwt_authentication.audience
server.identity_map.configuration
Proposal
We propose to extend CockroachDB with more powerfull support to configure and manage Identity Providers (IdP), which support JWT resp. which are OpenID Connect compatible.
Managing Issuers
Creating Issuers
We propose to introduce an explicit
JWT_ISSUER
resource type, which supportsCREATE OR REPLACE ...
semantics to enable atomic creation and update of a JWT issuer configuration. The issuer name must be unique and must support at least 1024 characters.oidc_discovery
identity_map
server.identity_map.configuration
but without the issuer prefix.audience
jwks
Listing Issuers
ISSUER
OIDC_DISCOVERY
IDENTITY_MAP
server.identity_map.configuration
but without the issuer prefix.AUDIENCE
JWKS
Droping Issuers
Dropping an issuer, will also cascadingly drop all related JWKs, audience and identity mapping configuration.
DROP JWT_ISSUER [IF EXISTS] "https://example.com/my/issuer";
Related Issues and Pull Request
Beta Was this translation helpful? Give feedback.
All reactions