Repository navigation
feat(providers): add a Gateway-signed alternative to SPIFFE for token_grant - #5479
Draft
freeqaz-openai wants to merge 4 commits into
Draft
freeqaz-openai wants to merge 4 commits into
freeqaz-openai wants to merge 4 commits into
Conversation
…t assertions Signed-off-by: Free Wortley <freeqaz@openai.com>
Expose a binding-scoped handle to the workload and resolve it only for an admitted, inspected request. Let the existing header rewriter preserve the client-selected authentication format. Exercise the path with stock Git and a custom API header. Signed-off-by: Free Wortley <freeqaz@openai.com>
Signed-off-by: Free Wortley <freeqaz@openai.com>
Share unused unary RPCs across test gateways while keeping the production trait exhaustive. Exercise grant compatibility in existing import, lint, and endpoint tests. Reuse TLS identities and relay setup for the stock Git and named-header cases. Signed-off-by: Free Wortley <freeqaz@openai.com>
Contributor
Author
|
Could an OpenShell maintainer triage #5473 for this opt-in assertion source? The PR issue-acceptance check is waiting for a maintainer decision on that issue. SPIFFE remains the default. There is now a downstream installed integration test PR for the first Git fetch, withdrawal, and continuation of the same conversation. The local wire test has passed with stock Git and a PostgreSQL-backed token service. The installed qualification is still in progress. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Today a supervisor authenticates a
token_grantrequest with a SPIFFE JWT-SVID. This adds a second option for OAuthclient_credentials: the token service can trust a JWT signed by the OpenShell Gateway. SPIFFE remains the default and is still used fortoken_exchange.This lets a sandbox start with an opaque handle and use stock Git or an API client on first authorized use, without a SPIFFE installation. The Gateway signs the assertion, the token service issues the access token, and the supervisor places it in the upstream request.
Request flow
sequenceDiagram participant C as Sandbox client participant S as Supervisor participant G as OpenShell Gateway participant T as OAuth token service participant U as Upstream API C->>S: HTTPS request with handle in configured header S->>S: Admit route and run configured authorization hooks opt No reusable access token S->>G: Request assertion for attached provider credential G->>G: Check sandbox, provider ID, credential and registered endpoint G-->>S: Short-lived JWT addressed to the token endpoint S->>T: OAuth client credentials grant with signed JWT T-->>S: Scoped access token end S->>U: Forward admitted request with access token in headerDesign choices
assertion_source: openshell_gatewayin the grant profile.auth_style: placeholderwhen the client supplies the header format.Assertion source and placement are independent. Existing automatic Bearer and raw-header injection still work. Placeholder placement is opt-in for one declared header on inspected REST traffic.
Verification
bfa68b208and4eb83b932. SPIFFE create/update worked in both directions. The old CLI could not overwrite a Gateway-assertion profile on the new Gateway. The new CLI refused to create or update one on the old Gateway. All three refusals preserved stored state. The laterd32c9c2cleanup changed test code and test dependencies only.Related issue
Closes #5473