Skip to content

CNTRLPLANE-311: adding auth config missing fields to API - #2487

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
ShazaAldawamneh:CNTRLPLANE-311-2
Jan 8, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
ShazaAldawamneh:CNTRLPLANE-311-2

Conversation

@ShazaAldawamneh

Copy link
Copy Markdown
Contributor

No description provided.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 19, 2025
@openshift-ci

openshift-ci Bot commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

Hello @ShazaAldawamneh! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@ShazaAldawamneh ShazaAldawamneh changed the title [WIP]: adding auth config missing fields to API [WIP]: CNTRLPLANE-311: adding auth config missing fields to API Sep 19, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 19, 2025
@openshift-ci-robot

openshift-ci-robot commented Sep 19, 2025

Copy link
Copy Markdown

@ShazaAldawamneh: This pull request references CNTRLPLANE-311 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.21.0" version, but no target version was set.

Details

In 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.

@openshift-ci openshift-ci Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 19, 2025
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread features/features.go Outdated
@ShazaAldawamneh ShazaAldawamneh changed the title [WIP]: CNTRLPLANE-311: adding auth config missing fields to API CNTRLPLANE-311: adding auth config missing fields to API Oct 1, 2025
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 1, 2025
@everettraven

Copy link
Copy Markdown
Contributor

/assign

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all of the CEL expression fields, can we also get a PR up against openshift/kubernetes similar to openshift/kubernetes#2353 to show that we are going to be adding admission time validation for the newly added CEL expression fields?

Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2025
Comment thread config/v1/types_authentication.go Outdated
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2025
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
@ShazaAldawamneh

Copy link
Copy Markdown
Contributor Author

/retest-required

Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go Outdated
@coderabbitai

coderabbitai Bot commented Dec 1, 2025

Copy link
Copy Markdown

Walkthrough

Adds a feature-gated ExternalOIDCWithUpstreamParity: new onCreate test YAML, feature gate registration, Authentication API additions (discoveryURL, CEL-based claim/user validation, new types), regenerated deepcopy/OpenAPI/Swagger, and multiple CRD and payload manifest variants exposing updated schema and validations.

Changes

