Scalable and flexible JWT based authentication #103110
Replies: 2 comments
-
|
Thanks for filing this @alex-berger. We'll discuss it internally and then get back to you. |
Beta Was this translation helpful? Give feedback.
-
|
This is a great proposal for scaling authentication! A few thoughts: On the issuer management design: The table-based approach for managing issuers is solid. One suggestion - add a CREATE TABLE system.jwt_issuers (
issuer STRING PRIMARY KEY,
jwks_url STRING,
valid_from TIMESTAMP,
audience STRING[]
)On identity mapping: The {
"map": [
{"claim": "sub", "prefix": "user:", "priority": 1},
{"claim": "email", "extract": "^(.+)@company.com$", "priority": 2}
]
}Security consideration: For Question: How does this interact with existing Nice additions:
Excited to see this move forward - JWT at scale is a common pain point! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.2CockroachDB 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.enabledserver.jwt_authentication.jwksserver.jwt_authentication.issuersserver.jwt_authentication.audienceserver.identity_map.configurationProposal
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_ISSUERresource 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_discoveryidentity_mapserver.identity_map.configurationbut without the issuer prefix.audiencejwksListing Issuers
ISSUEROIDC_DISCOVERYIDENTITY_MAPserver.identity_map.configurationbut without the issuer prefix.AUDIENCEJWKSDroping 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