Skip to content

CNTRLPLANE-2544: Add ExternalOIDCWithUpstreamParity e2e tests#30906

Open
xingxingxia wants to merge 1 commit intoopenshift:mainfrom
xingxingxia:add-external-oidc-parity-tests
Open

CNTRLPLANE-2544: Add ExternalOIDCWithUpstreamParity e2e tests#30906
xingxingxia wants to merge 1 commit intoopenshift:mainfrom
xingxingxia:add-external-oidc-parity-tests

Conversation

@xingxingxia
Copy link

@xingxingxia xingxingxia commented Mar 19, 2026

Tests passed:

$ OPENSHIFT_SKIP_EXTERNAL_TESTS=true openshift-tests run openshift/auth/external-oidc --run "ExternalOIDCWithUpstreamParity" --disable-monitor=legacy-cvo-invariants,legacy-test-framework-invariants --provider '{"type":"aws","region":"us-east-2","zone":"us-east-2c","multizone":true,"multimaster":true}'

passed: (27m16s) 2026-03-25T10:23:30 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject authentication when userValidationRules evaluate to false"
passed: (27m24s) 2026-03-25T10:50:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should authenticate with CEL expression claim mappings, userValidationRules, and claimValidationRules"
passed: (26m34s) 2026-03-25T11:17:37 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when username expression produces value failing userValidationRules"
passed: (26m16s) 2026-03-25T11:43:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when groups expression produces value failing userValidationRules"
passed: (27m25s) 2026-03-25T12:11:29 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should authenticate successfully with custom discoveryURL, AND-logic userValidationRules, and mixed-type claimValidationRules"
passed: (26m45s) 2026-03-25T12:38:18 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject tokens when CEL claimValidationRules evaluate to false

Prow CI jobs will also be added.

I noticed the BeforeAll and Ordered don't take effect. This is true for even the existing other external oidc tests. I'll investigate how to improve them.

CC @ShazaAldawamneh

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 19, 2026
@openshift-ci-robot
Copy link

@xingxingxia: This pull request explicitly references no jira issue.

Details

In response to this:

Not yet ready for review. Still WIP
CC @ShazaAldawamneh

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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 479abddb-25c2-47ac-94d7-7bcfd30f3303

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci bot requested review from everettraven and liouk March 19, 2026 05:48
@xingxingxia xingxingxia marked this pull request as draft March 19, 2026 05:48
@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 Mar 19, 2026
@xingxingxia xingxingxia changed the title [Draft] [WIP] NO-JIRA: Add ExternalOIDCWithUpstreamParity e2e tests [WIP] NO-JIRA: Add ExternalOIDCWithUpstreamParity e2e tests Mar 19, 2026
@xingxingxia xingxingxia force-pushed the add-external-oidc-parity-tests branch 2 times, most recently from 40ec653 to 7b35701 Compare March 23, 2026 08:38
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Mar 23, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xingxingxia
Once this PR has been reviewed and has the lgtm label, please assign stbenjam for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@xingxingxia xingxingxia force-pushed the add-external-oidc-parity-tests branch from 7b35701 to 1bcae59 Compare March 25, 2026 13:32
@xingxingxia xingxingxia changed the title [WIP] NO-JIRA: Add ExternalOIDCWithUpstreamParity e2e tests CNTRLPLANE-2544: Add ExternalOIDCWithUpstreamParity e2e tests Mar 25, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 25, 2026

@xingxingxia: This pull request references CNTRLPLANE-2544 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Not yet ready for review. Still WIP
CC @ShazaAldawamneh

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.

@xingxingxia xingxingxia marked this pull request as ready for review March 25, 2026 13:34
@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 Mar 25, 2026
@openshift-ci openshift-ci bot requested a review from deads2k March 25, 2026 13:34
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 25, 2026

@xingxingxia: This pull request references CNTRLPLANE-2544 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Tests passed:

$ OPENSHIFT_SKIP_EXTERNAL_TESTS=true openshift-tests run openshift/auth/external-oidc --run "ExternalOIDCWithUpstreamParity" --disable-monitor=legacy-cvo-invariants,legacy-test-framework-invariants --provider '{"type":"aws","region":"us-east-2","zone":"us-east-2c","multizone":true,"multimaster":true}'

passed: (27m16s) 2026-03-25T10:23:30 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject authentication when userValidationRules evaluate to false"
passed: (27m24s) 2026-03-25T10:50:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should authenticate with CEL expression claim mappings, userValidationRules, and claimValidationRules"
passed: (26m34s) 2026-03-25T11:17:37 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when username expression produces value failing userValidationRules"
passed: (26m16s) 2026-03-25T11:43:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when groups expression produces value failing userValidationRules"
passed: (27m25s) 2026-03-25T12:11:29 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should authenticate successfully with custom discoveryURL, AND-logic userValidationRules, and mixed-type claimValidationRules"
passed: (26m45s) 2026-03-25T12:38:18 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject tokens when CEL claimValidationRules evaluate to false

I noticed the BeforeAll and Ordered don't take effect. Same for even the existing other external oidc tests. I'll investigate how to improve them.

CC @ShazaAldawamneh

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-robot
Copy link

openshift-ci-robot commented Mar 25, 2026

@xingxingxia: This pull request references CNTRLPLANE-2544 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Tests passed:

$ OPENSHIFT_SKIP_EXTERNAL_TESTS=true openshift-tests run openshift/auth/external-oidc --run "ExternalOIDCWithUpstreamParity" --disable-monitor=legacy-cvo-invariants,legacy-test-framework-invariants --provider '{"type":"aws","region":"us-east-2","zone":"us-east-2c","multizone":true,"multimaster":true}'

passed: (27m16s) 2026-03-25T10:23:30 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject authentication when userValidationRules evaluate to false"
passed: (27m24s) 2026-03-25T10:50:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should authenticate with CEL expression claim mappings, userValidationRules, and claimValidationRules"
passed: (26m34s) 2026-03-25T11:17:37 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when username expression produces value failing userValidationRules"
passed: (26m16s) 2026-03-25T11:43:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when groups expression produces value failing userValidationRules"
passed: (27m25s) 2026-03-25T12:11:29 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should authenticate successfully with custom discoveryURL, AND-logic userValidationRules, and mixed-type claimValidationRules"
passed: (26m45s) 2026-03-25T12:38:18 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject tokens when CEL claimValidationRules evaluate to false

Prow CI jobs will also be added.

I noticed the BeforeAll and Ordered don't take effect. Same for even the existing other external oidc tests. I'll investigate how to improve them.

CC @ShazaAldawamneh

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.

@xingxingxia
Copy link
Author

@ShazaAldawamneh , @everettraven , could you please take a look for review?

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 25, 2026

@xingxingxia: This pull request references CNTRLPLANE-2544 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Tests passed:

$ OPENSHIFT_SKIP_EXTERNAL_TESTS=true openshift-tests run openshift/auth/external-oidc --run "ExternalOIDCWithUpstreamParity" --disable-monitor=legacy-cvo-invariants,legacy-test-framework-invariants --provider '{"type":"aws","region":"us-east-2","zone":"us-east-2c","multizone":true,"multimaster":true}'

passed: (27m16s) 2026-03-25T10:23:30 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject authentication when userValidationRules evaluate to false"
passed: (27m24s) 2026-03-25T10:50:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should authenticate with CEL expression claim mappings, userValidationRules, and claimValidationRules"
passed: (26m34s) 2026-03-25T11:17:37 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when username expression produces value failing userValidationRules"
passed: (26m16s) 2026-03-25T11:43:57 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with CEL expression-based claim mappings should reject when groups expression produces value failing userValidationRules"
passed: (27m25s) 2026-03-25T12:11:29 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should authenticate successfully with custom discoveryURL, AND-logic userValidationRules, and mixed-type claimValidationRules"
passed: (26m45s) 2026-03-25T12:38:18 "[sig-auth][Suite:openshift/auth/external-oidc][Serial][Slow][Disruptive] [OCPFeatureGate:ExternalOIDCWithUpstreamParity] with claim-based mappings, discoveryURL, userValidationRules, and CEL claimValidationRules should reject tokens when CEL claimValidationRules evaluate to false

Prow CI jobs will also be added.

I noticed the BeforeAll and Ordered don't take effect. This is true for even the existing other external oidc tests. I'll investigate how to improve them.

CC @ShazaAldawamneh

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
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

@xingxingxia: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 1bcae59 link true /test verify

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.

Comment on lines +59 to +62
// TODO: remove this "if" when console bug https://redhat.atlassian.net/browse/OCPBUGS-78477 is fixed
if co.Name == "console" {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should fix this in console before merging this. This is shared logic used by more than our tests so this ends up making console operator settling ignored for every test that calls this.

@ShazaAldawamneh
Copy link
Contributor

Thanks for the comprehensive test coverage! The tests look great overall and
cover the main functional aspects of the ExternalOIDCWithUpstreamParity
feature gate.

However, I noticed we're missing some important validation tests for the
API-level constraints around prefixPolicy and prefix when using expressions.
These were part of the recent changes in
#2771

Could you please add the following test cases to ensure the validation rules
are properly enforced?

  1. Username prefixPolicy validation with expressions:
  • Test that prefixPolicy: Prefix is rejected when username.expression is set
  • Test that prefixPolicy: NoPrefix is allowed when username.expression is set
  • Test that omitting prefixPolicy is allowed when username.expression is set
  1. Groups prefix validation with expressions:
  • Test that a non-empty prefix value is rejected when groups.expression is set
  • Test that an empty string prefix: "" is allowed when groups.expression is set
  • Test that omitting prefix entirely is allowed when groups.expression is set

The expected behavior should match what we have in the integration tests at
config/v1/tests/authentications.config.openshift.io/ExternalOIDCWithUpstreamPa
rity.yaml
(see tests around lines 620-687).

Let me know if you need any clarification on these scenarios!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. vendor-update Touching vendor dir or related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants