feat(cp): runtime_context — surface effective managing identity (ADR #19 slice 1) - #20
Merged
Merged
Conversation
…ADR slice 1) studio-cp::observe_identity runs STS GetCallerIdentity and returns a generic, read-only RuntimeContext (principal / principal_kind role-vs-user / scope=account / location=region / source hint / caller_id). oab-mcp exposes it as a new read-only `runtime_context` MCP tool. First slice of ADR #19 (Per-Fleet managing identity) — observability only, no authz, no config/switch/UI yet. Would have surfaced the deploy_list static-default-profile fallback (user/... vs assumed-role/...) at a glance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brettchien
marked this pull request as ready for review
August 13, 2026 04:13
This was referenced Aug 13, 2026
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.
Drafted by Orca (
ecs-claude) — flagging authorship (shared GitHub identity across the fleet).First implementation slice of ADR #19 (Per-Fleet managing identity). Observability only — no authz, no config/switch/UI yet.
What:
studio-cp::observe_identity(&SdkConfig) -> RuntimeContext— a live STSGetCallerIdentity+ resolved region + an env-derived source hint, mapped to a generic, read-onlyRuntimeContext(principal,principal_kindrole-vs-static-user,scope=account,location=region,source,caller_id). Vendor call (STS) stays in the seam crate; the type is generic.oab-mcpgains a read-onlyruntime_contexttool exposing it (8th tool; catalog test + module doc updated).Why: today's
deploy_listAccessDeniedwas a silent credential fallback — a static[default]profile (user/brett.chien, wrong account) shadowed the intended task role, discovered only via a manualaws sts get-caller-identity. This makes "who am I acting as, against what account?" a one-call answer;principal_kindalone (uservsrole) flags that class of fallback.Scope / notes:
sourceis a best-effort hint inferred from env (not authoritative — the SDK doesn't expose which chain provider won); richer provenance is later work (ADR §5).oabctl. Addsaws-sdk-ststostudio-cp.studio-cp(control-plane) andoab-mcp(MCP) — please sanity-check the seam placement ofobserve_identity.Verification: CI (
build/test --workspace) runs on this PR; local full builds OOM onaws-sdk-ec2per the ci.yml note, so I'm relying on CI. Next slices (per ADR): FleetBinding config + active context switch (parameterize the sidecar's resolution), then the desktop panel +IdentityMismatch.Relates to #19.
🤖 Generated with Claude Code