Skip to content

feat(cp): runtime_context — surface effective managing identity (ADR #19 slice 1) - #20

Merged
brettchien merged 1 commit into
mainfrom
feat/runtime-context-slice1
Aug 13, 2026
Merged

feat(cp): runtime_context — surface effective managing identity (ADR #19 slice 1)#20
brettchien merged 1 commit into
mainfrom
feat/runtime-context-slice1

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

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 STS GetCallerIdentity + resolved region + an env-derived source hint, mapped to a generic, read-only RuntimeContext (principal, principal_kind role-vs-static-user, scope=account, location=region, source, caller_id). Vendor call (STS) stays in the seam crate; the type is generic.
  • oab-mcp gains a read-only runtime_context tool exposing it (8th tool; catalog test + module doc updated).

Why: today's deploy_list AccessDenied was a silent credential fallback — a static [default] profile (user/brett.chien, wrong account) shadowed the intended task role, discovered only via a manual aws sts get-caller-identity. This makes "who am I acting as, against what account?" a one-call answer; principal_kind alone (user vs role) flags that class of fallback.

Scope / notes:

  • source is 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).
  • No changes to vendored oabctl. Adds aws-sdk-sts to studio-cp.
  • Ownership heads-up: touches studio-cp (control-plane) and oab-mcp (MCP) — please sanity-check the seam placement of observe_identity.

Verification: CI (build/test --workspace) runs on this PR; local full builds OOM on aws-sdk-ec2 per 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

…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
brettchien marked this pull request as ready for review August 13, 2026 04:13
@brettchien
brettchien merged commit 5d0937b into main Aug 13, 2026
3 checks passed
@brettchien
brettchien deleted the feat/runtime-context-slice1 branch August 13, 2026 04:13
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