Skip to content

feat(gateway): verify supervisor workload assertions for provider grants - #6061

Open
shiju-nv wants to merge 1 commit into
feat/6049-gateway-provider-launch/shiju-nvfrom
feat/6049-gateway-verified-grants/shiju-nv
Open

shiju-nv wants to merge 1 commit into
feat/6049-gateway-provider-launch/shiju-nvfrom
feat/6049-gateway-verified-grants/shiju-nv

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Authorize a dedicated supervisor's provider token grant from its signed session and two JWT-SVIDs, then perform the OAuth exchange in the gateway. This is layer 4 of 8 in the stack that starts at #6050. No gateway setting enables the mode yet.

Related Issue

Part of #6049

Changes

  • The gateway derives the expected stable and launch SPIFFE IDs from the session's sandbox and runtime generation. It verifies both signatures against the Workload API trust bundle and requires the exact subject, a single audience, and an unexpired token for each.
  • The session and the provider attachment are rechecked before each OAuth exchange and before a cached or new token is returned. A stopped sandbox or a superseded generation is denied on cache hits too.
  • The token cache key includes the generation, the attachment epoch, the provider revision, and the resolved exchange subject. Token lifetime is capped by the session, both assertions, and the subject expiry.
  • Requests, cache misses, and OAuth exchanges have separate per-sandbox limits, and the gateway-wide cap scales with them, so warm grants are served while other grants wait on OAuth.
  • A token service timeout is shared with queued requests whatever status its response headers carried.
  • The stored token-exchange subject stays in the gateway, and the direct subject-exchange RPC is closed while this mode is configured.

Brokered Kubernetes grants share this handler and gain two of its checks: a provider that is detached and reattached during an exchange rejects the in-flight token, and a credential driver's subject expiry caps how long a token is served.

Release Notes

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 28, 2026
@shiju-nv
shiju-nv changed the base branch from main to feat/6049-gateway-provider-launch/shiju-nv November 28, 2026 20:53
@shiju-nv
shiju-nv added this pull request to stack #6060 November 28, 2026 20:53
@shiju-nv
shiju-nv force-pushed the feat/6049-gateway-verified-grants/shiju-nv branch from cdb376e to 2191f10 Compare November 28, 2026 21:43
@shiju-nv
shiju-nv force-pushed the feat/6049-gateway-verified-grants/shiju-nv branch from 2191f10 to 00c7684 Compare November 28, 2026 23:36
Authorize a dedicated supervisor's provider grant from its signed session
and two JWT-SVIDs, then perform the OAuth exchange in the gateway.

- The gateway derives the expected stable and launch SPIFFE IDs from the
  session's sandbox and runtime generation. It verifies both signatures
  against the Workload API trust bundle and requires the exact subject,
  a single audience, and an unexpired token for each.
- The session and the provider attachment are rechecked before each
  OAuth exchange and before a cached or new token is returned. A stopped
  sandbox or a superseded generation is denied on cache hits too.
- The token cache key includes the generation, the attachment epoch, the
  provider revision, and the resolved exchange subject. Token lifetime
  is capped by the session, both assertions, and the subject expiry.
- Requests, cache misses, and OAuth exchanges have separate per-sandbox
  limits, and the gateway-wide cap scales with them, so warm grants are
  served while other grants wait on OAuth.
- A token service timeout is shared with queued requests whatever status
  its response headers carried.
- The stored token-exchange subject stays in the gateway, and the direct
  subject-exchange RPC is closed while this mode is configured.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the feat/6049-gateway-verified-grants/shiju-nv branch from 00c7684 to 064d09f Compare November 29, 2026 04:35

This branch has not been deployed

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

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant