Skip to content

Add identity injection and header forwarding for selfhosted deployments#263

Draft
mhotan wants to merge 9 commits intomainfrom
mike/selfhosted-identity-injection
Draft

Add identity injection and header forwarding for selfhosted deployments#263
mhotan wants to merge 9 commits intomainfrom
mike/selfhosted-identity-injection

Conversation

@mhotan
Copy link
Contributor

@mhotan mhotan commented Mar 3, 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

🤖 Generated with Claude Code

Base automatically changed from mike/selfhosted-auth to main March 3, 2026 01:35
@aviator-app
Copy link
Contributor

aviator-app bot commented Mar 3, 2026

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch 3 times, most recently from a85eb04 to ced40bd Compare March 3, 2026 21:20
@mhotan mhotan changed the base branch from main to mike/run-102-consolidate-namespace-mapping March 3, 2026 21:20
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from ced40bd to 6ee27ac Compare March 4, 2026 02:59
@mhotan mhotan changed the base branch from mike/run-102-consolidate-namespace-mapping to mike/fix-crs-rbac-and-proxy-configmap March 4, 2026 03:00
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 6ee27ac to 33d27f6 Compare March 4, 2026 03:33
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch from c280b5f to 404a2d4 Compare March 4, 2026 03:33
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 33d27f6 to 1f37114 Compare March 4, 2026 04:42
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch from 404a2d4 to 138eb97 Compare March 4, 2026 04:42
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 1f37114 to 6402ff6 Compare March 4, 2026 06:16
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch from 138eb97 to a5d2b1e Compare March 4, 2026 06:16
@mhotan mhotan marked this pull request as draft March 4, 2026 06:46
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch from a5d2b1e to 5bc7b0d Compare March 4, 2026 07:11
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 6402ff6 to f2f73d6 Compare March 4, 2026 07:11
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch from 5bc7b0d to d0b5db6 Compare March 4, 2026 16:26
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch 2 times, most recently from 1396ca8 to a3f2d9f Compare March 4, 2026 16:36
@mhotan mhotan force-pushed the mike/fix-crs-rbac-and-proxy-configmap branch 2 times, most recently from 1c8ab57 to c49e3af Compare March 4, 2026 16:43
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from a3f2d9f to 3daef12 Compare March 4, 2026 16:43
Base automatically changed from mike/fix-crs-rbac-and-proxy-configmap to main March 4, 2026 16:45
mhotan and others added 2 commits March 10, 2026 17:58
Add `namespace_mapping.template` to aws and fully-selfhosted test values
to verify the canonical value cascades correctly to all service configmaps
(clusterresourcesync, executor, propeller, operator).

Azure test values already set per-service overrides (`config.namespace_config`,
`config.operator.org`), which confirms backward compat (overrides take
precedence over the top-level value).

towards RUN-102

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mhotan and others added 7 commits March 10, 2026 17:58
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mhotan mhotan force-pushed the mike/selfhosted-identity-injection branch from 3daef12 to e696de0 Compare March 11, 2026 00:58
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