@@ -4,10 +4,15 @@ Jumpstarter uses internally issued JWT tokens to authenticate clients and
44exporters by default. You can also configure Jumpstarter to use external OpenID
55Connect (OIDC) providers.
66
7+ When installing with the operator, authentication is configured directly on the
8+ ` Jumpstarter ` custom resource, under ` spec.authentication ` .
9+
10+ For operator installation context, see
11+ [ Install with Operator] ( ../installation/service/service-operator.md ) .
12+
713To use OIDC with your Jumpstarter installation:
814
9- 1 . Set the helm value ` jumpstarter-controller.authenticationConfiguration ` to a
10- valid ` AuthenticationConfiguration ` yaml configuration
15+ 1 . Set ` spec.authentication.jwt ` on your ` Jumpstarter ` resource
11162 . Configure your OIDC provider to work with Jumpstarter
12173 . Create users with appropriate OIDC usernames
1318
@@ -22,22 +27,21 @@ Set up Keycloak for Jumpstarter authentication:
2227 - ` Valid redirect URIs ` : ` http://localhost/callback `
2328 - Leave remaining fields as default
2429
25- 2 . Use this configuration for
26- ` jumpstarter-controller.authenticationConfiguration ` during installation:
30+ 2 . Configure ` spec.authentication.jwt ` on your ` Jumpstarter ` resource:
2731
2832``` yaml
29- apiVersion : jumpstarter.dev/v1alpha1
30- kind : AuthenticationConfiguration
31- jwt :
32- - issuer :
33- url : https://<keycloak domain>/realms/<realm name>
34- certificateAuthority : <PEM encoded CA certificates>
35- audiences :
36- - jumpstarter-cli
37- claimMappings :
38- username :
39- claim : preferred_username
40- prefix : " keycloak:"
33+ spec :
34+ authentication :
35+ jwt :
36+ - issuer :
37+ url : https://<keycloak domain>/realms/<realm name>
38+ certificateAuthority : <PEM encoded CA certificates>
39+ audiences :
40+ - jumpstarter-cli
41+ claimMappings :
42+ username :
43+ claim : preferred_username
44+ prefix : " keycloak:"
4145` ` `
4246
4347Note, the HTTPS URL is mandatory, and you only need to include
@@ -172,20 +176,20 @@ $ helm install --namespace dex --wait -f values.yaml dex dex/dex
172176 `jumpstarter-controller.authenticationConfiguration` during installation :
173177
174178` ` ` yaml
175- apiVersion: jumpstarter.dev/v1alpha1
176- kind: AuthenticationConfiguration
177- jwt:
178- - issuer:
179- url: https://dex.dex.svc.cluster.local:5556
180- audiences:
181- - jumpstarter-cli
182- audienceMatchPolicy: MatchAny
183- certificateAuthority: |
184- <content of pki/ca.crt>
185- claimMappings:
186- username:
187- claim: "name"
188- prefix: "dex:"
179+ spec:
180+ authentication:
181+ jwt:
182+ - issuer:
183+ url: https://dex.dex.svc.cluster.local:5556
184+ audiences:
185+ - jumpstarter-cli
186+ audienceMatchPolicy: MatchAny
187+ certificateAuthority: |
188+ <content of pki/ca.crt>
189+ claimMappings:
190+ username:
191+ claim: "name"
192+ prefix: "dex:"
189193` ` `
190194
1911954. Create clients and exporters with appropriate OIDC usernames. Prefix the full
@@ -225,9 +229,8 @@ $ jmp login --exporter <exporter alias> \
225229
226230# # Reference
227231
228- The reference section provides a complete example of an
229- ` AuthenticationConfiguration` resource with detailed comments. Use this as a
230- template for creating your own configuration.
232+ The reference section provides a complete example of `spec.authentication.jwt`
233+ with detailed comments. Use this as a template for your `Jumpstarter` resource.
231234
232235Key components include :
233236
@@ -237,62 +240,62 @@ Key components include:
237240- User validation rules
238241
239242` ` ` yaml
240- apiVersion: jumpstarter.dev/v1alpha1
241- kind: AuthenticationConfiguration
242- # JWT authenticators for OIDC-issued tokens
243- jwt:
244- - issuer:
245- # URL of the OIDC provider (must use https://)
246- url: https://example.com
247- # Optional: override URL for discovery information
248- discoveryURL: https://discovery.example.com/.well-known/openid-configuration
249- # Optional: PEM encoded CA certificates for validation
250- certificateAuthority: <PEM encoded CA certificates>
251- # List of acceptable token audiences
252- audiences:
253- - my-app
254- - my-other-app
255- # Required when multiple audiences are specified
256- audienceMatchPolicy: MatchAny
257- # rules applied to validate token claims to authenticate users.
258- claimValidationRules:
259- # Validate specific claim values
260- - claim: hd
261- requiredValue: example.com
262- # Alternative: use CEL expressions for complex validation
263- - expression: 'claims.hd == "example.com"'
264- message: the hd claim must be set to example.com
265- - expression: 'claims.exp - claims.nbf <= 86400'
266- message: total token lifetime must not exceed 24 hours
267- # Map OIDC claims to Jumpstarter user properties
268- claimMappings:
269- # Required: configure username mapping
270- username:
271- # JWT claim to use as username
272- claim: "sub"
273- # Prefix for username (required when claim is set)
274- prefix: ""
275- # Alternative: use CEL expression (mutually exclusive with claim+prefix)
276- # expression: 'claims.username + ":external-user"'
277- # Optional: configure groups mapping
278- groups:
279- claim: "sub"
280- prefix: ""
281- # Alternative: use CEL expression
282- # expression: 'claims.roles.split(",")'
283- # Optional: configure UID mapping
284- uid:
285- claim: 'sub'
286- # Alternative: use CEL expression
287- # expression: 'claims.sub'
288- # Optional: add extra attributes to UserInfo
289- extra:
290- - key: 'example.com/tenant'
291- valueExpression: 'claims.tenant'
292- # validation rules applied to the final user object.
293- userValidationRules:
294- - expression: "!user.username.startsWith('system:')"
295- message: 'username cannot used reserved system: prefix'
296- - expression: "user.groups.all(group, !group.startsWith('system:'))"
297- message: 'groups cannot used reserved system: prefix'
243+ spec:
244+ authentication:
245+ # JWT authenticators for OIDC-issued tokens
246+ jwt:
247+ - issuer:
248+ # URL of the OIDC provider (must use https://)
249+ url: https://example.com
250+ # Optional: override URL for discovery information
251+ discoveryURL: https://discovery.example.com/.well-known/openid-configuration
252+ # Optional: PEM encoded CA certificates for validation
253+ certificateAuthority: <PEM encoded CA certificates>
254+ # List of acceptable token audiences
255+ audiences:
256+ - my-app
257+ - my-other-app
258+ # Required when multiple audiences are specified
259+ audienceMatchPolicy: MatchAny
260+ # rules applied to validate token claims to authenticate users.
261+ claimValidationRules:
262+ # Validate specific claim values
263+ - claim: hd
264+ requiredValue: example.com
265+ # Alternative: use CEL expressions for complex validation
266+ - expression: 'claims.hd == "example.com"'
267+ message: the hd claim must be set to example.com
268+ - expression: 'claims.exp - claims.nbf <= 86400'
269+ message: total token lifetime must not exceed 24 hours
270+ # Map OIDC claims to Jumpstarter user properties
271+ claimMappings:
272+ # Required: configure username mapping
273+ username:
274+ # JWT claim to use as username
275+ claim: "sub"
276+ # Prefix for username (required when claim is set)
277+ prefix: ""
278+ # Alternative: use CEL expression (mutually exclusive with claim+prefix)
279+ # expression: 'claims.username + ":external-user"'
280+ # Optional: configure groups mapping
281+ groups:
282+ claim: "sub"
283+ prefix: ""
284+ # Alternative: use CEL expression
285+ # expression: 'claims.roles.split(",")'
286+ # Optional: configure UID mapping
287+ uid:
288+ claim: 'sub'
289+ # Alternative: use CEL expression
290+ # expression: 'claims.sub'
291+ # Optional: add extra attributes to UserInfo
292+ extra:
293+ - key: 'example.com/tenant'
294+ valueExpression: 'claims.tenant'
295+ # validation rules applied to the final user object.
296+ userValidationRules:
297+ - expression: "!user.username.startsWith('system:')"
298+ message: 'username cannot use reserved system: prefix'
299+ - expression: "user.groups.all(group, !group.startsWith('system:'))"
300+ message: 'groups cannot use reserved system: prefix'
298301` ` `
0 commit comments