Skip to content

Security-review accuracy pass + decommission cron provisioner#42

Merged
rcurranmoz merged 1 commit into
mainfrom
docs-security-review-accuracy
Jul 15, 2026
Merged

Security-review accuracy pass + decommission cron provisioner#42
rcurranmoz merged 1 commit into
mainfrom
docs-security-review-accuracy

Conversation

@rcurranmoz

@rcurranmoz rcurranmoz commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Prep for the upcoming security review. @aerickson 's doc review surfaced discrepancies; this reconciles all the docs with the real code/infra — every claim was verified against live GCP and 1Password, not assumed.

Highlights

  • broker/README.md was describing an auth model that doesn't exist (Bearer JWT + jti replay cache + CRL). The live broker is pure mTLS-forwarded-header auth. Fully rewritten to match broker/app/.
  • README.md claimed the LB "strips client-supplied headers" — it doesn't. The LB overwrites the 9 X-Client-Cert-* names it injects; the load-bearing protection is Cloud Run ingress (internal-and-cloud-load-balancing), since the broker trusts X-Client-Cert-Chain-Verified and never re-verifies the chain. Now stated precisely, incl. why allUsers run.invoker is safe.
  • Removed the unauthenticated /_debug/headers endpoint from the broker.
  • Reconciled the SecureToken mint narrative (the on-network runner auto-mints; it's not a manual per-host login).
  • Corrected rollout status: only the m4 family is live; the 6 Linux roles have provisioners but empty secrets (marked "scaffolded, not live"); r8/1015 not started; acme-no-sip is dead config.
  • New SECURITY.md — reviewer's companion mapping every security claim → file/line → the exact command to verify it live, plus honest residual risks and terraform-apply-safety notes.

Infra changes (already applied to live GCP)

  • Decommissioned the superseded cron provisioner (relops-provisioner + relops-provisioner-tick) — it was armed (DRY_RUN=false, enabled, firing every 5 min) and is a needless second reprovision path. Removed terraform/provisioner.tf + the provisioner/ app; retained the shared simplemdm-api-token secret (relocated to terraform/simplemdm_secret.tf, same resource address → no-op). Live service/scheduler/secrets/bucket already torn down via targeted apply + gcloud.
  • Pinned the step-ca boot image in terraform/step_ca.tf. It used family = "debian-12", so every terraform apply wanted to replace the CA VM (Debian auto-bumps). Now pinned to the deployed version. Post-change terraform plan is clean except one benign vault_broker scaling{} in-place drift (deferred deliberately).

Verification

terraform plan0 add, 1 change (benign broker), 0 destroy. Broker tests unchanged and still cover the negative cases (401/403/429, URL-encoded CN). See SECURITY.md for per-claim verify commands.

Left as follow-ups (deliberately not in this PR)

Reconcile the benign vault_broker scaling{} drift; close the step-ca IaC drift (codify the 6 Linux SCEP provisioners, prune the dead acme-no-sip); populate/validate the Linux path if it's ever wanted.

🤖 Generated with Claude Code

Prep for a real security review. Every claim verified against live GCP/1Password.

Docs (were describing earlier/abandoned designs):
- broker/README.md: rewrite to the real mTLS-forwarded-header auth model; it
  documented a non-existent JWT/jti/CRL design (the live broker has none).
- README.md: fix the false "LB strips client headers" claim (the LB OVERWRITES
  the injected X-Client-Cert-* names; internal-LB ingress is the load-bearing
  protection, and the broker trusts Chain-Verified without re-verifying the
  chain). Explain allUsers+ingress. Reconcile the SecureToken mint (runner
  auto-mints over on-host ssh). Correct role-rollout status. Fix the 1Password
  vault name/example. Caveat per-instance rate limiting.
- docs/{deep-dive,index}.html: same corrections; mark Linux "scaffolded, not
  live" (secrets empty); note 24h cert lifetime is step-ca's default (unpinned);
  flag the dead acme-no-sip provisioner + bootstrap-step-ca.sh IaC drift.
- docs/reprovision-architecture.html: drop the untrue "Security-reviewed" chip.
- SECURITY.md (new): reviewer companion - every claim -> file:line -> verify
  command, residual risks, rollout status, terraform-apply-safety notes.
- Fix stale docstrings (broker config.py SPIFFE comment; orchestrator ssh.py).

Code / infra:
- broker/app/main.py: remove the unauthenticated /_debug/headers endpoint.
- Decommission the superseded, armed cron provisioner (was DRY_RUN=false,
  enabled, firing every 5 min): remove terraform/provisioner.tf + provisioner/
  app dir; retain the shared simplemdm-api-token secret (relocated to
  terraform/simplemdm_secret.tf, same address). Live infra already torn down.
- terraform/step_ca.tf: PIN the Debian boot image (was family="debian-12",
  which made every `terraform apply` want to replace the CA VM).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rcurranmoz
rcurranmoz requested a review from aerickson July 15, 2026 12:48
@rcurranmoz
rcurranmoz merged commit 15ec510 into main Jul 15, 2026
3 checks passed
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