Skip to content

hardening: vend only after sts:GetCallerIdentity - #70

Draft
sorah wants to merge 2 commits into
hardening/headlessfrom
hardening/caller-identity
Draft

sorah wants to merge 2 commits into
hardening/headlessfrom
hardening/caller-identity

Conversation

@sorah

@sorah sorah commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Implements docs/specs/009-caller-identity.md.

  • gate 2: before vending, a hardened agent calls sts:GetCallerIdentity with an explicitly configured client (us-east-1, https://sts.amazonaws.com, system roots, 15 s timeout, no AWS_* or config files) and evaluates the UseCredentials action with context.caller
  • built-in always-on policies: builtin-use-credentials and builtin-caller-account-mismatch (declared account != real account refuses)
  • credentials are cached with their caller only after gate 2 permits; STS failures fail closed with nothing cached
  • AuthorizationError gains gate and caller_arn; gate-2 refusals print refused at use-credentials: … with the identity
  • build.rs reruns on proto changes

Verified in Docker (26 checks) with a fake credential server and fake STS behind a test CA: STS ignores client-side AWS_ENDPOINT_URL_STS/AWS_REGION/AWS_PROFILE, cache hits skip STS, account mismatch refused, STS errors fail closed, unhardened agents never call STS. Gate-2 prompts need user policy (011) and are unit-tested only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM

sorah and others added 2 commits October 31, 2026 09:25
A hardened agent now asks STS who fetched credentials belong to, once
per credential set, and decides again with the real caller (gate 2)
before every vend, including from the cache. Role names on custom
servers can be opaque, so only the credentials say which account they
open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
@sorah
sorah added this pull request to stack #63 October 31, 2026 00:26
@sorah sorah changed the title hardening/caller identity hardening: vend only after sts:GetCallerIdentity Oct 31, 2026

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant