Skip to content

Document injecting actor JWTs with egress policies - #2596

Merged
Max Smythe (maxsmythe) merged 2 commits into
agent-substrate:mainfrom
thompsonmax:actor-jwt-docs
Oct 19, 2026
Merged

Max Smythe (maxsmythe) merged 2 commits into
agent-substrate:mainfrom
thompsonmax:actor-jwt-docs

Conversation

@thompsonmax

Copy link
Copy Markdown
Collaborator

Part of #1660.

  • docs/egress-credential-injection.md gains an Actor JWTs section: the actorJwt policy fields and their limits, the claims a minted token carries, and how long the gateway reuses a token before minting another.
  • The outcome table gains rows for actor JWT entries: 403 when the actor no longer exists, 503 when ateapi is unreachable, and 500 (Envoy) or 403 (agentgateway) for any other mint failure. The intro and "How it works" mention the ateapi path.
  • An operational note says tokens follow the actor's name, so a recreated actor can get its predecessor's token until the refresh point.

The metrics from #2317 aren't mentioned, since they aren't on main yet.

Testing: docs only. The YAML example parses with kubectl ate's policy parser, and each documented limit matches ateapi's validation, both checked with throwaway tests.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@yufan-su Yufan Su (yufan-su) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

nit: maybe also update the digram to highlight that path? right now it is embedded in text

@thompsonmax

Copy link
Copy Markdown
Collaborator Author

LGTM,

nit: maybe also update the digram to highlight that path? right now it is embedded in text

done

The egress credential injection guide now covers actorJwt entries: the
policy fields and their limits, the claims a minted token carries, how
long the gateway reuses a token, the outcome of each mint failure, and
that tokens follow the actor's name until they refresh.
The diagram showed only the credential provider path, so the ateapi mint
for actorJwt entries was described only in the text below it. Add ateapi
and label each of the gateway's outbound calls with the field that selects
it.
jiayimeow pushed a commit to jiayimeow/substrate that referenced this pull request Oct 19, 2026
…#2256)

Part of agent-substrate#1660.

- The `egresscredinject` suite's echo-origin rules, http and https, now
also replace `X-Actor-Token` with an actor JWT. The test decodes the
token the in-cluster echo server sends back and checks `sub`, `aud`, the
lifetime (`exp - iat`) and the `actor.ate.dev` claim, including the
actor's UID. It also fails if the token is the `worker-for-actor` kind.
- A fetch without the header must reach the echo server without
`X-Actor-Token`, matching the existing check for `Authorization`.
- `assertEchoedAuthorization` is now `assertEchoedHeaders`, so one fetch
checks both headers.

The test doesn't check the JWT's signature. That needs the published key
set, which the OIDC discovery e2e (agent-substrate#2606) covers.

Testing: lint and vet pass. The previous head passed e2e in CI on both
sandbox classes; this rebase only changes an import path for the module
rename.

- [ ] Tests pass
- [ ] Appropriate changes to documentation are included in the PR (the
user guide is agent-substrate#2596)

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 19, 2026
Merged via the queue into agent-substrate:main with commit 1660d59 Oct 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/identity area/network area/security Security related issue/pr kind/docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants