Skip to content

Add identity injection and header forwarding for selfhosted deployments#250

Closed
mhotan wants to merge 3 commits intomike/selfhosted-authfrom
mike/selfhosted-identity-injection
Closed

Add identity injection and header forwarding for selfhosted deployments#250
mhotan wants to merge 3 commits intomike/selfhosted-authfrom
mike/selfhosted-identity-injection

Conversation

@mhotan
Copy link
Copy Markdown
Contributor

@mhotan mhotan commented Feb 22, 2026

Summary

Adds identity injection configuration and auth header forwarding for self-hosted deployments.

  • Add commented-out _identityInjection YAML anchor with default claim-to-annotation/env-var mappings for both AWS and GCP selfhosted values
  • Document access token claim requirement — identity injection reads claims from OAuth2 access tokens, not ID tokens; IdPs like Okta need explicit RESOURCE claim configuration
  • Forward identity headers (X-User-Subject, X-User-Claim-Identitytype, X-User-Claim-Preferred-Username) from /me auth subrequest to upstream services via auth-response-headers annotation

Identity injection mappings (commented out, opt-in)

  • preferred_usernameunion.ai/created-by annotation
  • emailunion.ai/user-email annotation
  • subUNION_USER_SUBJECT env var
  • preferred_usernameUNION_USER_EMAIL env var

Related PRs

Test plan

  • Uncomment identity injection anchor and verify helm template renders correctly
  • Deploy with identity injection enabled and verify pod annotations are set
  • Verify X-User-* headers are forwarded through nginx to upstream services

@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 28ee7df to 0fa2cc2 Compare February 27, 2026 02:05
@mhotan mhotan force-pushed the mike/selfhosted-auth branch 2 times, most recently from b3c9d83 to ee5c015 Compare February 28, 2026 00:56
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch 3 times, most recently from f0d9c7a to af9a340 Compare February 28, 2026 02:12
@mhotan mhotan changed the title Add identity injection config to selfhosted-intracluster values Add identity injection and header forwarding for selfhosted deployments Feb 28, 2026
mhotan and others added 3 commits February 27, 2026 18:20
Adds commented-out identity injection config that maps OAuth/OIDC claims
to pod annotations and environment variables. Uses YAML anchors to define
the mapping once and reference it for both flyteadmin and executions
configmaps.

Includes a new selfhosted-intracluster test with generated golden file
so reviewers can inspect the rendered configmap output.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add comments explaining that identity injection reads from the access
token, not the ID token. Many IdPs (e.g. Okta) require explicit
authorization server configuration to include claims like
preferred_username in access tokens.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The V2 UI authenticates via cookies (credentials: 'include'), not
Authorization headers. Nginx validates auth by calling /me, which
returns X-User-Subject in response headers, but auth-response-headers
only forwarded Set-Cookie — identity headers were silently dropped.

This caused ResolveCallerSubject to return empty, resulting in
"Unknown Owner" for all V2 UI-initiated runs (FAB-92).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@mhotan mhotan force-pushed the mike/selfhosted-auth branch from 04fb019 to e454af1 Compare February 28, 2026 02:20
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from af9a340 to 6355b74 Compare February 28, 2026 02:20
@mhotan mhotan closed this Mar 2, 2026
@mhotan mhotan deleted the mike/selfhosted-identity-injection branch March 2, 2026 19:51
@mhotan mhotan restored the mike/selfhosted-identity-injection branch March 2, 2026 19:53
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