feat(delegation): RFC 8693 actor tokens + gateway/workload subjects.#131
Draft
terylt wants to merge 2 commits into
Draft
feat(delegation): RFC 8693 actor tokens + gateway/workload subjects.#131terylt wants to merge 2 commits into
terylt wants to merge 2 commits into
Conversation
Signed-off-by: Teryl Taylor <terylt@ibm.com>
Signed-off-by: Teryl Taylor <terylt@ibm.com>
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
Foundational slice for multi-principal delegation. A
delegate(...)step cannow name whose identity the minted credential speaks for and who is
acting, covering the on-behalf-of, autonomous-agent, and gateway-as-itself
cases. More to come as we finish the remaining use cases.
What's here
subject: user | client | caller_workload | gatewayon a delegation step. The minted token's attribution (
DelegationMode) isderived from the subject, never declared separately — so a route can't claim
on-behalf-of-user while handing over a workload SVID.
actor: caller_workloadattaches the caller's SVIDas the
actor_token, so the minted token recordsactalongsidesub(validated and signed by the IdP).
subject: gatewayswitches to aclient_credentialsgrant (the gateway calls as itself); no inbound credential required.
role: caller_workloadresolver validatesJWT-SVIDs into
caller_workload.*, stashed asTokenKind::SpiffeJwt;non-SPIFFE tokens are rejected.
DelegationKeynow includes the calling workload, sotokens minted for one agent can't be served to another once cross-request
caching lands.
TokenRole::Workload→CallerWorkload(serdealias = "workload"keeps existing configs working), disambiguating the caller fromthe gateway.
subject:/actor:keysand the three attributions.
Not in this PR (follow-ups)
subject_token(subject: gateway+actor: caller_workload, so the backend sees both) — needs a gateway-credentialsource.
Verification
884 tests passing;
fmtandclippy -D warningsclean. New behavior is coveredby e2e tests, each mutation-checked (broke the code, confirmed the test fails).