Skip to content

refactor(gateway): move the sandbox identity provider interface to core - #6239

Open
shiju-nv wants to merge 1 commit into
ai-openshell:mainfrom
shiju-nv:refactor/6049-workload-identity-provider/shiju-nv
Open

shiju-nv wants to merge 1 commit into
ai-openshell:mainfrom
shiju-nv:refactor/6049-workload-identity-provider/shiju-nv

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

SandboxIdentityProvider is the interface the gateway's provider broker uses to get a signed assertion of a sandbox's identity. It lived in openshell-spiffe, which can't depend on core, so the trait carried an associated error type and every use set it to TokenGrantFailure. Its return type and method were also named after SPIFFE.

This moves the trait to openshell_core::sandbox_identity, returns TokenGrantFailure directly, and gives the return type and method neutral names. Core's interface now names no identity system. openshell-spire is still the only implementation, and it's the one place that says the assertion is a JWT-SVID. Behavior doesn't change.

It's groundwork for #6049. The per-sandbox identity work for local drivers extends this interface, and it's easier to review once the interface sits in core.

Related Issue

Part of #6049.

Changes

  • Move SandboxIdentityProvider from openshell-spiffe to openshell_core::sandbox_identity. The trait keeps its name and drops its associated Error type.
  • Rename the SPIFFE-specific parts of the interface. SandboxJwtSvid becomes SandboxIdentityAssertion, its spiffe_id field becomes identity, and fetch_jwt_svid becomes issue_assertion. The Debug redaction test moves with the type.
  • openshell-spire documents that the assertion it issues is a JWT-SVID for the sandbox's stable SPIFFE ID. Its Broker API calls and its verification don't change.
  • openshell-spiffe keeps SPIFFE ID mapping and claim parsing, and drops its async-trait dependency. Every tracked lockfile that resolves the crate loses that one edge.
  • In the gateway, the grant handler reads the renamed fields, and the imports come from core. Nothing else in the handler changes.
  • Update the crate READMEs and the architecture table in AGENTS.md.

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 Dec 4, 2026
@shiju-nv
shiju-nv force-pushed the refactor/6049-workload-identity-provider/shiju-nv branch from 6f851da to 5c39fba Compare December 4, 2026 16:05
SandboxIdentityProvider lived in openshell-spiffe, which cannot depend on core. The trait therefore carried an associated error type, and every use set it to TokenGrantFailure. Its return type and method were also named after SPIFFE: SandboxJwtSvid, its spiffe_id field, and fetch_jwt_svid.

Move the trait to openshell_core::sandbox_identity and return TokenGrantFailure directly. The interface now names no identity system: issue_assertion returns a SandboxIdentityAssertion with an identity field. openshell-spire documents that its assertion is a JWT-SVID for the sandbox's stable SPIFFE ID. openshell-spiffe keeps SPIFFE ID mapping and claim parsing, and no longer needs async-trait.

Behavior is unchanged. SPIRE stays the only implementation.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the refactor/6049-workload-identity-provider/shiju-nv branch from 5c39fba to c12bb51 Compare December 4, 2026 16:29
@shiju-nv shiju-nv added area:platform SDKs, CLIs, APIs, gateway infrastructure, persistence, configuration, and session management. topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:authnz Authentication, authorization, identity, sessions, credential protection, and policy integrity. labels Dec 4, 2026
@shiju-nv
shiju-nv marked this pull request as ready for review December 4, 2026 21:03

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

area:platform SDKs, CLIs, APIs, gateway infrastructure, persistence, configuration, and session management. state:accepted A maintainer decided OpenShell should pursue this issue topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:authnz Authentication, authorization, identity, sessions, credential protection, and policy integrity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant