You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If multiple mappings have the same key, the result will be a concatenation of all values
481
-
// with the order preserved.
482
480
// If the value is empty, the extra mapping will not be present.
483
481
//
484
482
// possible future way to pull multiple extra values out via expression.
@@ -493,6 +491,12 @@ type JWTAuthenticator struct {
493
491
494
492
type ExtraMapping struct {
495
493
// key is a string to use as the extra attribute key.
494
+
// key must be a domain-prefix path (e.g. example.org/foo). All characters before the first "/" must be a valid
495
+
// subdomain as defined by RFC 1123. All characters trailing the first "/" must
496
+
// be valid HTTP Path characters as defined by RFC 3986.
497
+
// key must be lowercase.
498
+
// key must be unique across all extra mappings.
499
+
// +required
496
500
Key string `json:"key"`
497
501
// valueExpression is a CEL expression to extract extra attribute value.
498
502
// valueExpression must produce a string or string array value.
@@ -520,10 +524,10 @@ type JWTAuthenticator struct {
520
524
// prefix is prepended to claim to prevent clashes with existing names.
521
525
// Mutually exclusive with expression.
522
526
// +optional
523
-
Prefix string `json:"prefix"`
527
+
Prefix *string `json:"prefix"`
524
528
525
529
// expression represents the expression which will be evaluated by CEL.
526
-
// Must produce a string. CEL expressions have access to the contents of the token claims for claimValidationRules and claimMappings, userInfo for userInfoValidationRules. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
530
+
// Must produce a string. CEL expressions have access to the contents of the token claims for claimValidationRules and claimMappings, user for userValidationRules. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
527
531
// Either claim or expression must be set.
528
532
// +optional
529
533
Expression string `json:"expression"`
@@ -593,8 +597,8 @@ type JWTAuthenticator struct {
593
597
* There will be a maximum allowed CEL expression cost per authenticator (no limit on total authenticators is required due to the issuer uniqueness requirement).
594
598
* One variable will be available to use in `claimValidationRules` and `claimMappings`:
595
599
* `claims`forJWTclaims (payload)
596
-
* One variable will be available to use in `userInfoValidationRules`:
597
-
* `userInfo` with the same schema as [authentication.k8s.io/v1, Kind=UserInfo](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#userinfo-v1-authentication-k8s-io)
600
+
* One variable will be available to use in `userValidationRules`:
601
+
* `user` with the same schema as [authentication.k8s.io/v1, Kind=UserInfo](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#userinfo-v1-authentication-k8s-io)
598
602
* The standard KubernetesCEL environment, including extension libraries, will be used.
0 commit comments