Update Kit credential enforcement for phase lists #228
Notifications
Due Date
No due date set.
Blocks
#1299 External agent harnesses (Kit v3)
sam/archie
Reference: sam/archie#228
Reference in new issue
Block a user
spec.Credential.Phase changes from string to spec.Phases and supports install plus runtime. internal/infrastructure/egress/credentials.go compileInjections and oauth.go compileOAuth still compare Phase to a string and store a single runtime boolean. Migrate phase membership and enforcement for API-key injection, OAuth forwarding, sentinels, and credential files. Preserve scalar descriptor compatibility and grant revocation; real credentials remain outside agent containers.
Acceptance criteria
Install-only, runtime-only, and dual-phase declarations behave correctly across phase transition for API keys and OAuth; requests outside declared phases fail closed; revoked or unbound grants cannot forward tokens; extend existing security behavior tables and pass task check.
Notes
Implemented in
be31522e. API-key and OAuth rules retain phase lists and enforce membership; declared token endpoints refuse requests outside their phase before forwarding. Hook sentinel variables and rendered OAuth credential files are phase-scoped; install files are present before install hooks and removed before runtime. TestCredentialPhaseEnforcement covers scalar phases, both phases and revoked grants; TestKitCredentialExposureByPhase covers hook/harness environment and file placement. Docker TestKitRuntimeDiscovery checks install-file availability and removal before startup. Final task check and focused race tests passed.Close reason
API migration or audit completed in be31522e; task check, Docker acceptance and focused race tests passed.
Imported from beads
archie-core-egkf.18· GitHub #1516 · type task · priority P1 · created 2026-10-09 · closed 2026-10-09