Update Kit credential enforcement for phase lists #228

Closed
opened 2026-10-27 13:35:28 +00:00 by sam · 0 comments
Owner

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

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_
sam added the hightask labels 2026-10-27 13:35:28 +00:00
sam self-assigned this 2026-10-27 13:35:28 +00:00
sam closed this issue 2026-10-27 13:35:28 +00:00
sam added a new dependency 2026-11-14 14:45:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#228