Skip to content

feat(compute): add provider workload identity contract - #6050

Open
shiju-nv wants to merge 1 commit into
mainfrom
shiju-nv/sandbox-spiffe-provider-identity
Open

shiju-nv wants to merge 1 commit into
mainfrom
shiju-nv/sandbox-spiffe-provider-identity

Conversation

@shiju-nv

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

Copy link
Copy Markdown
Collaborator

Summary

Layer 1 of a stack of 8 that gives each sandbox its own SPIFFE identity for OAuth provider grants (#6049). This layer adds the contract the gateway and a compute driver share. Nothing uses it yet.

Why two identities

The stable identity, <prefix>/gateway/<gateway-id>/sandbox/<sandbox-id>, is the subject an OAuth provider authorizes. It stays the same across restarts.

That alone is not enough. A supervisor left over from an earlier start of the same sandbox would match the same issuer registration as its replacement. So each start also has a launch identity: the stable ID followed by /launch/<runtime generation>. The gateway already issues a new runtime generation on create, start, resume and automatic restart, so the launch identity changes exactly then, and nothing new is stored.

What a driver that advertises the capability does

  • It gives each dedicated supervisor a Workload API socket.
  • It marks the supervisor with the launch SPIFFE ID from its launch bundle, so an issuer can attest that one supervisor.
  • It replaces the supervisor when a start names a different launch.

StartSandbox and StopSandbox keep their existing contract and stay idempotent. The compute driver proto and the driver SDK are unchanged.

An earlier version of this PR added an ordered start protocol with a driver-side journal, so that a launch identity could never start a second process. It is gone. The gateway already refuses every supervisor session except the current one, so the rule here is simpler: one supervisor per sandbox at a time.

Related Issue

Part of #6049

Changes

  • Capability openshell.compute.provider-workload-identity.
  • The launch bundle can carry provider_spiffe_id and provider_launch_spiffe_id.
  • validate_provider_launch_identity lets a driver check that both IDs belong to the sandbox and generation it is starting.
  • ConfigureRequest.verified_provider_workload_identity tells a managed driver that the mode is selected.
  • The label openshell.ai/provider-launch-spiffe-id and the supervisor probe constants, shared by the supervisor and the drivers.
  • openshell-spiffe builds the launch SPIFFE ID.
  • Other crates only initialize the new fields.

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
@github-actions

Copy link
Copy Markdown

@shiju-nv
shiju-nv force-pushed the shiju-nv/sandbox-spiffe-provider-identity branch from a9f4775 to 9ae1e10 Compare November 28, 2026 13:06
@shiju-nv
shiju-nv marked this pull request as draft November 28, 2026 13:07
@shiju-nv
shiju-nv force-pushed the shiju-nv/sandbox-spiffe-provider-identity branch 26 times, most recently from 5d100ba to 9ea7a4a Compare November 28, 2026 16:21
@shiju-nv
shiju-nv force-pushed the shiju-nv/sandbox-spiffe-provider-identity branch from 9ea7a4a to b8035a1 Compare November 28, 2026 20:33
@shiju-nv shiju-nv changed the title feat(spiffe): verify per-sandbox provider identity across drivers feat(compute): add ordered provider start contract and launch journal Nov 28, 2026
@shiju-nv
shiju-nv added this pull request to stack #6060 November 28, 2026 20:43
@shiju-nv
shiju-nv marked this pull request as ready for review November 28, 2026 20:55
@shiju-nv
shiju-nv force-pushed the shiju-nv/sandbox-spiffe-provider-identity branch 2 times, most recently from b68c1cf to dec8cec Compare November 28, 2026 23:36
Add the contract that the gateway and a compute driver share to give
each dedicated supervisor a SPIFFE identity for provider grants.

- A capability, openshell.compute.provider-workload-identity, for a
  driver that gives each dedicated supervisor a Workload API socket and
  marks it with its launch SPIFFE ID.
- The launch bundle can carry the stable sandbox SPIFFE ID and the
  launch SPIFFE ID. The launch ID is the stable ID followed by
  /launch/<runtime generation>, so it changes when the gateway issues a
  new generation.
- validate_provider_launch_identity lets a driver check that both IDs
  belong to the sandbox and generation it is starting.
- ConfigureRequest gains a flag that tells a managed driver the mode is
  selected.
- Label and probe constants shared by the supervisor and the drivers.

Nothing uses the contract yet. Existing call sites only initialize the
new fields.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the shiju-nv/sandbox-spiffe-provider-identity branch from dec8cec to 1358794 Compare November 29, 2026 04:35
@shiju-nv shiju-nv changed the title feat(compute): add ordered provider start contract and launch journal feat(compute): add provider workload identity contract Nov 29, 2026

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