Repository navigation
Send the calling role to services that ask for it: forward_role (150) - #151
Conversation
A service with "forward_role": true gets X-Keyring-Role: <role> on every call. A caller-sent X-Keyring-Role is dropped on every call, so it cannot be forged through the keyring. Off by default; refused on services that forward nothing. Set by access.json or pasted settings (connect, edit); a form edit keeps it; the service page shows it and the edit audit names it.
|
test-check prove: inconclusive for both new tests (they use the new ForwardRole field, so the old code does not compile with them; the other two names listed are untouched tests in edited files). Manual mutants at 5670b33, each restored after: (1) drop |
Decision: Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Closes 150. Jarvis 488215: macserve cannot tell which agent cancels jobs: through the dev2306 relay every caller reaches it from the Studio with the owner's token.
Change
policy.Service.ForwardRole("forward_role": true): the proxy setsX-Keyring-Role: <role>on the upstream request.outboundHeaderdrops a caller-sentX-Keyring-Roleon every call (any service), so the header cannot be forged through the keyring; a service without the flag never receives one.gcloud-login,egress-proxy.forward_rolewhen it changes.Evidence
TestForwardRoleNamesTheCallerAndCannotBeForged: caller sendsx-keyring-role: owner; upstream sees exactly[phobos]; without the flag upstream sees none; minisign-sign/egress-proxy with the flag fail validation.TestForwardRoleSetByPasteKeptByFormEdit: paste sets it, audit names it, page shows it, form edit keeps it.