[WIP]: CNTRLPLANE-2550: Add support for CEL expression claim mappings for username and groups#2719
[WIP]: CNTRLPLANE-2550: Add support for CEL expression claim mappings for username and groups#2719ShazaAldawamneh wants to merge 2 commits intoopenshift:masterfrom
Conversation
Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@ShazaAldawamneh: This pull request references CNTRLPLANE-2550 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Hello @ShazaAldawamneh! Some important instructions when contributing to openshift/api: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
|
@ShazaAldawamneh: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| // +openshift:enable:FeatureGate=ExternalOIDCWithUpstreamParity | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +kubebuilder:validation:XValidation:rule="has(self.expression) ? !has(self.claim) : true",message="claim must not be set when expression is provided" |
There was a problem hiding this comment.
This has to be moved to the struct level and needs to be feature gated
| // +openshift:enable:FeatureGate=ExternalOIDCWithUpstreamParity | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +kubebuilder:validation:XValidation:rule="has(self.expression) ? !has(self.claim) : true",message="claim must not be set when expression is provided" |
There was a problem hiding this comment.
This needs to be moved to the struct level and needs to be feature gated.
| // expression is an optional CEL expression used to derive | ||
| // group values from JWT claims. | ||
| // | ||
| // When specified, claim must not be set. | ||
| // | ||
| // +optional | ||
| // +openshift:enable:FeatureGate=ExternalOIDCWithUpstreamParity | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +kubebuilder:validation:XValidation:rule="has(self.expression) ? !has(self.claim) : true",message="claim must not be set when expression is provided" | ||
| Expression string `json:"expression,omitempty"` |
There was a problem hiding this comment.
Should this instead be added to the TokenClaimMapping type that is inlined above?
UsernameClaimMapping.Claimto be optional whenExternalOIDCWithUpstreamParityis enabled.claimwhenPrefixPolicyis 'Prefix'.Expressionfield to be fully gated behindExternalOIDCWithUpstreamParity.claimin tests.