Skip to content

spec(security): SSO/JWT authentication migration#1569

Draft
jsell-rh wants to merge 2 commits into
mainfrom
jsell/spec/sso-authentication
Draft

spec(security): SSO/JWT authentication migration#1569
jsell-rh wants to merge 2 commits into
mainfrom
jsell/spec/sso-authentication

Conversation

@jsell-rh
Copy link
Copy Markdown
Contributor

Summary

  • Defines desired state for migrating from OpenShift OAuth proxy to direct SSO/JWT authentication
  • BFF pattern: Next.js acts as OIDC confidential client, browser gets httpOnly session cookie
  • K8s impersonation: backend SA + Impersonate-User/Group preserves all existing RBAC enforcement without cluster OIDC federation
  • Dual-path auth: JWT validation first, K8s TokenReview fallback for API keys
  • Feature-flagged migration for incremental rollout across environments
  • Supersedes ADR-0002 (raw token passthrough → impersonation)

Files

File Purpose
specs/security/sso-authentication.spec.md Behavioral spec: 12 requirements, 30 scenarios
workflows/security/sso-migration.workflow.md Implementation guide: consumer map, RBAC manifests, backend flow

Critic pass findings addressed

  • SSAR cache key includes impersonated identity (prevents cross-user authz leak)
  • serviceaccounts added to impersonate RBAC (required for API key flows)
  • API Key Authentication requirement added (dual-path: JWT → TokenReview)
  • E2E test auth requirement added (server-side injection, no browser-exposed tokens)
  • Implementation details moved from spec to workflow doc

Test plan

  • Review spec requirements against existing security spec (specs/security/security.spec.md)
  • Verify impersonation RBAC rules are sufficient for all backend handler patterns
  • Confirm SSAR cache key change doesn't regress performance
  • Validate claim mapping against actual Red Hat SSO token claims

🤖 Generated with Claude Code

Define desired state for migrating from OpenShift OAuth proxy to direct
SSO/JWT authentication. Key decisions:

- BFF pattern: Next.js as OIDC confidential client, browser gets session cookie
- K8s impersonation: backend SA + Impersonate-User/Group preserves RBAC
- Dual-path auth: JWT first, TokenReview fallback for API keys
- Feature-flagged migration for incremental rollout
- Supersedes ADR-0002 (raw token passthrough → impersonation)

Includes migration workflow with consumer impact map and implementation notes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for cheerful-kitten-f556a0 canceled.

Name Link
🔨 Latest commit 86ac6f9
🔍 Latest deploy log https://app.netlify.com/projects/cheerful-kitten-f556a0/deploys/6a037a00160dda0008ebccc3

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Important

Review skipped

Draft detected.

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 51092387-8f8d-4c5b-aabd-38ff79ed12e4

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
  • Commit unit tests in branch jsell/spec/sso-authentication
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch jsell/spec/sso-authentication

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.

Reference the IAM consolidation proposal (PR #1466) as the long-term
direction. This spec is Phase 1; future phases cover API keys → SSO
service accounts, runner → OIDC token exchange, DB RBAC reconciler,
and credential consolidation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant