Skip to content

test/sts: add test for global OIDC provider fallback and precedence#750

Open
kchheda3 wants to merge 1 commit into
ceph:masterfrom
kchheda3:wip-global-oidc-test
Open

test/sts: add test for global OIDC provider fallback and precedence#750
kchheda3 wants to merge 1 commit into
ceph:masterfrom
kchheda3:wip-global-oidc-test

Conversation

@kchheda3
Copy link
Copy Markdown

Add test_assume_role_with_global_oidc_provider_local_override() which validates three scenarios:

  1. AssumeRoleWithWebIdentity succeeds via global OIDC provider when no account-level provider exists (fallback path)
  2. Account-level provider with wrong client_id causes failure, proving account-level takes precedence over global (client_id validation is always enforced regardless of TLS)
  3. After deleting account-level provider, fallback to global resumes

Requires the test task (qa/tasks/s3tests.py) to pre-create a global OIDC provider via 'radosgw-admin oidc-provider create' (done by qa/tasks/s3tests.py in the companion ceph PR #68850)

Verified locally with Keycloak 11.0.

…y scope

Add two tests for global OIDC provider support:

test_assume_role_with_global_oidc_provider_local_override:
  Validates global fallback and account-level precedence in three phases:
  1. No account provider → global fallback succeeds
  2. Account provider with wrong client_id → fails (precedence)
  3. Delete account provider → global fallback resumes

test_assume_role_with_global_oidc_trust_policy_scope:
  Validates trust policy principal scope enforcement:
  1. Bare URL + global provider → succeeds
  2. Mismatched tenant ARN + global provider → denied
  3. Correct ARN + account provider → succeeds
  4. Bare URL + account provider (empty tenant) → succeeds
@kchheda3 kchheda3 force-pushed the wip-global-oidc-test branch from 803f80a to d698119 Compare May 21, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants