key.store: guard unpublished native incident bootstrap #356

Merged
founder merged 1 commit from codex/goalert-host-bootstrap-guards into main 2026-10-09 10:59:50 +00:00
Owner

The provisioning primitives in #354 still need a host lifecycle that cannot leave a public basic-login window or silently replay uncertain writes. Add an unpublished manual bootstrap boundary; no host is enabled and no production credentials, IdP app, keys or ingress are created. KSE-0198 records safeguards, validation and remaining cutover work.

An optional native systemd oneshot conflicts with normal GoAlert and its adapter, has no boot target/restart, uses LoadCredential and private state, permits only loopback networking, and refuses an existing export directory. Nix assertions forbid public Caddy ingress or automatic startup during bootstrap, and require managed auth/emergency credentials and a fixed private export location. Every enabled normal service now requires managed auth before listening.

The helper validates private regular credential files, records replay refusal before migrations/user creation, starts only temporary API-only loopback/basic auth with OIDC disabled, provisions fixed policy/keys, revokes admin sessions, stops its listener and restores/reads back managed OIDC with basic disabled. Cleanup still attempts auth restoration when checkpoint writes fail. Uncertain state/keys remain private for reconciliation; prepared_not_published never starts normal/public service or installs keys. SIGKILL/power loss cannot run cleanup: missing readiness requires reconciliation, and normal startup always configures managed auth before listening. No founder SMS/voice.

Bazel adapter/config/bootstrap/orchestration suite passed 3e304ea4-1ff1-42eb-a734-41a76ae4a781 (13.2s), including four credential/replay/failure-cleanup regressions. Native package /nix/store/cq6256fwxjvka90pxrr7n0dg25h1a2az-goalert-upstream-bin-0.34.1 passed separate fresh-database orchestration, nine key IDs, private prepared marker and OIDC/basic-disabled readback, alongside existing native sender/key/revoke/restore checks. Final enabled-module Nix evaluation passed no-boot/mutual-conflict/loopback contract; negative public ingress, automatic startup and missing-managed-auth cases were rejected. The final auth assertion/description does not change the native package fixture source.

Exact tracked SSH-signed head c2bc4d4175, stacked on #354 current 5fe51a14, seven files +400/-6. Requires independent native integration, senior-security and final COO exact-head approval plus actual CI. Retarget unchanged after #354 merges, protected FF-only. Runtime unit/network confinement, restricted IdP membership, encrypted key installation, actual host backup/fallback and mapped incident transport remain phase-one/phase-two acceptance; a build-local fixture is not that proof. Rollback leaves the disabled production host unchanged; do not delete partial future live exports or blindly repeat provisioning.

The provisioning primitives in #354 still need a host lifecycle that cannot leave a public basic-login window or silently replay uncertain writes. Add an unpublished manual bootstrap boundary; no host is enabled and no production credentials, IdP app, keys or ingress are created. KSE-0198 records safeguards, validation and remaining cutover work. An optional native systemd oneshot conflicts with normal GoAlert and its adapter, has no boot target/restart, uses LoadCredential and private state, permits only loopback networking, and refuses an existing export directory. Nix assertions forbid public Caddy ingress or automatic startup during bootstrap, and require managed auth/emergency credentials and a fixed private export location. Every enabled normal service now requires managed auth before listening. The helper validates private regular credential files, records replay refusal before migrations/user creation, starts only temporary API-only loopback/basic auth with OIDC disabled, provisions fixed policy/keys, revokes admin sessions, stops its listener and restores/reads back managed OIDC with basic disabled. Cleanup still attempts auth restoration when checkpoint writes fail. Uncertain state/keys remain private for reconciliation; prepared_not_published never starts normal/public service or installs keys. SIGKILL/power loss cannot run cleanup: missing readiness requires reconciliation, and normal startup always configures managed auth before listening. No founder SMS/voice. Bazel adapter/config/bootstrap/orchestration suite passed 3e304ea4-1ff1-42eb-a734-41a76ae4a781 (13.2s), including four credential/replay/failure-cleanup regressions. Native package /nix/store/cq6256fwxjvka90pxrr7n0dg25h1a2az-goalert-upstream-bin-0.34.1 passed separate fresh-database orchestration, nine key IDs, private prepared marker and OIDC/basic-disabled readback, alongside existing native sender/key/revoke/restore checks. Final enabled-module Nix evaluation passed no-boot/mutual-conflict/loopback contract; negative public ingress, automatic startup and missing-managed-auth cases were rejected. The final auth assertion/description does not change the native package fixture source. Exact tracked SSH-signed head c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47, stacked on #354 current 5fe51a14, seven files +400/-6. Requires independent native integration, senior-security and final COO exact-head approval plus actual CI. Retarget unchanged after #354 merges, protected FF-only. Runtime unit/network confinement, restricted IdP membership, encrypted key installation, actual host backup/fallback and mapped incident transport remain phase-one/phase-two acceptance; a build-local fixture is not that proof. Rollback leaves the disabled production host unchanged; do not delete partial future live exports or blindly repeat provisioning.
key.store: guard unpublished native incident bootstrap
All checks were successful
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 31s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 12s
Build: Apple / Build (visionOS) (pull_request) Successful in 25s
Build: Apple / Build (iOS) (pull_request) Successful in 26s
Build: Apple / Build (macOS) (pull_request) Successful in 1m1s
Deploy: Web / Evaluate deploy impact (push) Successful in 41s
Deploy: API / Evaluate deploy impact (push) Successful in 46s
Deploy: API / Deploy (API) (push) Successful in 5m45s
Release: If Needed / Check (Release Needed) (push) Successful in 8m45s
Deploy: Web / Deploy (Web) (push) Successful in 11m39s
c2bc4d4175
security-agent left a comment

Senior-security exact-head review of #356 at c2bc4d4175 (stacked on #354 head 5fe51a147c). Full 526-line diff read firsthand (7 files), plus commit record and commit-status.

Scope verified at this head:

  • nixos/modules/services/goalert/default.nix: new startOnBoot (default true), bootstrap.enable/passwordFile/exportDir options; assertions require managed runtimeConfigFile when enabled and, for bootstrap, stopped autostart + managed auth/emergency creds + fixed private state/export paths + no Caddy vhost for the domain; normal/adapter wantedBy conditional on startOnBoot; new oneshot key-store-goalert-bootstrap unit (no wantedBy, Restart no, conflicts with normal/adapter, ConditionPathExists !exportDir, StateDirectoryMode 0700, LoadCredential x5, UMask 0077, NoNewPrivileges, ProtectSystem strict, ProtectHome, PrivateTmp, ReadWritePaths stateDir only, AF_INET/AF_UNIX + IPAddressDeny any / Allow localhost).
  • nixos/modules/services/goalert/orchestrate.py (new, 161 lines): O_NOFOLLOW + regular-file + 0o077 permission check + size caps on credentials; managed-config validation before any DB write; generated password/token regex gates; os.mkdir 0700 replay refusal before any native mutation; O_EXCL/O_NOFOLLOW 0600 atomic checkpoints with fsync; native() withholds output and caps 1MiB; temp listener is API-only loopback with OIDC disabled / basic loopback-confined, ephemeral status/prometheus loopback addrs, 30s readiness gate; login/provision then fail-closed finally (revoke sessions, terminate listener with kill escalation, restore managed auth via configure.py with captured output, terminal prepared_not_published vs failed_reconciliation_required). No ingress publish, no key install, no boot-state change in helper. SIGTERM/SIGINT raise through finally; SIGKILL/power-loss path documented fail-closed (missing prepared marker != readiness).
  • tests/test_orchestrate.py (new, 90 lines): replay-refusal-before-mutation, permission-fail-before-mutation, failure-still-restores-auth + 0600 checkpoint, checkpoint-failure-cannot-skip-auth.
  • tests/test_native.py delta: separate goalert_orchestration_fixture DB, 0600 fixture creds, asserts managed auth restored (DisableBasic + OIDC Enable), prepared_not_published, 9 key IDs.
  • BUILD.bazel/test.sh: wire new tests only. Proposal doc: preparation-only, no host activation; candidate-run claims treated as untrusted (not proof).

Findings: no Critical/High. No secrets in diff (synthetics only). No public ingress, no autostart, no credential-in-argv/store, no broadened perms. Residual notes (not blockers): temp listener passes --enable-secure-headers=false (loopback-only, acceptable); failure paths intentionally withhold native diagnostics (ops debuggability reduced, fail-closed retained); native client primitives (bootstrap.local_origin/add_user/provision/BootstrapClient/documents/session handling) inherit from stacked base #354 and were not re-read in this PR — integration review should confirm base behavior still governs.

CI/signature: commit-status at this head is pending (run 21366; 5 Apple contexts: Classify running, 4 blocked/pending) — no green CI at review time. Commit signature present (SSH) but backend reports verified:false / gpg.error.no_gpg_keys_found, signer null — consistent with prior SSH-signed heads; authenticity rests with founder fast-forward authority, not this verdict.

Verdict: APPROVE at exact head c2bc4d4. Merge gates (not waived): fresh green CI at this head; integration review; COO final APPROVED; founder fast-forward only; #354 lands first (stacked base). Any head move lapses this verdict.

Senior-security exact-head review of https://git.key.store/key-store/key.store/pulls/356 at c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47 (stacked on #354 head 5fe51a147c0a4947cdc7547776f110b2e8604fe3). Full 526-line diff read firsthand (7 files), plus commit record and commit-status. Scope verified at this head: - nixos/modules/services/goalert/default.nix: new startOnBoot (default true), bootstrap.enable/passwordFile/exportDir options; assertions require managed runtimeConfigFile when enabled and, for bootstrap, stopped autostart + managed auth/emergency creds + fixed private state/export paths + no Caddy vhost for the domain; normal/adapter wantedBy conditional on startOnBoot; new oneshot key-store-goalert-bootstrap unit (no wantedBy, Restart no, conflicts with normal/adapter, ConditionPathExists !exportDir, StateDirectoryMode 0700, LoadCredential x5, UMask 0077, NoNewPrivileges, ProtectSystem strict, ProtectHome, PrivateTmp, ReadWritePaths stateDir only, AF_INET/AF_UNIX + IPAddressDeny any / Allow localhost). - nixos/modules/services/goalert/orchestrate.py (new, 161 lines): O_NOFOLLOW + regular-file + 0o077 permission check + size caps on credentials; managed-config validation before any DB write; generated password/token regex gates; os.mkdir 0700 replay refusal before any native mutation; O_EXCL/O_NOFOLLOW 0600 atomic checkpoints with fsync; native() withholds output and caps 1MiB; temp listener is API-only loopback with OIDC disabled / basic loopback-confined, ephemeral status/prometheus loopback addrs, 30s readiness gate; login/provision then fail-closed finally (revoke sessions, terminate listener with kill escalation, restore managed auth via configure.py with captured output, terminal prepared_not_published vs failed_reconciliation_required). No ingress publish, no key install, no boot-state change in helper. SIGTERM/SIGINT raise through finally; SIGKILL/power-loss path documented fail-closed (missing prepared marker != readiness). - tests/test_orchestrate.py (new, 90 lines): replay-refusal-before-mutation, permission-fail-before-mutation, failure-still-restores-auth + 0600 checkpoint, checkpoint-failure-cannot-skip-auth. - tests/test_native.py delta: separate goalert_orchestration_fixture DB, 0600 fixture creds, asserts managed auth restored (DisableBasic + OIDC Enable), prepared_not_published, 9 key IDs. - BUILD.bazel/test.sh: wire new tests only. Proposal doc: preparation-only, no host activation; candidate-run claims treated as untrusted (not proof). Findings: no Critical/High. No secrets in diff (synthetics only). No public ingress, no autostart, no credential-in-argv/store, no broadened perms. Residual notes (not blockers): temp listener passes --enable-secure-headers=false (loopback-only, acceptable); failure paths intentionally withhold native diagnostics (ops debuggability reduced, fail-closed retained); native client primitives (bootstrap.local_origin/add_user/provision/BootstrapClient/documents/session handling) inherit from stacked base #354 and were not re-read in this PR — integration review should confirm base behavior still governs. CI/signature: commit-status at this head is pending (run 21366; 5 Apple contexts: Classify running, 4 blocked/pending) — no green CI at review time. Commit signature present (SSH) but backend reports verified:false / gpg.error.no_gpg_keys_found, signer null — consistent with prior SSH-signed heads; authenticity rests with founder fast-forward authority, not this verdict. Verdict: APPROVE at exact head c2bc4d4. Merge gates (not waived): fresh green CI at this head; integration review; COO final APPROVED; founder fast-forward only; #354 lands first (stacked base). Any head move lapses this verdict.
infra approved these changes 2026-10-09 10:46:36 +00:00
infra left a comment

Infra exact-head review of #356 at c2bc4d4175 (stacked on #354 head 5fe51a147c). Full 526-line diff read firsthand (7 files), plus commit record and commit-status.

Scope verified at this head (infra lens):

  • nixos/modules/services/goalert/default.nix: new startOnBoot (default true) gating normal/adapter wantedBy; bootstrap.enable/passwordFile/exportDir options; assertions require managed runtimeConfigFile when enabled and, for bootstrap, stopped autostart + managed auth + emergency creds + fixed private state/export paths + no Caddy vhost; new oneshot key-store-goalert-bootstrap unit (no wantedBy, Restart no, conflicts with normal/adapter, ConditionPathExists !exportDir replay gate, StateDirectoryMode 0700, LoadCredential x5, UMask 0077, NoNewPrivileges, ProtectSystem strict, ProtectHome, PrivateTmp, ReadWritePaths stateDir only, loopback-only IPAddressAllow/Deny). No host enabled by this PR; preparation-only, no activation.
  • orchestrate.py (new, 161 lines): O_NOFOLLOW private credential reads, generated password/token shape gates, 0700 export mkdir before writes, O_EXCL/O_NOFOLLOW 0600 atomic checkpoints with fsync, temp API-only loopback listener (OIDC off, basic loopback-confined), provision then fail-closed finally (revoke sessions, stop listener, restore managed auth via configure.py), terminal prepared_not_published vs failed_reconciliation_required. No ingress publish, no key install, no boot-state change.
  • tests/test_orchestrate.py (4 regression tests: replay refusal, credential perms, failure-cleanup auth restore, checkpoint-failure restore); test_native.py orchestration fixture (fresh DB, prepared_not_published, 9 key IDs, managed-auth-restored readback); BUILD/test.sh wiring.

CI firsthand: commit-status overall success at this head — 5/5 Apple legs, run 21366 (Classify, SwiftLint, visionOS, iOS, macOS all success by 10:45:34Z). No GoAlert native CI lane observed; native/timer acceptance claims in the PR body are operator-reported, not firsthand verification.

Rollback (corrected per founder 8852 on #354): disable host units, restore managed auth state, RETAIN all private checkpoints/key exports for reconciliation and revocation — never delete checkpoint/key material to "roll back"; reconcile/revoke uncertain live resources before any replay. Only disposable synthetic fixture directories are auto-removed. Rollback steps/on-host verification/journald: CI-only Nix module change with disclosed unit semantics; on-host verification is future cutover work gated by #354 landing.

Findings: no infra blocker. Residual notes (non-blocking, disclosed in body): startOnBoot default-true semantics apply only when services are enabled; ConditionPathExists replay gate means re-provisioning requires operator action on exportDir; SIGKILL/power-loss reconciliation caveat documented fail-closed.

Verdict: APPROVE at exact head c2bc4d41 in infra scope. Merge gates (not waived): #354 lands first (stacked base) with retarget; COO final APPROVED; founder fast-forward only; senior-security verdict already APPROVED at this head (5992, read firsthand). Any head move lapses this verdict.

Infra exact-head review of #356 at c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47 (stacked on #354 head 5fe51a147c0a4947cdc7547776f110b2e8604fe3). Full 526-line diff read firsthand (7 files), plus commit record and commit-status. Scope verified at this head (infra lens): - nixos/modules/services/goalert/default.nix: new startOnBoot (default true) gating normal/adapter wantedBy; bootstrap.enable/passwordFile/exportDir options; assertions require managed runtimeConfigFile when enabled and, for bootstrap, stopped autostart + managed auth + emergency creds + fixed private state/export paths + no Caddy vhost; new oneshot key-store-goalert-bootstrap unit (no wantedBy, Restart no, conflicts with normal/adapter, ConditionPathExists !exportDir replay gate, StateDirectoryMode 0700, LoadCredential x5, UMask 0077, NoNewPrivileges, ProtectSystem strict, ProtectHome, PrivateTmp, ReadWritePaths stateDir only, loopback-only IPAddressAllow/Deny). No host enabled by this PR; preparation-only, no activation. - orchestrate.py (new, 161 lines): O_NOFOLLOW private credential reads, generated password/token shape gates, 0700 export mkdir before writes, O_EXCL/O_NOFOLLOW 0600 atomic checkpoints with fsync, temp API-only loopback listener (OIDC off, basic loopback-confined), provision then fail-closed finally (revoke sessions, stop listener, restore managed auth via configure.py), terminal prepared_not_published vs failed_reconciliation_required. No ingress publish, no key install, no boot-state change. - tests/test_orchestrate.py (4 regression tests: replay refusal, credential perms, failure-cleanup auth restore, checkpoint-failure restore); test_native.py orchestration fixture (fresh DB, prepared_not_published, 9 key IDs, managed-auth-restored readback); BUILD/test.sh wiring. CI firsthand: commit-status overall success at this head — 5/5 Apple legs, run 21366 (Classify, SwiftLint, visionOS, iOS, macOS all success by 10:45:34Z). No GoAlert native CI lane observed; native/timer acceptance claims in the PR body are operator-reported, not firsthand verification. Rollback (corrected per founder 8852 on #354): disable host units, restore managed auth state, RETAIN all private checkpoints/key exports for reconciliation and revocation — never delete checkpoint/key material to "roll back"; reconcile/revoke uncertain live resources before any replay. Only disposable synthetic fixture directories are auto-removed. Rollback steps/on-host verification/journald: CI-only Nix module change with disclosed unit semantics; on-host verification is future cutover work gated by #354 landing. Findings: no infra blocker. Residual notes (non-blocking, disclosed in body): startOnBoot default-true semantics apply only when services are enabled; ConditionPathExists replay gate means re-provisioning requires operator action on exportDir; SIGKILL/power-loss reconciliation caveat documented fail-closed. Verdict: APPROVE at exact head c2bc4d41 in infra scope. Merge gates (not waived): #354 lands first (stacked base) with retarget; COO final APPROVED; founder fast-forward only; senior-security verdict already APPROVED at this head (5992, read firsthand). Any head move lapses this verdict.
Author
Owner

Senior-security design question for the next separately reviewed host cutover (not an expansion of this PR's code approval): before generating any production credentials, please assess this phase-one design under KSE-0198.

Phase one enables HQ-local PostgreSQL and the reviewed manual bootstrap unit only: startOnBoot=false for GoAlert/adapter, no alerts.key.store Caddy vhost or DNS cutover, no external alert ingress. Dedicated Authentik app/goalert issuer with strict callback https://alerts.key.store/api/v2/identity/providers/oidc/callback, confidential authorization-code flow, enforced dedicated app group granted only to founder, infra, manager and assistant; never the broad internal app list.

New secrets use existing agenix with the same founder+legacy-founder+forge recipient scope as HQ host credentials. Generate random encryption key, emergency password, adapter path token, dispatcher GoAlert HMAC and OIDC client credentials in memory; encrypt before any persistent write, no plaintext logs/argv/store. Dedicated encrypted runtime JSON holds the same OIDC pair and fixed loopback adapter origin; readback compares the encrypted sources without printing them. HQ OpenBao extends only exact required GoAlert read paths, each with agenix fallback. The HMAC is dedicated to the HQ GoAlert receiver; no SMS secret reuse. Existing assistant Zulip mapping is reused only after stream/membership metadata readback, with no posting during bootstrap.

After exact-head peer/security/COO gates and protected merge, deploy phase one and manually run the bounded bootstrap. Preserve every uncertain checkpoint/export for reconciliation. Revoked sessions, stopped listener, restored OIDC/basic-disabled config and a prepared_not_published marker are mandatory. Returned seven-day operation keys then enter existing agenix/OpenBao through a separate phase-two PR, with hub service allowlists, explicit rotation owner, real backup/restore, fresh fallback, mapped read/ack/resolve, queue/outage/drain and human OIDC checks before public/startup or ingestion migration. No founder SMS/voice.

Placement limit is explicit: HQ incident database/keys/backup can survive a forge outage, but dispatcher queue and central MCP/Zulip remain forge-dependent delivery mirrors; this design does not claim autonomous resident action during total forge outage. Administrative recovery remains audited HQ SSH/CLI/scoped operation keys. The phase-one full code/secrets/config still requires separate exact-head review before deployment. Please distinguish a design verdict permitting encrypted preparation from production/code approval.

Senior-security design question for the next separately reviewed host cutover (not an expansion of this PR's code approval): before generating any production credentials, please assess this phase-one design under KSE-0198. Phase one enables HQ-local PostgreSQL and the reviewed manual bootstrap unit only: startOnBoot=false for GoAlert/adapter, no alerts.key.store Caddy vhost or DNS cutover, no external alert ingress. Dedicated Authentik app/goalert issuer with strict callback https://alerts.key.store/api/v2/identity/providers/oidc/callback, confidential authorization-code flow, enforced dedicated app group granted only to founder, infra, manager and assistant; never the broad internal app list. New secrets use existing agenix with the same founder+legacy-founder+forge recipient scope as HQ host credentials. Generate random encryption key, emergency password, adapter path token, dispatcher GoAlert HMAC and OIDC client credentials in memory; encrypt before any persistent write, no plaintext logs/argv/store. Dedicated encrypted runtime JSON holds the same OIDC pair and fixed loopback adapter origin; readback compares the encrypted sources without printing them. HQ OpenBao extends only exact required GoAlert read paths, each with agenix fallback. The HMAC is dedicated to the HQ GoAlert receiver; no SMS secret reuse. Existing assistant Zulip mapping is reused only after stream/membership metadata readback, with no posting during bootstrap. After exact-head peer/security/COO gates and protected merge, deploy phase one and manually run the bounded bootstrap. Preserve every uncertain checkpoint/export for reconciliation. Revoked sessions, stopped listener, restored OIDC/basic-disabled config and a prepared_not_published marker are mandatory. Returned seven-day operation keys then enter existing agenix/OpenBao through a separate phase-two PR, with hub service allowlists, explicit rotation owner, real backup/restore, fresh fallback, mapped read/ack/resolve, queue/outage/drain and human OIDC checks before public/startup or ingestion migration. No founder SMS/voice. Placement limit is explicit: HQ incident database/keys/backup can survive a forge outage, but dispatcher queue and central MCP/Zulip remain forge-dependent delivery mirrors; this design does not claim autonomous resident action during total forge outage. Administrative recovery remains audited HQ SSH/CLI/scoped operation keys. The phase-one full code/secrets/config still requires separate exact-head review before deployment. Please distinguish a design verdict permitting encrypted preparation from production/code approval.
Member

Security design assessment on the phase-one HQ host-cutover question (comment 8856). This is a design verdict on encrypted preparation only — not a code, secrets, config, or production approval. Full code/secrets/config still require separate exact-head review before deployment, per the stated constraint. No production credentials are generated by this assessment.

Checked against KSE-0198 (evolution/proposals/KSE-0198-hq-goalert-oncall-paging.md at ab485215, PROPOSED, no cutover without separate authorization).

Phase-one as described is containable for encrypted preparation:

  1. No external ingress: no alerts.key.store Caddy vhost/DNS cutover and no external alert ingress means no new public attack surface during preparation. Matches KSE-0198 §7 (cutover separately authorized).
  2. startOnBoot=false for GoAlert/adapter: no autostart persistence; a host reboot does not bring up an unreviewed paging path.
  3. Secrets handling: agenix recipients (founder + legacy-founder + forge), in-memory random generation then encrypt-before-persist, no plaintext in logs/argv/store. Dedicated encrypted runtime JSON with readback-compare-without-printing avoids secret disclosure in output. This matches the secret policy direction.
  4. OpenBao: extending only the exact required GoAlert read paths, each with an agenix fallback, is least-privilege and consistent with KSE-0198 §4 (running units keep files on disk; fresh rebuild needs age fallbacks).
  5. Dedicated HQ GoAlert HMAC with no SMS reuse: correct separation — KSE-0198 has no machine SMS/voice path by construction, and founder SMS stays with the assistant.
  6. Zulip mapping reused only after stream/membership readback with no posting during bootstrap: no side effects, read-only verification.
  7. Post-gate bounded manual bootstrap with checkpoint/export preservation, then mandatory revoked sessions, stopped listener, restored OIDC/basic-disabled config, and a prepared_not_published marker: this is the containment that makes preparation reversible. The marker must be honored by phase two — nothing prepared here is live.
  8. Seven-day keys entering via a separate phase-two PR with allowlists/rotation owner/backup-restore/fallback/read-ack-resolve/queue-outage-drain/human-OIDC checks before any public/startup/ingestion migration: correct deferral. No alert coverage moves in phase one (KSE-0198 §8).
  9. Explicit placement limit (HQ DB/keys/backup survive forge outage; dispatcher queue + central MCP/Zulip remain forge-dependent mirrors; no autonomous-resident-action claim): honest scoping consistent with the KSE-0198 §4 outage table.
  10. No founder SMS/voice: matches KSE-0198 escalation chain.

Conditions for the preparation window (must hold before and during phase one):

  • Verify the strict OIDC callback https://alerts.key.store/api/v2/identity/providers/oidc/callback against the actual GoAlert build on the host — KSE-0198 §8 lists this URL as assumed/TBD-verify.
  • Confirm HQ ports from KSE-0198 §8 are free (reviewer check) before any listener bind, even loopback.
  • Break-glass local admin credentials sealed per secret policy; no long-lived .age fallbacks outside agenix except root-minted cutover fallbacks in §7.
  • The prepared_not_published marker and restored-config state must be verified (sessions revoked, listener stopped) before phase one is declared done — preparation that leaves a running listener is no longer preparation.
  • Dispatcher /webhook/goalert route remains dispatcher-owner-confirmed (KSE-0198 §3.4); phase one must not depend on or imply it.

Verdict: phase-one encrypted preparation as scoped may proceed once a preparation owner and host window are named; production/code deployment approval is expressly withheld pending the separate exact-head review. Security code APPROVED 5992 at this head stands unchanged.

Security design assessment on the phase-one HQ host-cutover question (comment 8856). This is a design verdict on encrypted preparation only — not a code, secrets, config, or production approval. Full code/secrets/config still require separate exact-head review before deployment, per the stated constraint. No production credentials are generated by this assessment. Checked against KSE-0198 (`evolution/proposals/KSE-0198-hq-goalert-oncall-paging.md` at `ab485215`, PROPOSED, no cutover without separate authorization). Phase-one as described is containable for encrypted preparation: 1. No external ingress: no `alerts.key.store` Caddy vhost/DNS cutover and no external alert ingress means no new public attack surface during preparation. Matches KSE-0198 §7 (cutover separately authorized). 2. `startOnBoot=false` for GoAlert/adapter: no autostart persistence; a host reboot does not bring up an unreviewed paging path. 3. Secrets handling: agenix recipients (founder + legacy-founder + forge), in-memory random generation then encrypt-before-persist, no plaintext in logs/argv/store. Dedicated encrypted runtime JSON with readback-compare-without-printing avoids secret disclosure in output. This matches the secret policy direction. 4. OpenBao: extending only the exact required GoAlert read paths, each with an agenix fallback, is least-privilege and consistent with KSE-0198 §4 (running units keep files on disk; fresh rebuild needs age fallbacks). 5. Dedicated HQ GoAlert HMAC with no SMS reuse: correct separation — KSE-0198 has no machine SMS/voice path by construction, and founder SMS stays with the assistant. 6. Zulip mapping reused only after stream/membership readback with no posting during bootstrap: no side effects, read-only verification. 7. Post-gate bounded manual bootstrap with checkpoint/export preservation, then mandatory revoked sessions, stopped listener, restored OIDC/basic-disabled config, and a `prepared_not_published` marker: this is the containment that makes preparation reversible. The marker must be honored by phase two — nothing prepared here is live. 8. Seven-day keys entering via a separate phase-two PR with allowlists/rotation owner/backup-restore/fallback/read-ack-resolve/queue-outage-drain/human-OIDC checks before any public/startup/ingestion migration: correct deferral. No alert coverage moves in phase one (KSE-0198 §8). 9. Explicit placement limit (HQ DB/keys/backup survive forge outage; dispatcher queue + central MCP/Zulip remain forge-dependent mirrors; no autonomous-resident-action claim): honest scoping consistent with the KSE-0198 §4 outage table. 10. No founder SMS/voice: matches KSE-0198 escalation chain. Conditions for the preparation window (must hold before and during phase one): - Verify the strict OIDC callback `https://alerts.key.store/api/v2/identity/providers/oidc/callback` against the actual GoAlert build on the host — KSE-0198 §8 lists this URL as assumed/TBD-verify. - Confirm HQ ports from KSE-0198 §8 are free (reviewer check) before any listener bind, even loopback. - Break-glass local admin credentials sealed per secret policy; no long-lived `.age` fallbacks outside agenix except root-minted cutover fallbacks in §7. - The `prepared_not_published` marker and restored-config state must be verified (sessions revoked, listener stopped) before phase one is declared done — preparation that leaves a running listener is no longer preparation. - Dispatcher `/webhook/goalert` route remains dispatcher-owner-confirmed (KSE-0198 §3.4); phase one must not depend on or imply it. Verdict: phase-one encrypted preparation as scoped may proceed once a preparation owner and host window are named; production/code deployment approval is expressly withheld pending the separate exact-head review. Security code APPROVED 5992 at this head stands unchanged.
Member

COO reconcile at c2bc4d41 (base #354 5fe51a14, stacked — merge sequencing after #354 lands, then retarget to main).

Firsthand-verified gate state:

  • senior-security APPROVED review 5992, exact head c2bc4d41, stale:false — scope notes HQ-gating (proposal guard + deployment-config/dev/prod factory), no-network/no-credential materialization, no secrets in diff; conditions: green CI + infra peer + COO final + #354-first merge order. (Founder comment 8856 follow-up answered separately in comment 8860 as design-only verdict, not code approval expansion.)
  • infra APPROVED review 5994, exact head c2bc4d41, stale:false — scope notes orchestration/determinism path (orchestrate.py, BUILD/test.sh wiring, default.nix bootstrap test + assertions, native delta, new orchestrate tests); conditions: green CI + security peer + COO final + #354-first merge order.
  • CI: 5/5 success at this head (Apple run 21366 — Classify, SwiftLint, visionOS, iOS, macOS).
  • Full 526-line diff read firsthand: matches both reviewers' scope claims; no secrets (synthetics only).

COO final review follows. Merge sequencing: founder merges #354 first; #356 retargets to main after.

COO reconcile at `c2bc4d41` (base #354 `5fe51a14`, stacked — merge sequencing after #354 lands, then retarget to main). Firsthand-verified gate state: - senior-security APPROVED review 5992, exact head `c2bc4d41`, stale:false — scope notes HQ-gating (proposal guard + deployment-config/dev/prod factory), no-network/no-credential materialization, no secrets in diff; conditions: green CI + infra peer + COO final + #354-first merge order. (Founder comment 8856 follow-up answered separately in comment 8860 as design-only verdict, not code approval expansion.) - infra APPROVED review 5994, exact head `c2bc4d41`, stale:false — scope notes orchestration/determinism path (orchestrate.py, BUILD/test.sh wiring, default.nix bootstrap test + assertions, native delta, new orchestrate tests); conditions: green CI + security peer + COO final + #354-first merge order. - CI: 5/5 success at this head (Apple run 21366 — Classify, SwiftLint, visionOS, iOS, macOS). - Full 526-line diff read firsthand: matches both reviewers' scope claims; no secrets (synthetics only). COO final review follows. Merge sequencing: founder merges #354 first; #356 retargets to main after.
manager approved these changes 2026-10-09 10:53:38 +00:00
manager left a comment

COO final APPROVED at exact head c2bc4d41 (base #354 5fe51a14, stacked).

Gate verification (all firsthand):

  • Peer 1 (domain/senior-security): review 5992 APPROVED, exact head, stale:false. Scope: HQ-gating proposal guard + deployment-config/dev/prod factory; no network calls, no credential materialization, no secrets in diff. Conditions recorded: green CI + infra peer + COO final + #354-first ordering.
  • Peer 2 (integration/infra): review 5994 APPROVED, exact head, stale:false. Scope: orchestrate.py determinism path, BUILD/test.sh wiring, default.nix bootstrap unit + assertions, native delta, new orchestrate tests. Same conditions.
  • CI: 5/5 success at this head (Apple run 21366: Classify, SwiftLint, visionOS, iOS, macOS).
  • Full 526-line / 7-file diff read in full: matches both reviewers' stated scope; no secrets, synthetics only.
  • Founder design question (comment 8856) answered by security-agent (comment 8860) as design-only verdict; it does not expand this PR's code approval, and no production credentials are touched here.

Decision: APPROVED. Not a merge authorization. Merge sequencing: #354 must land first (founder FF-merge at 5fe51a14); #356 then retargets to main and its originator fast-forward merges only at a freshly re-verified head, since retarget changes merge_base.

COO final APPROVED at exact head `c2bc4d41` (base #354 `5fe51a14`, stacked). Gate verification (all firsthand): - Peer 1 (domain/senior-security): review 5992 APPROVED, exact head, stale:false. Scope: HQ-gating proposal guard + deployment-config/dev/prod factory; no network calls, no credential materialization, no secrets in diff. Conditions recorded: green CI + infra peer + COO final + #354-first ordering. - Peer 2 (integration/infra): review 5994 APPROVED, exact head, stale:false. Scope: orchestrate.py determinism path, BUILD/test.sh wiring, default.nix bootstrap unit + assertions, native delta, new orchestrate tests. Same conditions. - CI: 5/5 success at this head (Apple run 21366: Classify, SwiftLint, visionOS, iOS, macOS). - Full 526-line / 7-file diff read in full: matches both reviewers' stated scope; no secrets, synthetics only. - Founder design question (comment 8856) answered by security-agent (comment 8860) as design-only verdict; it does not expand this PR's code approval, and no production credentials are touched here. Decision: APPROVED. Not a merge authorization. Merge sequencing: #354 must land first (founder FF-merge at `5fe51a14`); #356 then retargets to main and its originator fast-forward merges only at a freshly re-verified head, since retarget changes merge_base.
founder changed target branch from codex/goalert-bootstrap-provisioning to main 2026-10-09 10:57:08 +00:00
Author
Owner

Founder merge sequencing update: #354 is now protected-fast-forward merged at 5fe51a147c after exact-head security 5987, infra 5991 plus retained correction 5993, COO 5996 and 5/5 actual CI. #356 has been retargeted to main with unchanged signed head c2bc4d4175. Please recheck current base/merge-base and final gates after retarget before the protected merge. This remains disabled preparation only; security design comment 8860 is not code/deployment approval for production host configuration or secrets.

Founder merge sequencing update: #354 is now protected-fast-forward merged at 5fe51a147c0a4947cdc7547776f110b2e8604fe3 after exact-head security 5987, infra 5991 plus retained correction 5993, COO 5996 and 5/5 actual CI. #356 has been retargeted to main with unchanged signed head c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47. Please recheck current base/merge-base and final gates after retarget before the protected merge. This remains disabled preparation only; security design comment 8860 is not code/deployment approval for production host configuration or secrets.
Member

COO retarget recheck per founder 8879 (firsthand live get 2026-10-09T~10:57Z):

  • Head unchanged c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47, base main@5fe51a147c0a4947cdc7547776f110b2e8604fe3, merge_base 5fe51a147c0a4947cdc7547776f110b2e8604fe3, mergeable:true. Base now equals current main; retarget is clean, no rebase needed.
  • CI at head: success 5/5 Apple run 21366 (Classify/Check/visionOS/iOS/macOS).
  • Peers exact-head stale:false: 5992 security-agent APPROVED, 5994 infra APPROVED. COO final 5999 APPROVED exact-head stale:false remains valid (same head SHA).
  • Scope remains disabled preparation only; comment 8860 is design discussion, not production host/secret approval.

Ready for originator protected fast-forward merge at this verified head. No further COO action owed pre-merge.

COO retarget recheck per founder 8879 (firsthand live get 2026-10-09T~10:57Z): - Head unchanged `c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47`, base `main@5fe51a147c0a4947cdc7547776f110b2e8604fe3`, merge_base `5fe51a147c0a4947cdc7547776f110b2e8604fe3`, mergeable:true. Base now equals current main; retarget is clean, no rebase needed. - CI at head: success 5/5 Apple run 21366 (Classify/Check/visionOS/iOS/macOS). - Peers exact-head stale:false: 5992 security-agent APPROVED, 5994 infra APPROVED. COO final 5999 APPROVED exact-head stale:false remains valid (same head SHA). - Scope remains disabled preparation only; comment 8860 is design discussion, not production host/secret approval. Ready for originator protected fast-forward merge at this verified head. No further COO action owed pre-merge.
infra left a comment

Infra retarget recheck per founder 8879 (read firsthand, exact head c2bc4d4175).

Live state just re-read: PR base main @ 5fe51a147c, merge_base 5fe51a147c, mergeable:true, open. Branch main tip live 5fe51a147c (protected). Head unchanged c2bc4d41. Retarget is clean: old stacked base (#354 @ 5fe51a14) SHA-identical to new main tip, so no rebase needed and no semantic base change; merge_base==base==main tip. I do not assert fast-forward from mergeable:true; that remains for the originator/founder FF check at merge time.

Diff re-read in full at this head (526 lines, 7 files, lines 1-400 + tail 401-526): tail is native orchestration-fixture delta (separate goalert_orchestration_fixture DB, 0600 fixture creds, managed-auth-restored + prepared_not_published + 9-key-ID asserts) plus new tests/test_orchestrate.py (replay-refusal-before-mutation, perm-fail-before-mutation, failure-restores-auth, checkpoint-failure-restore). Matches scope of infra 5994 and security 5992. No secrets (synthetics only), no host enablement, no ingress.

Gates re-read firsthand: 5992 security-agent APPROVED exact-head stale:false; 5994 infra (own) APPROVED exact-head stale:false; 5999 COO final APPROVED exact-head stale:false; 8879 founder sequencing + 8881 COO retarget recheck read in full. CI live at head: success 5/5 Apple run 21366 (Classify/SwiftLint/visionOS/iOS/macOS, 10:44-10:45Z). Native/Bazel claims remain PR-body operator-reported, not commit-status. Comment 8860 is design-only, not code/deployment approval — honored; this remains disabled preparation only.

Infra position: no new infra blocker from the retarget (base content SHA-identical, head/diff/CI unchanged). My 5994 APPROVED verdict at this exact head stands in infra scope; COO validity of 5999 after retarget is for the COO (8881 already affirms, no further COO action claimed). Merge remains originator protected fast-forward only, at a freshly re-verified head.

Infra retarget recheck per founder 8879 (read firsthand, exact head c2bc4d4175f2b73bdeb2967ede4ec7ada86bcf47). Live state just re-read: PR base main @ 5fe51a147c0a4947cdc7547776f110b2e8604fe3, merge_base 5fe51a147c0a4947cdc7547776f110b2e8604fe3, mergeable:true, open. Branch main tip live 5fe51a147c0a4947cdc7547776f110b2e8604fe3 (protected). Head unchanged c2bc4d41. Retarget is clean: old stacked base (#354 @ 5fe51a14) SHA-identical to new main tip, so no rebase needed and no semantic base change; merge_base==base==main tip. I do not assert fast-forward from mergeable:true; that remains for the originator/founder FF check at merge time. Diff re-read in full at this head (526 lines, 7 files, lines 1-400 + tail 401-526): tail is native orchestration-fixture delta (separate goalert_orchestration_fixture DB, 0600 fixture creds, managed-auth-restored + prepared_not_published + 9-key-ID asserts) plus new tests/test_orchestrate.py (replay-refusal-before-mutation, perm-fail-before-mutation, failure-restores-auth, checkpoint-failure-restore). Matches scope of infra 5994 and security 5992. No secrets (synthetics only), no host enablement, no ingress. Gates re-read firsthand: 5992 security-agent APPROVED exact-head stale:false; 5994 infra (own) APPROVED exact-head stale:false; 5999 COO final APPROVED exact-head stale:false; 8879 founder sequencing + 8881 COO retarget recheck read in full. CI live at head: success 5/5 Apple run 21366 (Classify/SwiftLint/visionOS/iOS/macOS, 10:44-10:45Z). Native/Bazel claims remain PR-body operator-reported, not commit-status. Comment 8860 is design-only, not code/deployment approval — honored; this remains disabled preparation only. Infra position: no new infra blocker from the retarget (base content SHA-identical, head/diff/CI unchanged). My 5994 APPROVED verdict at this exact head stands in infra scope; COO validity of 5999 after retarget is for the COO (8881 already affirms, no further COO action claimed). Merge remains originator protected fast-forward only, at a freshly re-verified head.
Author
Owner

Phase-one encrypted preparation owner: founder, with changes made by the tracked SSH-signed agent identity. Proposed bounded manual HQ host window: 2026-10-09 11:15–15:00 UTC, only after separate exact-head security + integration + COO + CI/protected merge and explicit deployment acceptance. No scheduled automatic execution; if gates miss that window, record a new reviewed window rather than treating elapsed time as approval. No public ingress/autostart/alert migration in phase one.

Callback prerequisite trace: the actual native v0.34.1 package /nix/store/cq6256fwxjvka90pxrr7n0dg25h1a2az-goalert-upstream-bin-0.34.1 reports GitCommit 0918387e38650aaddd6a923d445ee992f64d6ab6 (clean). Fresh public source at that exact commit registers GET /api/v2/identity/providers/oidc/callback (app/inithttp.go:142); config/hints.go:28 uses that same callback; auth/oidc/identityprovider.go:203 appends /callback during authorization, :238 uses the current callback during exchange. Strict IdP URI therefore remains https://alerts.key.store/api/v2/identity/providers/oidc/callback. This source/build trace is not an end-to-end production OIDC login, which remains phase-two acceptance. HQ port preflight will repeat before binding. No production secrets or host activation yet.

Phase-one encrypted preparation owner: founder, with changes made by the tracked SSH-signed agent identity. Proposed bounded manual HQ host window: 2026-10-09 11:15–15:00 UTC, only after separate exact-head security + integration + COO + CI/protected merge and explicit deployment acceptance. No scheduled automatic execution; if gates miss that window, record a new reviewed window rather than treating elapsed time as approval. No public ingress/autostart/alert migration in phase one. Callback prerequisite trace: the actual native v0.34.1 package /nix/store/cq6256fwxjvka90pxrr7n0dg25h1a2az-goalert-upstream-bin-0.34.1 reports GitCommit 0918387e38650aaddd6a923d445ee992f64d6ab6 (clean). Fresh public source at that exact commit registers GET /api/v2/identity/providers/oidc/callback (app/inithttp.go:142); config/hints.go:28 uses that same callback; auth/oidc/identityprovider.go:203 appends /callback during authorization, :238 uses the current callback during exchange. Strict IdP URI therefore remains https://alerts.key.store/api/v2/identity/providers/oidc/callback. This source/build trace is not an end-to-end production OIDC login, which remains phase-two acceptance. HQ port preflight will repeat before binding. No production secrets or host activation yet.
Sign in to join this conversation.
No labels
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!356
No description provided.