Cohort / File(s) Summary
New tests
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
New onCreate test suite covering discoveryURL variants, discovery/issuer consistency, RequiredClaim vs CEL rules, claim/user validation combinations, expected valid outputs and error cases.
API types
config/v1/types_authentication.go
Added UserValidationRules []TokenUserValidationRule to OIDCProvider, DiscoveryURL string to TokenIssuer; introduced TokenValidationRuleType values RequiredClaim/CEL, TokenClaimValidationCELRule, TokenUserValidationRule, updated TokenClaimValidationRule/TokenRequiredClaim, and added upstream-parity gating.
Deepcopy codegen
config/v1/zz_generated.deepcopy.go
Added DeepCopyInto/DeepCopy for CEL/user validation types; updated deepcopy logic to copy UserValidationRules slice and CEL field with nil-guards.
Feature gates registry
features/features.go
Registered FeatureGateExternalOIDCWithUpstreamParity (enabled in DevPreviewNoUpgrade, TechPreviewNoUpgrade).
Payload feature-gate manifests
payload-manifests/featuregates/*.yaml
Inserted ExternalOIDCWithUpstreamParity into enabled lists for DevPreview/TechPreview variants and into disabled lists for Default/OKD variants across Hypershift and SelfManagedHA profiles.
CRD manifests (generated & feature-gated)
config/v1/zz_generated.crd-manifests/..., config/v1/zz_generated.featuregated-crd-manifests/..., config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
Added/updated Authentication CRD variants to include discoveryURL, userValidationRules, CEL rule schemas, make type required for token claim rules (enum RequiredClaim/CEL), and x-kubernetes-validations enforcing conditional requiredClaim/cel presence.
Payload CRDs
payload-manifests/crds/0000_10_config-operator_01_authentications-*.crd.yaml
Added/updated payload CRD files reflecting expanded Authentication schema (discoveryURL, userValidationRules, CEL claim/user rules) across Default/DevPreview/TechPreview/OKD/Custom variants.
Swagger docs
config/v1/zz_generated.swagger_doc_generated.go
Added SwaggerDoc entries for userValidationRules, TokenClaimValidationCELRule, TokenUserValidationRule, and discoveryURL; updated TokenClaimValidationRule docs.
OpenAPI generation & JSON
openapi/generated_openapi/zz_generated.openapi.go, openapi/openapi.json
Added OpenAPI definitions for CEL validation types and TokenUserValidationRule; extended OIDCProvider/TokenIssuer schemas with userValidationRules and discoveryURL; updated generated schema and dependent definitions.
Feature-gated CRD listing
config/v1/zz_generated.featuregated-crd-manifests.yaml
Added ExternalOIDCWithUpstreamParity to authentications.config.openshift.io FeatureGates list.
Documentation / feature list
features.md
Added ExternalOIDCWithUpstreamParity entry to the feature matrix.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

✨ Finishing touches
  • 📝 Generate docstrings

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
config/v1/zz_generated.swagger_doc_generated.go (1)

446-453: Clarify userValidationRules docs to match TokenUserValidationRule semantics

The description mentions validating "claims" and supporting rules that "require specific claims and values", but userValidationRules is backed by []TokenUserValidationRule, which only exposes CEL expressions over user information (expression/message). This misleads API consumers about supported rule types.

Apply this diff to make the description accurate and focused on CEL-based user validation:

-	"userValidationRules":  "userValidationRules defines the set of rules used to validate claims in a user's token. Each rule is evaluated independently to determine whether the token subject is considered valid. Rules can either require specific claims and values to be present, or define CEL expressions that must evaluate to true for the token to be accepted. All rules must evaluate to true for the token to be accepted. If any rule evaluates to false, the token is rejected. A maximum of 64 rules can be specified. This field is optional.\n\nSee https://kubernetes.io/docs/reference/using-api/cel/ for CEL syntax.",
+	"userValidationRules":  "userValidationRules defines the set of CEL-based rules used to validate a user's token. Each rule defines a CEL expression evaluated against the token's user information (for example, username and groups). All rules must evaluate to true for the token to be accepted. If any rule evaluates to false, the token is rejected. A maximum of 64 rules can be specified. This field is optional.\n\nSee https://kubernetes.io/docs/reference/using-api/cel/ for CEL syntax.",
openapi/openapi.json (1)

11243-11259: Enforce schema constraints for discoveryURL and audienceMatchPolicy, but use correct format for URL validation.

The discoveryURL description specifies multiple constraints (HTTPS, absolute URL, no query params, no user info, no fragments) but the schema lacks validation. Similarly, audienceMatchPolicy describes "MatchAny" as an allowed value but doesn't declare an enum constraint.

For discoveryURL, the correct approach requires both format and pattern. Use format: "uri" (not uri-reference, which allows relative URLs) combined with a pattern to enforce HTTPS:

         "discoveryURL": {
           "description": "discoveryURL is an optional field that, if specified, overrides the default discovery endpoint used to retrieve OIDC configuration metadata. By default, the discovery URL is derived from `issuerURL` as \"{url}/.well-known/openid-configuration\".\n\nThe discoveryURL must:\n  - Be a valid absolute URL.\n  - Use the HTTPS scheme.\n  - Not contain query parameters, user info, or fragments.\n  - Be different from the value of `url` (ignoring trailing slashes)",
           "type": "string",
+          "format": "uri",
+          "pattern": "^https://"
         }

For audienceMatchPolicy, if "MatchAny" is the only allowed value, declare an enum:

         "audienceMatchPolicy": {
           "description": "AudienceMatchPolicy specifies how token audiences are matched. Allowed values are `MatchAny`. When set to `MatchAny`, the token is accepted if any of its audiences match any of the configured audiences. When omitted, the system applies a default policy. Currently, the default is `MatchAny`.",
           "type": "string",
+          "enum": ["MatchAny"]
         }

Note: Complex constraints like "different from issuerURL ignoring trailing slashes" and preventing query parameters/fragments cannot be fully expressed in JSON Schema and require runtime validation via CEL rules in a CRD or API server validation.

♻️ Duplicate comments (4)
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (1)

295-316: Drop length-only test (per prior guidance).

This test only validates max length and adds noise. Please remove it.

-    - name: Expression too long
-      initial: |
-        ...
-      expectedError: "expression must be set when type is 'Expression'"
+    # dropped: length-only validation case
config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDC.yaml (1)

192-247: [Duplicate] Missing expression field in schema; documentation references non-existent field.

Same issue as flagged in ExternalOIDCWithUIDAndExtraClaimMappings.yaml: the schema claims to support "Expression" mode (lines 239–240) but lacks the corresponding expression field in properties. Both feature-gated CRD variants have this inconsistency.

See the prior review comment in ExternalOIDCWithUIDAndExtraClaimMappings.yaml for the detailed analysis and recommended fix. Both files must be updated consistently.

config/v1/types_authentication.go (2)

317-319: Fix field reference in documentation.

The documentation references url but should reference issuerURL for consistency with the actual field name. This was previously flagged in review.

-	// parameters, user information, or fragments. Additionally, it must differ from
-	// the value of `url` (ignoring trailing slashes).
+	// parameters, user information, or fragments. Additionally, it must differ from
+	// the value of `issuerURL` (ignoring trailing slashes).

792-798: Remove invalid spacing between comment blocks.

There's an empty line between the field documentation and the +optional marker. Comment blocks must be continuous with // on each line. This was previously flagged in review.

 	// requiredClaim allows configuring a required claim name and its expected value.
 	// This field is required when `type` is set to RequiredClaim, and must be omitted
 	// when `type` is set to any other value. The Kubernetes API server uses this field
 	// to validate if an incoming JWT is valid for this identity provider.
-
+	//
 	// +optional
 	RequiredClaim *TokenRequiredClaim `json:"requiredClaim,omitempty"`
🟡 Minor comments (9)
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml-448-449 (1)

448-449: Rename test title to match payload (message is present).

The case includes both expression and message; title says “expression only.”

-    - name: Valid TokenUserValidationRule with expression only
+    - name: Valid TokenUserValidationRule with expression and message

Also applies to: 466-468, 469-486

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml-465-468 (1)

465-468: Doc bug: reference issuerURL, not url.

“The value of url” is misleading.

-                            the value of `url` (ignoring trailing slashes).
+                            the value of `issuerURL` (ignoring trailing slashes).
payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml-465-468 (1)

465-468: Doc bug: issuerURL wording.

Fix reference.

-                            the value of `url` (ignoring trailing slashes).
+                            the value of `issuerURL` (ignoring trailing slashes).
payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml-465-468 (1)

465-468: Doc bug: issuerURL reference.

Update wording.

-                            the value of `url` (ignoring trailing slashes).
+                            the value of `issuerURL` (ignoring trailing slashes).
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml-465-468 (1)

465-468: Doc bug: reference issuerURL, not url.

Same as other variants.

-                            the value of `url` (ignoring trailing slashes).
+                            the value of `issuerURL` (ignoring trailing slashes).
config/v1/zz_generated.swagger_doc_generated.go-537-545 (1)

537-545: Align TokenUserValidationRule summary with struct comment (claims vs user info)

The type-level description says expressions are evaluated against the token's claims, while the expression field docs and the struct in config/v1/types_authentication.go state they are evaluated against user information (username, groups). This inconsistency can confuse CEL authors.

Adjust the summary string to match the field/struct semantics:

 var map_TokenUserValidationRule = map[string]string{
-	"":           "TokenUserValidationRule provides a CEL-based rule used to validate a token subject. Each rule contains a CEL expression that is evaluated against the token’s claims.",
+	"":           "TokenUserValidationRule provides a CEL-based rule used to validate a token's user information (for example, username and groups). Each rule contains a CEL expression that is evaluated against this user context.",
 	"expression": "expression is a CEL expression that must evaluate to true for the token to be accepted. The expression is evaluated against the token's user information (e.g., username, groups). This field must be non-empty and may not exceed 1024 characters.",
 	"message":    "message allows configuring a human-readable message that is logged by the Kubernetes API server when a token fails validation based on the CEL expression defined in 'Expression'. This field is optional. If provided, the message must be at least 1 character long and cannot exceed 256 characters. This message is logged and not returned to the caller.",
 }
config/v1/zz_generated.swagger_doc_generated.go-498-502 (1)

498-502: Restore documentation for requiredClaim on TokenClaimValidationRule

TokenClaimValidationRule still has a RequiredClaim *TokenRequiredClaim field, but map_TokenClaimValidationRule no longer documents the requiredClaim property, which regresses API clarity for RequiredClaim-type rules.

Add a requiredClaim entry so the swagger docs describe both rule variants:

 var map_TokenClaimValidationRule = map[string]string{
 	"":           "TokenClaimValidationRule represents a validation rule based on token claims. If type is RequiredClaim, requiredClaim must be set. If type is Expression, expression must be set.",
 	"type":       "type is an optional field that configures the type of the validation rule.\n\nAllowed values are \"RequiredClaim\" and \"Expression\".\n\nWhen set to 'RequiredClaim', the Kubernetes API server will be configured to validate that the incoming JWT contains the required claim and that its value matches the required value.\n\nWhen set to 'Expression', the Kubernetes API server will be configured to validate the incoming JWT against the configured CEL expression.",
+	"requiredClaim": "requiredClaim allows configuring a required claim name and its expected value. This field is required when `type` is set to RequiredClaim, and must be omitted when `type` is set to any other value. The Kubernetes API server uses this field to validate if an incoming JWT is valid for this identity provider.",
 	"expression": "expression configures a CEL expression that will be used by the Kubernetes API server to validate if an incoming JWT is valid for this identity provider. The CEL expression must return a boolean value where 'true' signals a valid state. Expression must be set when 'type' is 'Expression', and is forbidden otherwise.",
 }
config/v1/types_authentication.go-845-852 (1)

845-852: Inconsistent documentation: godoc says "optional" but marker says +required.

The godoc states "This field is optional" but the +required marker indicates the field is mandatory. The CRD manifests also show message as required. Update the documentation to reflect that this field is required.

 	// message allows configuring a human-readable message that is logged by the Kubernetes API server
 	// when a token fails validation based on the CEL expression defined in 'Expression'.
-	// This field is optional. If provided, the message must be at least 1 character long
-	// and cannot exceed 256 characters. This message is logged and not returned to the caller.
+	// This field is required. The message must be at least 1 character long
+	// and must not exceed 256 characters. This message is logged and not returned to the caller.
 	// +required
config/v1/types_authentication.go-867-874 (1)

867-874: Inconsistent documentation: godoc says "optional" but marker says +required.

Same issue as TokenExpressionRule.Message - the godoc states "This field is optional" but the +required marker indicates the field is mandatory. Update the documentation for consistency.

 	// message allows configuring a human-readable message that is logged by the Kubernetes API server
 	// when a token fails validation based on the CEL expression defined in 'Expression'.
-	// This field is optional. If provided, the message must be at least 1 character long
-	// and cannot exceed 256 characters. This message is logged and not returned to the caller.
+	// This field is required. The message must be at least 1 character long
+	// and must not exceed 256 characters. This message is logged and not returned to the caller.
 	// +required
🧹 Nitpick comments (7)
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (3)

403-424: Remove commented-out test block.

Dead/commented code adds churn to future edits.

-    # - name: Expression too long in TokenUserValidationRule
-    #   initial: |
-    #     ...
-    #   expectedError: "expression: Too long"
+    # (removed)

145-164: Nit: clarify title (“issuerURL”).

Rename “URL” → “issuerURL” for precision.

-    - name: discoveryURL must be different from URL
+    - name: discoveryURL must be different from issuerURL

76-83: False-positive secret scan: basic auth in test URL.

Static analysis flags https://user:pass@.... It’s intentional to test “no userinfo”, but may trip CI. Consider obfuscating pass or adding repo-level suppression for this test path.

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1)

480-481: Prefer URL parsing over regex for userinfo.

If available in this CEL environment, prefer url(self).getUserInfo().size() == 0 to avoid pattern gaps.

-                          - message: discoveryURL must not contain user info
-                            rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
+                          - message: discoveryURL must not contain user info
+                            rule: url(self).getUserInfo().size() == 0

Please confirm getUserInfo() support in your apiserver CEL library.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (1)

480-481: Optional: switch to URL userinfo check.

Use url(self).getUserInfo().size() == 0 if supported.

payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml (1)

480-481: Optional: robust userinfo check using URL parts.

Prefer CEL URL accessors if available.

payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (1)

480-481: Optional: use URL userinfo accessor.

Prefer url(self).getUserInfo().size() == 0 if supported.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 33ccad5 and 38b7dd9.

📒 Files selected for processing (26)
  • config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (1 hunks)
  • config/v1/types_authentication.go (6 hunks)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml (1 hunks)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml (3 hunks)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1/zz_generated.deepcopy.go (4 hunks)
  • config/v1/zz_generated.featuregated-crd-manifests.yaml (1 hunks)
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDC.yaml (2 hunks)
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml (2 hunks)
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (1 hunks)
  • config/v1/zz_generated.swagger_doc_generated.go (3 hunks)
  • features.md (1 hunks)
  • features/features.go (1 hunks)
  • openapi/generated_openapi/zz_generated.openapi.go (7 hunks)
  • openapi/openapi.json (6 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml (3 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-Hypershift-Default.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml (1 hunks)
  • payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
  • config/v1/zz_generated.featuregated-crd-manifests.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
  • features/features.go
  • features.md
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml
  • config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml
  • config/v1/types_authentication.go
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDC.yaml
  • config/v1/zz_generated.deepcopy.go
  • config/v1/zz_generated.swagger_doc_generated.go
  • openapi/openapi.json
  • openapi/generated_openapi/zz_generated.openapi.go
🧬 Code graph analysis (4)
features/features.go (1)
config/v1/types_feature.go (2)
  • DevPreviewNoUpgrade (49-49)
  • TechPreviewNoUpgrade (45-45)
config/v1/types_authentication.go (1)
config/v1/zz_generated.swagger_doc_generated.go (3)
  • TokenUserValidationRule (543-545)
  • TokenRequiredClaim (533-535)
  • TokenExpressionRule (513-515)
config/v1/zz_generated.deepcopy.go (2)
config/v1/types_authentication.go (2)
  • TokenUserValidationRule (857-875)
  • TokenExpressionRule (834-853)
config/v1/zz_generated.swagger_doc_generated.go (2)
  • TokenUserValidationRule (543-545)
  • TokenExpressionRule (513-515)
config/v1/zz_generated.swagger_doc_generated.go (1)
config/v1/types_authentication.go (3)
  • TokenClaimValidationRule (779-810)
  • TokenExpressionRule (834-853)
  • TokenUserValidationRule (857-875)
🪛 Checkov (3.2.334)
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml

[medium] 76-77: Basic Auth Credentials

(CKV_SECRET_4)

🔇 Additional comments (35)
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml (1)

10-10: Approve metadata annotation for feature-set tracking.

The addition of the feature-set annotation is appropriate for the Default variant and aligns with the standard OpenShift CRD annotation pattern.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml (5)

351-399: Dual-mode token claim validation with proper mutual exclusivity enforcement.

The new expression field and type enum introduce CEL-based validation alongside the existing RequiredClaim mode. The x-kubernetes-validations rules (lines 428–436) correctly enforce that exactly one of expression or requiredClaim is set based on the type value.


428-436: Verify mutual exclusivity validation rules are exhaustive.

The x-kubernetes-validations at lines 428–436 enforce two conditions:

  1. If type is 'Expression', expression must be set (line 429–432)
  2. If type is 'RequiredClaim', requiredClaim must be set (line 433–436)

However, if type is omitted or set to an invalid value, both rules would require their respective fields to be absent. Ensure this defensive logic aligns with the Go implementation in types_authentication.go.


459-481: discoveryURL field with strict HTTPS and format validation.

The new discoveryURL field enables overriding OIDC discovery endpoints. Validation rules enforce:

  • Valid absolute HTTPS URL (lines 472–475)
  • No query parameters (line 476–477)
  • No fragments (line 478–479)
  • No user info (line 480–481)

This is appropriately strict for security.


528-532: Validate the CEL logic for discoveryURL vs issuerURL differentiation.

Line 530–532 enforces that discoveryURL must differ from issuerURL (after stripping trailing slashes). The CEL rule uses .find('^.+[^/]') to strip trailing slashes and compares both URLs. Verify this regex logic handles edge cases (e.g., root paths, query parameters that should have been blocked earlier, empty strings).


632-675: New userValidationRules field with CEL-based per-user validation.

The userValidationRules field (max 64, min 1 when present) enables CEL-based validation at the user level. The use of expression as the x-kubernetes-list-map-key ensures uniqueness per rule. Verify that the minItems: 1 constraint is intentional—it means if the field is present, at least one rule must be configured.

payload-manifests/featuregates/featureGate-Hypershift-Default.yaml (1)

102-104: Feature gate correctly added to disabled list in Default variant.

The ExternalOIDCWithUpstreamParity gate is appropriately placed in the disabled list for the Default feature set and maintains alphabetical ordering.

payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml (1)

160-162: Feature gate correctly enabled in DevPreviewNoUpgrade variant.

The ExternalOIDCWithUpstreamParity entry is placed in the enabled list for DevPreviewNoUpgrade and maintains alphabetical order.

features.md (1)

44-44: Feature gate documentation added with correct state matrix.

The ExternalOIDCWithUpstreamParity entry in features.md correctly reflects the gate's enabled state across preview variants and disabled state in Default.

payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml (1)

169-171: Feature gate correctly enabled in TechPreviewNoUpgrade variant.

The entry is properly placed in the enabled list with correct alphabetical positioning.

payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml (1)

102-104: Feature gate correctly added to disabled list in SelfManagedHA Default variant.

Consistent with the Hypershift Default manifest; the gate is disabled and alphabetically ordered.

payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml (1)

142-144: Feature gate correctly enabled in SelfManagedHA DevPreviewNoUpgrade variant.

Entry is properly placed and alphabetically ordered, consistent with other platform variants.

config/v1/zz_generated.featuregated-crd-manifests.yaml (1)

31-36: Authentication CRD now correctly advertises the new feature gate

Adding ExternalOIDCWithUpstreamParity to the FeatureGates list for authentications.config.openshift.io is consistent with the new feature gate and keeps the CRD metadata in sync with features.go and payload manifests.

payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml (1)

146-155: SelfManagedHA TechPreview manifest wiring for ExternalOIDCWithUpstreamParity looks correct

The new enabled entry for ExternalOIDCWithUpstreamParity is placed alongside the other ExternalOIDC feature gates and matches the TechPreview scope defined in features/features.go.

features/features.go (1)

460-466: New ExternalOIDCWithUpstreamParity feature gate definition is consistent

The gate metadata (name, Jira component, contact, enhancement PR) and enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade) pattern match adjacent ExternalOIDC feature gates and avoid unnecessary cluster‑profile specialization, as requested in earlier review feedback.

config/v1/zz_generated.deepcopy.go (4)

4738-4760: OIDCProvider deepcopy correctly extended for UserValidationRules

The added block copying UserValidationRules allocates a new slice and value‑copies each TokenUserValidationRule, which is sufficient since the rule struct only contains strings. This avoids aliasing and keeps OIDCProvider deepcopy behavior consistent with other slice fields.


6435-6443: TokenClaimValidationRule now deep‑copies Expression as well

Assigning out.Expression = in.Expression correctly copies the new TokenExpressionRule field by value, which is appropriate given it only contains string fields (no nested reference types).


6477-6491: DeepCopy for TokenExpressionRule matches its simple value semantics

Both DeepCopyInto and DeepCopy use struct assignment, which is sufficient for TokenExpressionRule since it only has string members.


6531-6545: DeepCopy for TokenUserValidationRule is correctly implemented

The autogenerated deepcopy functions simply assign the struct, which fully copies the Expression and Message string fields and is consistent with how other simple structs are handled.

config/v1/zz_generated.swagger_doc_generated.go (1)

508-515: TokenExpressionRule swagger docs align with the type definition

The new TokenExpressionRule map and SwaggerDoc correctly expose expression and message and reflect the validation semantics from config/v1/types_authentication.go (required non-empty CEL expression, optional log message with length bounds).

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml (1)

343-399: Missing expression field in schema; documentation references non-existent field.

The claimValidationRules documentation mentions support for "Expression" mode validation (lines 390–391), but the schema properties (lines 356–393) only define requiredClaim and type fields—no expression field is present. If Expression mode is supported, the schema must include an expression field and the validation rule must be updated to enforce its presence when type is "Expression".

Verify that the expression field is defined in config/v1/types_authentication.go and ensure it's included in this generated CRD schema.

openapi/generated_openapi/zz_generated.openapi.go (6)

414-423: LGTM!

The new type registrations follow the existing pattern and maintain alphabetical ordering.


20628-20639: LGTM!

The updated description clearly documents the two validation rule types and their semantics.


20642-20661: LGTM!

The expression field correctly references TokenExpressionRule and maintains proper dependencies.


20767-20773: LGTM!

The discoveryURL field is well-documented with clear validation constraints.


20699-20724: Fix inconsistency: message field marked both optional and required.

Line 20714 describes message as optional ("This field is optional"), but line 20720 includes it in the Required array. This contradiction will cause API validation to reject requests without the message field, conflicting with the documentation.

Resolve by either:

  1. Removing message from the Required array (line 20720) if it should be optional, or
  2. Updating the description (line 20714) to state the field is required.

Since this is generated code, verify the source type definition to determine the correct state, then regenerate if necessary.


17473-17500: Verify maxItems constraint is enforced at the CRD level.

The description states "A maximum of 64 rules can be specified," but the generated OpenAPI schema lacks a maxItems constraint. This validation may be enforced via CEL validation rules or CRD constraints in the source type definition. Confirm the constraint is present in the TokenUserValidationRule type definition or CRD validation rules.

config/v1/types_authentication.go (3)

247-263: LGTM!

The userValidationRules field is well-defined with proper constraints (MaxItems=64, MinItems=1), feature gating, and uniqueness enforcement via listType=map with expression as the key.


757-771: LGTM!

The TokenValidationRuleType enum is properly defined with feature-gate-aware enum validation, correctly gating Expression behind ExternalOIDCWithUpstreamParity while allowing RequiredClaim by default.


809-809: Verify omitzero json tag compatibility with Go version requirements.

The omitzero tag on the expression field requires Go 1.24+. Confirm this aligns with the project's minimum Go version specified in go.mod.

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (2)

1-11: LGTM!

The CRD manifest correctly includes the ExternalOIDCWithUpstreamParity feature gate annotation and follows the expected structure for OpenShift API CRDs.


481-524: LGTM!

The userValidationRules schema correctly implements the constraints from the Go types: max 64 items, min 1 item, map-based list keyed on expression for uniqueness, and properly nested TokenUserValidationRule structure.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (2)

1-11: LGTM!

The CRD manifest is correctly annotated for the DevPreviewNoUpgrade feature set with appropriate release annotations.


697-707: LGTM!

The type enum correctly includes OIDC alongside the standard values, as expected for the DevPreviewNoUpgrade feature set which enables ExternalOIDC capabilities.

openapi/openapi.json (1)

11187-11198: Verify conditional validation constraints for TokenClaimValidationRule.

The schema allows both expressionRule and requiredClaim to be absent or present simultaneously, but the description implies a conditional constraint: if type is "Expression", expressionRule must be set; if type is "RequiredClaim", requiredClaim must be set. This requires checking:

  • Go struct validation tags in config/v1/types_authentication.go for TokenClaimValidationRule
  • CEL validation rules in generated CRD manifests to enforce this conditional logic

Comment thread config/v1/zz_generated.swagger_doc_generated.go
Comment thread openapi/generated_openapi/zz_generated.openapi.go
Comment thread config/v1/types_authentication.go Outdated
Comment thread config/v1/types_authentication.go
Comment thread config/v1/types_authentication.go Outdated
Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>

@everettraven everettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 5, 2026
@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change

@openshift-ci

openshift-ci Bot commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Fix all issues with AI Agents 🤖
In @config/v1/types_authentication.go:
- Around line 311-328: Update the comment for DiscoveryURL to reference the
correct serialized field name `issuerURL` instead of `url` (e.g., change "differ
from the value of `url`" to "differ from the value of `issuerURL`") so the
documentation matches the actual field name and serialization; ensure all
occurrences in the block around the DiscoveryURL field and its validation
comments use `issuerURL`.

In
@config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml:
- Around line 460-468: The discoveryURL field description incorrectly references
`url`; update the docstring for `discoveryURL` to say it must differ from
`issuerURL` (ignoring trailing slashes) so it matches the schema/validation;
change the sentence "it must differ from the value of `url` (ignoring trailing
slashes)" to "it must differ from the value of `issuerURL` (ignoring trailing
slashes)" in the `discoveryURL` description.
- Around line 503-521: Update the issuerURL JSONSchema/x-kubernetes-validation
in the Go type for Authentication so its query-empty check matches discoveryURL:
replace the rule that uses getQuery() == {} with getQuery().size() == 0; locate
the issuerURL validation in types_authentication.go (the Authentication struct /
issuerURL field) and modify the validation tag/expression accordingly so
regenerated CRDs use url(self).getQuery().size() == 0.

In
@config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml:
- Around line 351-407: The CRD for TokenClaimValidationRule is inconsistent: the
description mentions "CEL" but the schema's enum only contains "RequiredClaim",
there is no `cel` property or CEL validation, and `type` is documented as
optional but marked required. Fix by updating the Go API type that generates
TokenClaimValidationRule to either (A) restrict the description to only
"RequiredClaim" and ensure `Type` is required in the Go struct/tags, or (B) add
CEL support by adding a `Cel`/`cel` field to the Go type, include "CEL" in the
Type enum/tag, and add the corresponding validation logic (mirror the
TechPreview/Custom variant and x-kubernetes-validations for CEL). Regenerate the
CRD so TokenClaimValidationRule, Type enum, `cel` property, and
x-kubernetes-validations are consistent.

In
@payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml:
- Around line 460-483: Update the discoveryURL docs to say it must differ from
issuerURL (not `url`) so description matches validation, and tighten the "must
not contain user info" validation for discoveryURL to reject any user-info (both
user:pass and user@ forms) — replace the current regex check on discoveryURL
with a stricter CEL condition that detects an '@' in the authority portion (same
approach used for issuerURL) so configurations with embedded credentials are
consistently rejected; target the discoveryURL field and its
x-kubernetes-validations entry to make these edits.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml (1)

449-471: Use getQuery().size() == 0 for issuerURL instead of getQuery() == {}

The issuerURL validation currently checks for an empty query with url(self).getQuery() == {}. Comparing a map to an untyped {} literal is brittle in CEL and inconsistent with other Authentication CRD variants that already use getQuery().size() == 0. This pattern is also inconsistently applied across multiple generated CRD files (8 files still use the old pattern; others have been partially updated to the new pattern). Prefer the size-based emptiness check:

- message: must not have a query
  rule: isURL(self) && url(self).getQuery().size() == 0

This should be fixed in the generator / Go source so all generated CRDs are consistent.

payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml (1)

351-407: Schema lacks CEL support mentioned in documentation.

The description at lines 351-354 states "If Type is CEL, CEL must be set" and lines 389-396 describe CEL validation behavior, but the schema provides no cel field and the type enum at lines 398-399 only includes RequiredClaim. This creates a misleading contract.

Either remove all CEL references from the documentation to match the OKD feature set's actual capabilities, or add the missing cel field and CEL enum value if CEL support is intended.

🔎 Proposed fix to remove CEL references
                       description: |-
                         TokenClaimValidationRule represents a validation rule based on token claims.
-                        If type is RequiredClaim, requiredClaim must be set.
-                        If Type is CEL, CEL must be set and RequiredClaim must be omitted.
+                        The type must be RequiredClaim, and requiredClaim must be set.
                       properties:
                         requiredClaim:
                           description: |-
                             requiredClaim allows configuring a required claim name and its expected value.
-                            This field is required when `type` is set to RequiredClaim, and must be omitted
-                            when `type` is set to any other value. The Kubernetes API server uses this field
-                            to validate if an incoming JWT is valid for this identity provider.
+                            This field is required. The Kubernetes API server uses this field to validate
+                            if an incoming JWT is valid for this identity provider.
...
                         type:
                           description: |-
                             type is an optional field that configures the type of the validation rule.

-                            Allowed values are "RequiredClaim" and "CEL".
+                            Allowed value is "RequiredClaim".

                             When set to 'RequiredClaim', the Kubernetes API server will be configured
                             to validate that the incoming JWT contains the required claim and that its
                             value matches the required value.
-
-                            When set to 'CEL', the Kubernetes API server will be configured
-                            to validate the incoming JWT against the configured CEL expression.
♻️ Duplicate comments (23)
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml (1)

351-407: Align TokenClaimValidationRule.type docs with OKD schema (no CEL supported here)

The description advertises type values "RequiredClaim" and "CEL" and describes CEL behavior, but:

  • The enum only allows "RequiredClaim".
  • There is no cel property or CEL‑related validation.
  • type is listed as required while the description still calls it “optional”.

This makes the OKD CRD misleading and suggests configurations that will be rejected by validation. For the OKD feature‑set variant, either:

  • Remove/adjust CEL references and describe only "RequiredClaim", and update the wording so type is documented as required, or
  • If CEL is actually intended to be usable on OKD, extend the schema here (add cel, include "CEL" in the enum, and mirror the TechPreview/Custom validations).

Given the separate feature‑gated manifests, the first option (document only RequiredClaim in this file) seems correct; please update the Go type comments / generator accordingly and regenerate the CRDs.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (1)

460-468: Doc fix: refer to issuerURL, not url, in discoveryURL description

The discoveryURL description says:

“…Additionally, it must differ from the value of url (ignoring trailing slashes).”

There is no url field here; the cross‑field validation compares against issuerURL. Update the prose to reference issuerURL instead so the docs match the actual schema and validation behavior.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml (1)

449-471: Switch issuerURL query check to getQuery().size() == 0 (matches other variants)

The issuerURL validation still uses:

- message: must not have a query
  rule: isURL(self) && url(self).getQuery() == {}

Other Authentication CRD variants now use url(self).getQuery().size() == 0, which is the safer CEL idiom and avoids comparing maps to an untyped {} literal. Please update the generator / source so this rule becomes:

-                          - message: must not have a query
-                            rule: isURL(self) && url(self).getQuery() == {}
+                          - message: must not have a query
+                            rule: isURL(self) && url(self).getQuery().size() == 0
openapi/openapi.json (7)

9150-9161: Enforce maximum rule count constraint in schema.

The description states "no more than 64 rules may be specified," but the schema still lacks a maxItems: 64 constraint. This issue was previously flagged but remains unaddressed.


10968-10971: Add schema constraint for expression field length limits.

The description specifies "must be at least 1 character in length and must not exceed 1024 characters," but the schema still lacks minLength: 1 and maxLength: 1024 constraints. This issue was previously flagged but remains unaddressed.


10972-10975: Missing string length constraints on message field.

The description requires "must be at least 1 character in length and must not exceed 256 characters," but the schema still lacks minLength: 1 and maxLength: 256 constraints. This issue was previously flagged but remains unaddressed.


10994-10998: Inconsistency: type field marked required but described as optional.

The description states "type is an optional field," but the field is listed in the required array at lines 10981-10983. This inconsistency was previously flagged but remains unaddressed.


11037-11040: Add URL validation and length constraints to discoveryURL field.

The description requires "a valid absolute HTTPS URL" without "query parameters, user information, or fragments" and specifies "at least 1 character long and no longer than 2048 characters," but the schema still lacks format: uri, pattern constraint, minLength: 1, and maxLength: 2048. This issue was previously flagged but remains unaddressed.


11080-11083: Add schema constraint for expression field length limit.

The description states "must be at least 1 character in length and must not exceed 1024 characters," but the schema still lacks minLength: 1 and maxLength: 1024 constraints. This issue was previously flagged but remains unaddressed.


11084-11087: Missing string length constraints on message field.

The description requires "must be at least 1 character in length and must not exceed 256 characters," but the schema still lacks minLength: 1 and maxLength: 256 constraints. This issue was previously flagged but remains unaddressed.

features/features.go (1)

444-450: Verify the intended feature gate enablement scope.

The feature gate is currently enabled only in DevPreviewNoUpgrade and TechPreviewNoUpgrade. Based on the past review comment and the fact that related feature gates like ExternalOIDC (Line 433) are enabled in all profiles including Default and OKD, please confirm whether this is intentional or if this feature should also be enabled more broadly.

payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml (1)

351-399: Remove references to unsupported "Expression" type in descriptions.

The type enum correctly restricts values to RequiredClaim only (Line 398), but the descriptions at Lines 353-354 and 389-396 still reference the "Expression" type which is not supported in the Default feature set. Update the documentation to match the actual schema constraints.

🔎 Proposed documentation fix
                         description: |-
                           TokenClaimValidationRule represents a validation rule based on token claims.
                           If type is RequiredClaim, requiredClaim must be set.
-                          If Type is CEL, CEL must be set and RequiredClaim must be omitted.
                         properties:
                           type:
                             description: |-
                               type is an optional field that configures the type of the validation rule.
 
-                              Allowed values are "RequiredClaim" and "CEL".
+                              Allowed value is "RequiredClaim".
 
                               When set to 'RequiredClaim', the Kubernetes API server will be configured
                               to validate that the incoming JWT contains the required claim and that its
                               value matches the required value.
-
-                              When set to 'CEL', the Kubernetes API server will be configured
-                              to validate the incoming JWT against the configured CEL expression.
payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml (3)

377-380: Make message optional in TokenClaimValidationCELRule.

The description at Line 371 states that message is required, and it's listed in the required array at Lines 377-380. However, per past review feedback, message should be optional to allow flexibility in CEL-based validation rules.

🔎 Proposed fix
                               message:
                                 description: |-
-                                  message is a required human-readable message to be logged by the Kubernetes API server
+                                  message is an optional human-readable message to be logged by the Kubernetes API server
                                   if the CEL expression defined in 'expression' fails.
                                   message must be at least 1 character in length and must not exceed 256 characters.
                                 maxLength: 256
                                 minLength: 1
                                 type: string
                             required:
                             - expression
-                            - message

466-467: Fix field name reference in discoveryURL description.

Line 467 incorrectly references url instead of issuerURL. Update the documentation to use the correct field name.

🔎 Proposed fix
                             The discoveryURL must be a valid absolute HTTPS URL. It must not contain query
-                            parameters, user information, or fragments. Additionally, it must differ from the value of `url` (ignoring trailing slashes).
+                            parameters, user information, or fragments. Additionally, it must differ from the value of `issuerURL` (ignoring trailing slashes).

633-674: Fix userValidationRules list configuration and make message optional.

Multiple issues need to be addressed:

  1. The x-kubernetes-list-type: map with expression as a key is incorrect since expression is not a top-level field
  2. The message field should be optional (Lines 665-668)
  3. Consider using atomic list type instead
🔎 Proposed fix
                           message:
                             description: |-
-                              message is a required human-readable message to be logged by the Kubernetes API server
+                              message is an optional human-readable message to be logged by the Kubernetes API server
                               if the CEL expression defined in 'expression' fails.
                               message must be at least 1 character in length and must not exceed 256 characters.
                             maxLength: 256
                             minLength: 1
                             type: string
                         required:
                         - expression
-                        - message
                         type: object
                       maxItems: 64
                       minItems: 1
                       type: array
-                      x-kubernetes-list-map-keys:
-                      - expression
-                      x-kubernetes-list-type: map
+                      x-kubernetes-list-type: atomic
config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml (1)

351-407: Remove CEL references from documentation or add CEL support to schema.

The description at lines 353-354 and 389-396 mentions CEL type and validation, but the schema lacks a cel field and the type enum at lines 397-399 only includes RequiredClaim. This feature gate does not support CEL-based validation.

Remove all CEL references from the documentation to accurately reflect the feature gate's capabilities, or add the missing cel field and CEL enum value if CEL support is intended for this feature gate.

🔎 Proposed documentation fix
                       description: |-
                         TokenClaimValidationRule represents a validation rule based on token claims.
-                        If type is RequiredClaim, requiredClaim must be set.
-                        If Type is CEL, CEL must be set and RequiredClaim must be omitted.
+                        The type must be RequiredClaim, and requiredClaim must be set.
                       properties:
                         requiredClaim:
                           description: |-
                             requiredClaim allows configuring a required claim name and its expected value.
-                            This field is required when `type` is set to RequiredClaim, and must be omitted
-                            when `type` is set to any other value. The Kubernetes API server uses this field
+                            This field is required. The Kubernetes API server uses this field
                             to validate if an incoming JWT is valid for this identity provider.
...
                         type:
                           description: |-
                             type is an optional field that configures the type of the validation rule.

-                            Allowed values are "RequiredClaim" and "CEL".
+                            Allowed value is "RequiredClaim".

                             When set to 'RequiredClaim', the Kubernetes API server will be configured
                             to validate that the incoming JWT contains the required claim and that its
                             value matches the required value.
-
-                            When set to 'CEL', the Kubernetes API server will be configured
-                            to validate the incoming JWT against the configured CEL expression.
                           enum:
                           - RequiredClaim
payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1)

514-524: Use type-safe map emptiness check for issuerURL query validation.

Line 520 uses url(self).getQuery() == {} which is type-unsafe in CEL. The discoveryURL validation at line 478 correctly uses url(self).getQuery().size() == 0. Apply the same pattern here for consistency and to avoid CEL type dispatch ambiguities.

🔎 Proposed fix
                         - message: must not have a query
-                          rule: isURL(self) && url(self).getQuery() == {}
+                          rule: isURL(self) && url(self).getQuery().size() == 0

This is a generated CRD that originates from config/v1/types_authentication.go line 281, so the fix should be applied at the source and CRDs regenerated.

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (1)

363-373: Apply type-safe map emptiness check for issuerURL query validation.

Line 369 uses url(self).getQuery() == {}, which is type-unsafe in CEL. The discoveryURL validation at line 327 correctly uses url(self).getQuery().size() == 0. For consistency and type safety, apply the same pattern to issuerURL.

🔎 Proposed fix
                         - message: must not have a query
-                          rule: isURL(self) && url(self).getQuery() == {}
+                          rule: isURL(self) && url(self).getQuery().size() == 0

Since this is a generated CRD from source definitions, update the source validation in config/v1/types_authentication.go and regenerate all CRD manifests.

config/v1/zz_generated.swagger_doc_generated.go (2)

522-522: Fix discoveryURL description to reference issuerURL instead of nonexistent url

The last sentence says discoveryURL must differ from the value of url, but TokenIssuer has no url field—only issuerURL and discoveryURL. This is confusing in the public API docs and should be corrected to reference issuerURL.

Proposed doc fix
-	"discoveryURL":               "discoveryURL is an optional field that, if specified, overrides the default discovery endpoint used to retrieve OIDC configuration metadata. By default, the discovery URL is derived from `issuerURL` as \"{issuerURL}/.well-known/openid-configuration\".\n\nThe discoveryURL must be a valid absolute HTTPS URL. It must not contain query parameters, user information, or fragments. Additionally, it must differ from the value of `url` (ignoring trailing slashes). The discoveryURL value must be at least 1 character long and no longer than 2048 characters.",
+	"discoveryURL":               "discoveryURL is an optional field that, if specified, overrides the default discovery endpoint used to retrieve OIDC configuration metadata. By default, the discovery URL is derived from `issuerURL` as \"{issuerURL}/.well-known/openid-configuration\".\n\nThe discoveryURL must be a valid absolute HTTPS URL. It must not contain query parameters, user information, or fragments. Additionally, it must differ from the value of `issuerURL` (ignoring trailing slashes). The discoveryURL value must be at least 1 character long and no longer than 2048 characters.",

538-546: Align TokenUserValidationRule top‑level doc with identity‑based evaluation

The empty‑key description still says the CEL expression is evaluated against “a token subject” and “the token’s claims”, but the expression field (and the Go type) clearly describe evaluation over the constructed cluster user identity (username, groups, etc.). This mismatch can mislead users writing CEL.

Proposed doc tweak
-var map_TokenUserValidationRule = map[string]string{
-	"":           "TokenUserValidationRule provides a CEL-based rule used to validate a token subject. Each rule contains a CEL expression that is evaluated against the token’s claims.",
+var map_TokenUserValidationRule = map[string]string{
+	"":           "TokenUserValidationRule provides a CEL-based rule used to validate a cluster user identity that was constructed from token claims. Each rule contains a CEL expression that is evaluated against cluster user identity attributes (for example, username and groups).",
 	"expression": "expression is a required CEL expression that performs a validation on cluster user identity attributes like username, groups, etc. The expression must evaluate to a boolean value. When the expression evaluates to 'true', the cluster user identity is considered valid. When the expression evaluates to 'false', the cluster user identity is not considered valid. expression must be at least 1 character in length and must not exceed 1024 characters.",
 	"message":    "message is a required human-readable message to be logged by the Kubernetes API server if the CEL expression defined in 'expression' fails. message must be at least 1 character in length and must not exceed 256 characters.",
 }
openapi/generated_openapi/zz_generated.openapi.go (2)

20254-20266: Critical: Unresolved inconsistency in type enum value references.

Line 20263 documents allowed values as "RequiredClaim" and "CEL", but per the previously flagged critical issue, this should reference "Expression" instead of "CEL" to match the intended API semantics. This inconsistency persists from the previous review and remains unaddressed.

🤖 Prompt for AI Agents
In config/v1/types_authentication.go, locate the TokenClaimValidationRule type field
documentation and update all references from "CEL" to "Expression" as the enum
value (keeping "RequiredClaim" as-is); ensure the description at line ~20263
reads 'Allowed values are "RequiredClaim" and "Expression"', then regenerate the
OpenAPI spec by running 'make update-generated-openapi'.

20276-20282: Critical: Inconsistent enum value reference and capitalization.

Two issues persist at line 20278:

  1. The description states 'Must be set when Type is "CEL"', but should reference "Expression" instead of "CEL" to align with the corrected enum values (same critical issue as line 20263).
  2. "Type" should be lowercase "type" for consistency with line 20272.
🤖 Prompt for AI Agents
In config/v1/types_authentication.go, locate the TokenClaimValidationRule.CEL
field documentation and update the description to: "cel holds the CEL expression
and message for validation. Must be set when type is \"Expression\", and
forbidden otherwise." (note lowercase "type" and "Expression" instead of "CEL"),
then regenerate by running 'make update-generated-openapi'.
config/v1/types_authentication.go (1)

848-869: Update documentation to match past review resolution.

The struct-level comment at line 849 still states the expression is "evaluated against the token's claims," but a past review (marked as addressed in commit 91c0fcd) clarified this should reference the "constructed cluster user identity attributes" instead. User validation rules evaluate the mapped identity (username, groups, uid, extra) after claim-to-identity mapping, not the raw JWT token claims.

This is an important distinction that differentiates user validation from claim validation.

-// TokenUserValidationRule provides a CEL-based rule used to validate a token subject.
-// Each rule contains a CEL expression that is evaluated against the token's claims.
+// TokenUserValidationRule provides a CEL-based rule used to validate a token subject.
+// Each rule contains a CEL expression that is evaluated against the cluster user identity
+// attributes (username, groups, uid, extra) constructed from the token claims.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between bebeeb2 and 5470873.

📒 Files selected for processing (30)
  • config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
  • config/v1/types_authentication.go
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • config/v1/zz_generated.deepcopy.go
  • config/v1/zz_generated.featuregated-crd-manifests.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDC.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
  • config/v1/zz_generated.swagger_doc_generated.go
  • features.md
  • features/features.go
  • openapi/generated_openapi/zz_generated.openapi.go
  • openapi/openapi.json
  • payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
🚧 Files skipped from review as they are similar to previous changes (8)
  • payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • features.md
  • payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-OKD.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • payload-manifests/featuregates/featureGate-SelfManagedHA-OKD.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
  • features/features.go
  • payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • config/v1/zz_generated.featuregated-crd-manifests.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
  • config/v1/zz_generated.swagger_doc_generated.go
  • config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDC.yaml
  • config/v1/types_authentication.go
  • openapi/openapi.json
  • config/v1/zz_generated.deepcopy.go
  • openapi/generated_openapi/zz_generated.openapi.go
  • config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml
🧬 Code graph analysis (4)
features/features.go (1)
config/v1/types_feature.go (2)
  • DevPreviewNoUpgrade (49-49)
  • TechPreviewNoUpgrade (45-45)
config/v1/zz_generated.swagger_doc_generated.go (1)
config/v1/types_authentication.go (2)
  • TokenClaimValidationCELRule (829-846)
  • TokenUserValidationRule (850-869)
config/v1/types_authentication.go (1)
config/v1/zz_generated.swagger_doc_generated.go (3)
  • TokenUserValidationRule (544-546)
  • TokenRequiredClaim (534-536)
  • TokenClaimValidationCELRule (503-505)
config/v1/zz_generated.deepcopy.go (2)
config/v1/types_authentication.go (2)
  • TokenUserValidationRule (850-869)
  • TokenClaimValidationCELRule (829-846)
config/v1/zz_generated.swagger_doc_generated.go (2)
  • TokenUserValidationRule (544-546)
  • TokenClaimValidationCELRule (503-505)
🪛 Checkov (3.2.334)
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml

[medium] 112-113: Basic Auth Credentials

(CKV_SECRET_4)

🔇 Additional comments (20)
payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml (1)

166-168: ExternalOIDCWithUpstreamParity gate wiring looks consistent

New gate is enabled alongside the other ExternalOIDC* gates with the expected shape; no further changes needed here.

config/v1/zz_generated.featuregated-crd-manifests.yaml (1)

31-35: Authentication CRD correctly annotated with new feature gate

Including ExternalOIDCWithUpstreamParity in the Authentication FeatureGates registry aligns this CRD with the new OIDC parity feature and the other manifests in the PR.

config/v1/zz_generated.deepcopy.go (1)

4563-4585: DeepCopy coverage for new OIDC validation types looks correct

UserValidationRules is deep-copied as a fresh slice, and both TokenClaimValidationCELRule and TokenUserValidationRule get value-wise DeepCopy helpers, which is sufficient given their string-only fields. No pointer or map fields are missed.

Also applies to: 6209-6223, 6306-6320

payload-manifests/featuregates/featureGate-SelfManagedHA-OKD.yaml (1)

107-109: LGTM!

The new feature gate ExternalOIDCWithUpstreamParity is correctly added to the disabled list, following the established pattern and maintaining alphabetical ordering.

config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamParity.yaml (1)

1-458: LGTM!

The test suite comprehensively covers the new ExternalOIDCWithUpstreamParity feature functionality, including:

  • Valid and invalid discoveryURL configurations
  • RequiredClaim and CEL-based validation rules
  • TokenUserValidationRule scenarios
  • Cross-field validations between issuerURL and discoveryURL

The static analysis warning about basic auth credentials on Line 112-113 is a false positive—this is intentionally invalid test data used to verify proper validation of userinfo in URLs.

config/v1/zz_generated.swagger_doc_generated.go (3)

452-452: userValidationRules Swagger doc looks accurate

The description correctly matches the intent of validating the constructed cluster user identity with CEL-based rules and clearly states cardinality limits. No changes needed here.


498-505: CEL rule Swagger mapping is consistent with the Go type

The TokenClaimValidationCELRule Swagger map cleanly documents expression and message in line with the struct-level comments (required, length bounds, boolean CEL semantics). This looks correct.


508-511: No action needed—Swagger enum values already match the Go type.

The Swagger documentation correctly declares allowed values "RequiredClaim" and "CEL" for TokenClaimValidationRule.type, matching the TokenValidationRuleType enum constants defined in config/v1/types_authentication.go (lines 766, 769). Both the Go type comment and validation rules consistently use these exact string literals.

openapi/generated_openapi/zz_generated.openapi.go (5)

401-412: LGTM!

The new OpenAPI definition mappings for TokenClaimValidationCELRule and TokenUserValidationRule are correctly registered.


17147-17179: LGTM!

The userValidationRules field is correctly defined with proper list-map configuration using "expression" as the key, matching the field in TokenUserValidationRule.


20227-20252: LGTM!

The TokenClaimValidationCELRule schema is well-defined with appropriate field descriptions and validation constraints. Both expression and message fields are correctly marked as required, matching their descriptions.


20365-20377: LGTM!

The discoveryURL field is well-documented with comprehensive validation constraints covering security requirements (HTTPS-only), format restrictions, and length limits.


20410-20439: LGTM!

The TokenUserValidationRule schema is correctly defined with both expression and message fields properly marked as required. The field descriptions are clear and consistent with the schema requirements.

config/v1/types_authentication.go (7)

8-8: LGTM!

The feature gate aware validation rule correctly ensures that all OIDC clients in the spec match their componentName and componentNamespace to either a previously configured client or one that exists in the status.


248-261: LGTM!

The userValidationRules field is well-documented and correctly configured:

  • Clear documentation of CEL-based validation semantics (all rules must pass)
  • Appropriate constraints (1-64 rules)
  • Correct listMapKey targeting the expression field for uniqueness
  • Properly feature-gated

267-267: LGTM!

The CEL validation correctly ensures that discoveryURL differs from issuerURL when both are present, using optional chaining to safely handle the optional discoveryURL field.


755-770: LGTM!

The TokenValidationRuleType enum is properly defined with:

  • Correct feature gate progression (CEL only available with ExternalOIDCWithUpstreamParity)
  • Appropriate const naming convention
  • Clear documentation for each enum value

772-805: LGTM!

The TokenClaimValidationRule struct properly implements a discriminated union:

  • Type field is required with clear documentation
  • Mutual exclusivity enforced via CEL validation
  • CEL field correctly uses omitzero for empty struct handling
  • Feature-gated CEL support is appropriate

807-827: LGTM!

The TokenRequiredClaim struct is straightforward and correctly defined with appropriate constraints preventing empty strings for both required fields.


829-846: LGTM!

The TokenClaimValidationCELRule struct correctly combines +required markers with omitempty JSON tags, which is appropriate since the zero value (empty string) is invalid per the MinLength=1 constraints. This prevents invalid zero values from being serialized.

Comment thread config/v1/types_authentication.go
@everettraven

Copy link
Copy Markdown
Contributor

/retest-required

1 similar comment
@ShazaAldawamneh

Copy link
Copy Markdown
Contributor Author

/retest-required

@everettraven

Copy link
Copy Markdown
Contributor

Known issue with okd job.

/override ci/prow/okd-scos-image

@openshift-ci

openshift-ci Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@everettraven: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • ci/prow/okd-scos-image

Only the following failed contexts/checkruns were expected:

  • CodeRabbit
  • ci/prow/build
  • ci/prow/e2e-aws-ovn
  • ci/prow/e2e-aws-ovn-hypershift
  • ci/prow/e2e-aws-ovn-hypershift-conformance
  • ci/prow/e2e-aws-ovn-techpreview
  • ci/prow/e2e-aws-serial
  • ci/prow/e2e-aws-serial-1of2
  • ci/prow/e2e-aws-serial-2of2
  • ci/prow/e2e-aws-serial-techpreview
  • ci/prow/e2e-aws-serial-techpreview-1of2
  • ci/prow/e2e-aws-serial-techpreview-2of2
  • ci/prow/e2e-azure
  • ci/prow/e2e-gcp
  • ci/prow/e2e-upgrade
  • ci/prow/e2e-upgrade-out-of-change
  • ci/prow/images
  • ci/prow/integration
  • ci/prow/lint
  • ci/prow/minor-e2e-upgrade-minor
  • ci/prow/minor-images
  • ci/prow/okd-scos-images
  • ci/prow/unit
  • ci/prow/verify
  • ci/prow/verify-client-go
  • ci/prow/verify-crd-schema
  • ci/prow/verify-crdify
  • ci/prow/verify-deps
  • ci/prow/verify-feature-promotion
  • pull-ci-openshift-api-master-build
  • pull-ci-openshift-api-master-e2e-aws-ovn
  • pull-ci-openshift-api-master-e2e-aws-ovn-hypershift
  • pull-ci-openshift-api-master-e2e-aws-ovn-hypershift-conformance
  • pull-ci-openshift-api-master-e2e-aws-ovn-techpreview
  • pull-ci-openshift-api-master-e2e-aws-serial-1of2
  • pull-ci-openshift-api-master-e2e-aws-serial-2of2
  • pull-ci-openshift-api-master-e2e-aws-serial-techpreview-1of2
  • pull-ci-openshift-api-master-e2e-aws-serial-techpreview-2of2
  • pull-ci-openshift-api-master-e2e-azure
  • pull-ci-openshift-api-master-e2e-gcp
  • pull-ci-openshift-api-master-e2e-upgrade
  • pull-ci-openshift-api-master-e2e-upgrade-out-of-change
  • pull-ci-openshift-api-master-images
  • pull-ci-openshift-api-master-integration
  • pull-ci-openshift-api-master-lint
  • pull-ci-openshift-api-master-minor-e2e-upgrade-minor
  • pull-ci-openshift-api-master-minor-images
  • pull-ci-openshift-api-master-okd-scos-images
  • pull-ci-openshift-api-master-unit
  • pull-ci-openshift-api-master-verify
  • pull-ci-openshift-api-master-verify-client-go
  • pull-ci-openshift-api-master-verify-crd-schema
  • pull-ci-openshift-api-master-verify-crdify
  • pull-ci-openshift-api-master-verify-deps
  • pull-ci-openshift-api-master-verify-feature-promotion
  • pull-ci-openshift-api-release-4.15-e2e-aws-serial
  • pull-ci-openshift-api-release-4.15-e2e-aws-serial-techpreview
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

Known issue with okd job.

/override ci/prow/okd-scos-image

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 kubernetes-sigs/prow repository.

@everettraven

Copy link
Copy Markdown
Contributor

/verified by @everettraven

/override ci/prow/okd-scos-images

@openshift-ci

openshift-ci Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

@everettraven: Overrode contexts on behalf of everettraven: ci/prow/okd-scos-images

Details

In response to this:

/verified by @everettraven

/override ci/prow/okd-scos-images

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 kubernetes-sigs/prow repository.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@everettraven: This PR has been marked as verified by @everettraven.

Details

In response to this:

/verified by @everettraven

/override ci/prow/okd-scos-images

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.

@everettraven

Copy link
Copy Markdown
Contributor

/test e2e-aws-serial

@openshift-ci

openshift-ci Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

@everettraven: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test images
/test integration
/test lint
/test minor-e2e-upgrade-minor
/test minor-images
/test okd-scos-images
/test unit
/test verify
/test verify-client-go
/test verify-crd-schema
/test verify-crdify
/test verify-deps
/test verify-feature-promotion

The following commands are available to trigger optional jobs:

/test okd-scos-e2e-aws-ovn

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-api-master-build
pull-ci-openshift-api-master-images
pull-ci-openshift-api-master-integration
pull-ci-openshift-api-master-lint
pull-ci-openshift-api-master-minor-e2e-upgrade-minor
pull-ci-openshift-api-master-minor-images
pull-ci-openshift-api-master-okd-scos-images
pull-ci-openshift-api-master-unit
pull-ci-openshift-api-master-verify
pull-ci-openshift-api-master-verify-client-go
pull-ci-openshift-api-master-verify-crd-schema
pull-ci-openshift-api-master-verify-crdify
pull-ci-openshift-api-master-verify-deps
pull-ci-openshift-api-master-verify-feature-promotion
Details

In response to this:

/test e2e-aws-serial

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 kubernetes-sigs/prow repository.

@everettraven

Copy link
Copy Markdown
Contributor

These tests were sharded and the sharded instances are passing

/override ci/prow/e2e-aws-serial
/override ci/prow/e2e-aws-serial-techpreview

@openshift-ci

openshift-ci Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

@everettraven: Overrode contexts on behalf of everettraven: ci/prow/e2e-aws-serial, ci/prow/e2e-aws-serial-techpreview

Details

In response to this:

These tests were sharded and the sharded instances are passing

/override ci/prow/e2e-aws-serial
/override ci/prow/e2e-aws-serial-techpreview

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 kubernetes-sigs/prow repository.

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 6d35063 and 2 for PR HEAD 5470873 in total

@openshift-ci

openshift-ci Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

@ShazaAldawamneh: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit e20773b into openshift:master Jan 8, 2026
30 checks passed
ShazaAldawamneh added a commit to ShazaAldawamneh/hypershift that referenced this pull request Mar 10, 2026
Updates are made to support the newly introduced feature-gated fields in the Authentication configuration API added by openshift/api#2487 and openshift/api#2719. It bumps the openshift/api dependency to consume the updated API types and ensures the new fields are correctly pulled into the HyperShift APIs.

To prevent the feature from automatically going GA, this PR introduces a new TechPreviewNoUpgrade (TPNU) feature gate in HyperShift. This includes updating the feature-gate manifests used for API generation and wiring the new feature gate through to the Control Plane Operator so that the additional Kubernetes API Server deployment configuration logic is conditionally enabled. The implementation ensures that the new behavior is strictly gated and only activated when the TechPreview feature gate is explicitly enabled.

Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
ShazaAldawamneh added a commit to ShazaAldawamneh/hypershift that referenced this pull request Mar 11, 2026
…ups claim mapping

Bumps openshift/api to consume the new feature-gated fields from
openshift/api#2487 and openshift/api#2719 and introduces a new
TechPreviewNoUpgrade feature gate to keep the feature from going GA.
The new gate is wired through to the Control Plane Operator so the
additional KAS configuration is only activated when TechPreview is
explicitly enabled.

Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
ShazaAldawamneh added a commit to ShazaAldawamneh/hypershift that referenced this pull request Mar 17, 2026
…ups claim mapping

Bumps openshift/api to consume the new feature-gated fields from
openshift/api#2487 and openshift/api#2719 and introduces a new
TechPreviewNoUpgrade feature gate to keep the feature from going GA.
The new gate is wired through to the Control Plane Operator so the
additional KAS configuration is only activated when TechPreview is
explicitly enabled.

Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
ShazaAldawamneh added a commit to ShazaAldawamneh/hypershift that referenced this pull request Mar 17, 2026
…ups claim mapping

Bumps openshift/api to consume the new feature-gated fields from
openshift/api#2487 and openshift/api#2719 and introduces a new
TechPreviewNoUpgrade feature gate to keep the feature from going GA.
The new gate is wired through to the Control Plane Operator so the
additional KAS configuration is only activated when TechPreview is
explicitly enabled.

Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants