Files
kryptkeeper/docs/DECISIONS.md
T
bpmforge e0d82a4ed0 Kryptkeeper 1.0.0
First stable release. Notes: docs/release/RELEASE_NOTES_v1.0.0.md
Lab record: docs/release/LIVE_RESULTS_v1.0.0.md
2026-10-19 14:43:23 -04:00

102 KiB
Raw Permalink Blame History

Kryptkeeper — Decision Ledger

Single source of truth for locked decisions. Aggregated 2026-07-15 (design-review arc, G-22) from three prior scattered records: the SDLC_STATUS "Key Decisions (Locked)" table (Apr), phase-4-implementation/BLOCKING_DECISIONS.md DEC-001..005 (Apr), and per-scope-doc decision sections (Jun). Those records remain as history; new decisions land here only. Changes to locked rows are amendments the owner approves — never silently adopted. Rows adopted as part of a bundle ("adopt all") are flagged vetoable.

Status: locked · locked (amended <date>) · proposed.

ID Decision Rationale Source Status
D-001 Go for all backend services step-ca/Boulder precedent; stdlib crypto; single binary SDLC_STATUS (research) locked
D-002 TypeScript/React + shadcn/ui dashboard right tool; separate from CA core SDLC_STATUS locked
D-003 PostgreSQL primary + SQLite dev/embedded HA + analytics; SQLite for embedded SDLC_STATUS locked
D-004 Apache-2.0 license patent grant; enterprise legal; no copyleft SDLC_STATUS locked
D-005 crypto.Signer interface for all signing HSM/KMS/software swappable without CA-logic changes SDLC_STATUS locked
D-006 OCSP free in OSS competitive differentiator vs step-ca SDLC_STATUS locked
D-007 XCEP/WSTEP path for ADCS (not DCOM) DCOM needs Windows CA; XCEP/WSTEP is HTTP/SOAP SDLC_STATUS locked
D-008 Discovery scanning is pure Go (TLS dial + agents + cloud inventory) Amended 2026-07-15 (G-21): original wording "two-phase (masscan + Go TLS)" was never built — masscan has 0 code references. Recording built reality. If masscan is ever revisited: AGPL-3.0 → subprocess-only, optional, never vendored SDLC_STATUS + this review locked (amended 07-15)
D-009 RBAC canonical role set: pki-admin/pki-operator/pki-viewer/pki-auditor/discovery-operator/service-account reconciles FR-092 + contracts + threat model BLOCKING_DECISIONS DEC-001 locked
D-010 No custom roles in V1 scope control (DEC-002) BLOCKING_DECISIONS locked
D-011 API-key semantics & precedence policy per DEC-003 contract stability BLOCKING_DECISIONS locked
D-012 Audit-log identifier canonicalization per DEC-004 join-safe audit trail BLOCKING_DECISIONS locked
D-013 Endpoint naming consistency per DEC-005 contract stability BLOCKING_DECISIONS locked
D-014 CSRF posture: Bearer + same-origin, no CSRF tokens recorded decision doc SECURITY_CSRF_POSTURE.md locked
D-015 Multi-tenancy = policy folders, flag-gated OFF (MULTI_TENANCY=on); off ⇒ identical to single-tenant; certs/approvals inherit issuing CA's tenant; templates explicit-mapped; pending actions stamp proposer's tenant tenant isolation without forking the product v2.2 scope + SESSION_STATUS locked
D-016 Default bind loopback (APP_BIND_ADDR=127.0.0.1) resolved HIGH broad-bind finding (Apr audit) ops audit WS-01/02 locked
D-017 MCP write surface is propose-only (pending-actions queue; a human approves) — no direct mutation from AI tools AI-native without excessive agency v2.0 scope + mcpserver/writetools.go locked
D-018 Version canon: the release train vX.Y.Z (CHANGELOG/tags) is the only forward-looking scheme. "V1–V4" SDLC cycles and "Sprint 5–7 / S5-xx" are historical labels, frozen ends the three-scheme collision (G-7) this review locked
D-019 Vocabulary canon — see block below cheap agents copy exactly (G-23) this review locked
D-020 Configuration is env-only (no config files); env.example is the documentation surface and must be complete matches built reality; one surface to validate this review (G-11) locked
D-021 Health canon: /healthz (live) + /readyz (ready), unauthenticated, served by the backend; the edge must proxy both code truth (handlers_meta.go); ends G-9 ambiguity this review locked
D-022 Tenancy is a design gap, fixed forward (not a hotfix): v2.2 isolation is header-asserted/read-only/partial; flag OFF ⇒ no live exposure. Correct the doc claims now (R-B5); ticket the enforcement (R-B1..B4). Isolation will become identity-bound (tenant claim + membership), not header-trusted P2 interrogation + the owner "design gap, fix-forward" locked (vetoable)
D-023 CI has never executed: self-hosted Actions is enabled and all 9 workflows are registered "active", but 0 runners are registered and 0 workflow runs exist (verified via forge API 2026-07-15). Every historical "CI green" claim is decorative. Repo stays single-remote; a runner must be registered (HP-2) before CI means anything. UI lanes are also misconfigured (R-A1) independently the owner "verify the the self-hosted forge runner" → verification: none exists locked (vetoable)
D-024 Adopt the CI-integrity bundle (R-A1 UI lanes · R-A3 nightly gate · R-A4 OpenAPI machine contract) AM-3 "adopt all" locked (vetoable)
D-025 Adopt identity-bound tenancy (R-B1): JWT/OIDC tenant claim + tenant on api_keys/users; X-Tenant = super-admin view-as only; FKs ca_tenants/template_tenants→tenants AM-1 (B1 as v2.3 track) locked (vetoable)
D-026 Adopt tenant write-path + single-GET enforcement (R-B2); auto-map new CA/template to creator's tenant AM-1 locked (vetoable)
D-027 Adopt tenant-scoped reports/dashboard OR ADR that aggregate metadata is super-admin-only (R-B3) AM-1; resolved by D-102 (W2-03) locked (vetoable)
D-028 Adopt tenant context in audit rows: tenant + acting_as_tenant (R-B4) AM-1 locked (vetoable)
D-029 Adopt structural MCP non-approver identity (R-C1): a constrained agent role canApproveActions rejects by construction, or boot-time refusal of approver-capable tokens AM-4 locked (vetoable)
D-030 Adopt rate-limiting on /pending-actions + /reports/* (R-C2) AM-4 locked (vetoable)
D-031 Adopt the finding funnel + justified suppression (R-D1): raw→dedup→scope→applicability→effective, all stamped; accepted-risk/exception primitive (fixed-enum justification, expiry-dated, auto-reopen); raw never hidden. New doc docs/design/FINDING_ECONOMICS.md AM-2 "adopt the design now" locked (vetoable)
D-032 Adopt wiring the intended dedup/staleness (R-D2): upsert endpoints on unique key; write certificate_endpoints.last_seen/currently_active; mark findings "gone" on non-observation AM-2 locked (vetoable)
D-033 Adopt alert cooldown + per-target silence (R-D3): implement the dead alert_cooldown_hours, track last-notified per cert, allow rule to target/silence a cert/CA/template AM-2 locked (vetoable)
D-034 Adopt renewal failure handling (R-E1): retry budget + dead-letter/escalation; surface trigger failures beyond a log line AM-5 locked (vetoable)
D-035 Adopt migration-wave lifecycle (R-E2): stored status proposed→accepted→in_progress→done→regressed AM-5 locked (vetoable)
D-036 Adopt telemetry-posture statement in SECURITY.md (R-F2): no phone-home; state it AM-5/F locked (vetoable)
D-037 Own the 4 code-quality backlog items as tickets (AM-7): G-10 UI SAN field, G-28 plaintext agent tokens (security edge), G-29 MCP transport+packaging, G-20 pkg/errors→stdlib AM-7 locked (vetoable)
D-038 Deferred (recorded so not re-derived): bootstrap package split (G-13) — lint-boundary config now, dedicated refactor track later, NOT an arc amendment; full rule-lifecycle engine for grading — over-scoped, accepted-risk primitive (D-031) is right-sized P2 rejected-list locked
D-039 Open-source posture (R-F1) parked as a founder slate (no public repo today); Casey contributor persona stays in scope pending that decision AM-6/F1 proposed
D-040 Notifications must actually deliver (email/Slack/PagerDuty/webhook/SIEM) — the log-only stub is not acceptable for a cert-expiry product golden-state (PE-1); competitive T1-#7 locked (vetoable)
D-041 The fleet renewal scheduler renews, not just logs "triggered" golden-state (PE-2); T1-#3 (47-day survival) locked (vetoable)
D-042 PQC migration gains an EXECUTE step (migrate-wave re-issues to ML-DSA/hybrid) golden-state (PE-3); T2-#9 locked (vetoable)
D-043 Ship ACME EAB free (tactical wedge vs Smallstep/commercial paywalls) competitive T1-#2 + wedge locked (vetoable)
D-044 Last-mile install breadth: nginx/apache/HAProxy/IIS + F5/Citrix golden-state (PE-4); T1-#4 locked (vetoable)
D-045 Kubernetes + Istio service-mesh cert push (cert-manager issuer already covers native k8s) competitive T1-#4 locked (vetoable)
D-046 Issuance-time policy engine (algorithms/key-size/validity/CA constraints), data-driven competitive T1-#5 locked (vetoable)
D-047 MCP write surface covers issue/renew/rotate (not just revoke), all approval-gated golden-state (PE-5); T2-#12/T3-#15 substrate locked (vetoable)
D-048 HA/clustering: schedulers + issuance safe on ≥2 replicas (leader election / locks) golden-state (PE-9); T1-#6 locked (vetoable)
D-049 Enterprise auth: SSO (SAML/OIDC) + SCIM provisioning + custom RBAC roles competitive T1-#5/#6 (PE-10) locked (vetoable)
D-050 Complete HSM/KMS integration (PKCS#11 + cloud KMS) for CA + PQC keys competitive T1-#6 locked (vetoable)
D-051 Key escrow / backup / recovery workflow under dual control + executed drill competitive T1-#6; kin G-8 locked (vetoable)
D-052 CBOM with CycloneDX export (crypto-asset inventory beyond certs) competitive T2-#10 (differentiator) locked (vetoable)
D-053 CT-log monitoring for owned domains (rogue/shadow-cert detection) competitive T2-#11 (differentiator) locked (vetoable)
D-054 Cross-signing / multi-issuer in-place key rotation (zero-downtime rollover) competitive T2-#13 locked (vetoable)
D-055 SPIFFE/SPIRE workload identity + attestation (gRPC Workload API; extends v2.1) competitive T2-#12 locked (vetoable)
D-056 AI-agent / NHI identity issuance (short-lived, attested, workload-bound) competitive T3-#12 frontier (144:1 NHI) locked (vetoable)
D-057 SLO-native PKI ops (golden-signal dashboards + issuance/renewal SLOs) competitive T3-#14 whitespace locked (vetoable)
D-058 AI-assisted ops: issuance-anomaly detection + NL policy authoring — LLM proposes, never activates (rules-first, D-017 kin) competitive T3-#15 locked (vetoable)
D-059 Report export in CSV/XLSX (beyond JSON+PDF) golden-state (PE-11); T1-#8 locked (vetoable)
D-060 Service-mesh + SaaS/API discovery breadth competitive T2-#1 frontier locked (vetoable)
D-061 Agent enrollment attestation (close open self-registration) golden-state (PE-7); T1-#6 security locked (vetoable)
D-062 Managed-target / fleet model: user declares targets with per-target discovery/install/renewal mode agentless map; FR-P24 locked (vetoable)
D-063 Outbound credential store (encrypted): SSH/device/cloud creds referenced by targets, never inlined agentless map; FR-P25 locked (vetoable)
D-064 Agentless install via SSH — hub pushes cert+key + test/reload/verify/rollback, reusing the agent state machine agentless map (install is agent-only today); FR-P26 locked (vetoable)
D-065 Agentless discovery is DB-persisted + scheduled + cloud-wired (cloudinventory is dead code today) agentless map; FR-P27 locked (vetoable)
D-066 Ship a reusable wizard/stepper primitive (none exists) UX map; FR-P28 locked (vetoable)
D-067 Day-0 onboarding wizard replaces the empty-dashboard dead end UX map §2; FR-P29 locked (vetoable)
D-068 In-app configuration store + Integrations UI — ~101 env vars, ~1 UI-writable today UX map §4; FR-P30/P31 locked (vetoable)
D-069 Guided issuance wizard replaces the flat dialog UX map; FR-P32 locked (vetoable)
D-070 Guided renewal-policy UI (per target/fleet) instead of env-only UX map; FR-P33 locked (vetoable)
D-071 Interactive agent + agentless setup flow (token-gen+pairing / target+mode+cred) UX+agentless maps; FR-P34 locked (vetoable)
D-072 Role-aware navigation (filter nav by role, not only action buttons) UX map; FR-P35 locked (vetoable)
D-073 PQC migration journey UI (plan→select→schedule→execute) wraps the W4-03 execute action UX map; FR-P36 locked (vetoable)
D-074 Command-palette actions (issue/renew/revoke), not only navigation UX map; FR-P37 locked (vetoable)
D-075 Empty-state CTAs everywhere (mostly text-only today) UX map; FR-P38 locked (vetoable)
D-076 Real-time status via SSE for long ops instead of 30s polling UX map; FR-P39 locked (vetoable)
D-077 Bulk actions across inventory pages (Discovery/Keys), not just Certificates UX map; FR-P40 locked (vetoable)
D-078 Every board ticket carries a decision-complete spec (docs/board/specs/<id>.md) before it is claimed, so a cheaper model can execute it (validator reports coverage) the owner "full details for a cheaper model"; kickoff §2.1; NFR-P4 locked
D-079 Fix the PKCS#11 HSM backend (doesn't compile today) key-mgmt map G-32; FR-P41 locked (vetoable)
D-080 Wire + persist Cloud KMS (dead code today) key-mgmt map G-34; FR-P42 locked (vetoable)
D-081 Fix PQC/hybrid key export serialization (broken today) key-mgmt map G-31; FR-P43 locked (vetoable)
D-082 CA re-key/rotation lifecycle + guard against the bare-RotateKey footgun key-mgmt map G-35; FR-P44 locked (vetoable)
D-083 Key-generation policy (algorithm allow-list / min-strength) key-mgmt map G-42; FR-P45 locked (vetoable)
D-084 M-of-N key ceremony state machine (US-002/NFR-011) key-mgmt map G-41; FR-P46 locked (vetoable)
D-085 Secure key destruction: zeroization + KMS ScheduleKeyDeletion (RISKS.md claim is false) key-mgmt map G-40; FR-P47 locked (vetoable)
D-086 HSM/KMS support for ML-DSA/hybrid keys (or documented software-only risk) key-mgmt map; FR-P48 locked (vetoable)
D-087 Per-key ACL + rotation schedule/auto-rotate + key-compromise workflow key-mgmt map; FR-P49 locked (vetoable)
D-088 Dual-control/quorum for destructive key ops key-mgmt map; FR-P50 locked (vetoable)
D-089 FIPS 140-2/3 posture (federal/regulated buyers; NFR-011) key-mgmt map; FR-P51 locked (vetoable)
D-090 Real versioned migration runner (the 20 migration files are dead code) deploy map G-33; FR-P52 locked (vetoable)
D-091 /readyz verifies real dependencies (static stub today) deploy map G-37; FR-P53 locked (vetoable)
D-092 CA-key + hub DB backup/restore + DR tooling with executed drill (disk loss = permanent CA loss today) deploy map G-36; FR-P54 locked (vetoable)
D-093 Wire + fix the deploy pipeline (smoke.sh 404s; by-digest.sh unwired) deploy map G-38; FR-P55 locked (vetoable)
D-094 Reconcile Helm chart with docs + fix image path + external-secrets (default install fails today) deploy map G-39; FR-P56 locked (vetoable)
D-095 Compose quickstart-true (missing files, sqlite/pg conflict, UI build) deploy map; FR-P57 locked (vetoable)
D-096 Containerize agent + MCP + certmanager deploy map G-29; FR-P58 locked (vetoable)
D-097 Chart HA/observability objects (Postgres/ServiceMonitor/PDB/NetworkPolicy) deploy map; FR-P59 locked (vetoable)
D-098 /metrics on all serving paths + Prometheus scrape wired deploy map; FR-P60 locked (vetoable)
D-099 Air-gap/offline install bundle (regulated/ADCS market) deploy map; FR-P61 locked (vetoable)
D-100 Infrastructure-as-code (Terraform to stand up the platform) deploy map; FR-P62 locked (vetoable)
D-101 Distribution packaging + reconcile the cosign signing model deploy map; FR-P63 locked (vetoable)
D-212 Migrated ADCS templates meet the active key-size policy instead of weakening it (2026-10-18, ADCS rehearsal B2). The migration raises an RSA template's minimum key size to the strictest enabled policy floor and says so in the dry run ("key size raised from N to M to meet policy X"); re-applying a migration or migrating a template with the same name and OID updates the existing template through the normal approval instead of returning 409. Live rehearsal: migrated RSA-2048 templates were refused by the Baseline policy and could not be replaced. W33-19 rehearsal; replace-adcs.md locked
D-213 DC, Kerberos and RAS templates migrated from ADCS are restricted from Windows autoenrollment (2026-10-18, B5). Templates whose EKUs mark them DC/Kerberos/RAS-only get auto_enroll=false and enroll list ["pki-admin","protocol:wstep:restricted"]. XCEP/WSTEP enforce a template's enroll list only when it contains a protocol:wstep entry (protocol:wstep = every Windows client, protocol:wstep:<fqdn> = one machine; protocol:wstep:restricted matches nobody), so existing API-role-only lists keep their pre-change behaviour. A workstation was offered and tried to enroll DC templates; Kerberos gives the hub no groups, so grants are by host FQDN. W33-19 rehearsal locked
D-214 Estate revert restores the pre-takeover management state (2026-10-18, B4) and inventory re-sync never downgrades a taken-over certificate (B3). Revert sends inventory-origin certificates back to external and others to unmanaged, auditing {from,to}; renewal method and owner team are not yet restored (follow-up). Rehearsal: revert produced unmanaged, and a re-sync silently undid a takeover. W33-19 rehearsal locked
D-195 Team policy semantics are back-compat; loosening is approval-gated (W33 lead, 2026-10-17). No policy row for a team = unrestricted; an empty allow-list = no restriction on that axis; max_validity_days 0 = no cap; monthly_quota 0 = unlimited. CREATE from no row applies at once (always a tightening). DELETE, emptying a non-empty list, adding to a non-empty list, raising a cap/quota or setting it to 0 are loosenings and go through the pending-action queue (proposer ≠ approver). Lookup/counter errors fail closed (503). W33-20 said absent = deny-all, W33-21 said absent = unrestricted; deny-all would refuse every non-admin issuance after upgrade (non-admin team = principal id). Keeping two-person control on every loosening preserves the reason W33-20 chose deny-all. W33-20, W33-21; UC-M04 locked
D-196 Team policy reads are scoped (W33 lead, 2026-10-17). A non-admin may read only its own team's policy; listing and reading other teams needs pki-admin or auditor. Refusals are audited. Policies reveal another team's allowed CAs and domains. W33-20, W33-22 locked
D-197 A fresh hub starts with zero CAs (first-run mode) instead of exiting (W33 lead, 2026-10-17). With no CA, no KRYPTKEEPER_DEFAULT_CA_ID and no KRYPTKEEPER_BOOTSTRAP_CREATE_ROOT, the hub logs [FIRST-RUN] and starts; ACME/EST/CMP/WSTEP resolve the default CA per request and answer 503 until a root exists; SCEP/XCEP need a restart. A ListCAs error or a missing explicit default CA stays fatal. The listener serves an in-memory ephemeral self-signed certificate (never plain HTTP) until the root exists and the hub restarts. The onboarding wizard's Root CA step (UC-L01) was unreachable on a stock install; the bootstrap token and first login must not cross a cleartext listener. W33-32 (gap of W33-02) locked
D-198 W33 agent enrollment extends W29-06's tokens rather than adding its own (W33, 2026-10-17). W29-06 (agent_enrollment_tokens, migration 000240, /api/v1/agent/enrollment-tokens, kkenr_ secrets, SHA-256 at rest, default 24 h / max 7 d) is canonical. W33-24 adds: tenant scope (migration 000323 adds tenant_id; mint stamps the caller's tenant, list/revoke see only it unless tenant bypass, a cross-tenant id is 404 like an unknown one); attach (the conditional UPDATE that redeems also sets redeemed_agent_id); /agent/register per-IP rate limit (429), 401 when no credential is sent, and one identical 403 for unknown/used/expired/revoked tokens; audit detail carries the token id, never the token. W33's name_hint maps onto label, used_at onto redeemed_at, agent_id onto redeemed_agent_id. W33-25: the agent reads KRYPTKEEPER_ENROLL_TOKEN from env or its env file only (never argv), sends it as enrollment_token, and scrubs it after exchange; TargetSetup mints/revokes on W29's routes. Open self-registration stays off by default (W5-07). One token model instead of two; W33 keeps its hardening on top of W29's API. W29-06, W33-24, W33-25 locked
D-199 On-behalf-of certificate requests always require approval (W33, 2026-10-17). The request is enforced against the delegator's team policy and quota; delegation is tenant-scoped and never inferred from team_id; the delegate cannot approve; audit rows carry requester, delegate and approver. Spec recommended default; keeps delegation from becoming a policy bypass. W33-23 locked
D-200 SSO override lock-out guard (W33, 2026-10-17). A sso.oidc_* config override is refused (409, audited) unless an enabled local admin exists and the IdP discovery probe passes; the probe goes through the egress client (https only, no redirects, no loopback/link-local/metadata, 3 s, 1 MiB). In oidc mode a local login-session JWT (break-glass) still authenticates so a bad override can be reset; DELETE of an override is never guarded. Prevents an override from locking every admin out; the probe must not be an SSRF primitive. W33-06 locked
D-201 Requester role (W33, 2026-10-17). Fixed role with certificate.read + certificate.issue, writes confined to POST /api/v1/certificates plus self-service routes; scoped keys cannot widen it. Its UI shows only Request and My Requests. Least privilege for self-service requesters. W33-22 locked
D-202 Tenant gates fail closed when the tenant store is unavailable (security review F6, 2026-10-17). With MULTI_TENANCY on and no tenant store (NewTenantStoreFromEnv returns nil on a DB open or schema error), caVisibleToTenant, templateVisibleToTenant, filterCAsByTenant, filterCertificatesByTenant, filterTemplatesByTenant, the CA-backed rows of filterApprovalsByTenant and checkPendingActionTargets deny non-bypass principals (lists empty, by-ID not visible, targets refused) instead of passing everything. Unscoped super-admins and MULTI_TENANCY off are unchanged. Matches keyVisibleToTenant and cmdbCertVisible. A Postgres blip at boot must not expose every tenant's CAs, certificates and templates until restart. security review F6 locked
D-204 SCIM has a grant ceiling and a default-tenant scope (security review F7, 2026-10-17). The SCIM bearer can never assign break-glass, bootstrap or mcp-agent, and can assign pki-admin / super-admin only when SCIM_ALLOW_ADMIN_ROLES=true (default off). The ceiling applies to user create, user PATCH, APP_SCIM_DEFAULT_ROLE and the APP_SCIM_GROUP_ROLE_MAP_JSON group map (a SCIM client creates the groups, so the map is reachable with the bearer alone): a refused role answers 403 and is audited as denied, and a group still records membership but the privileged role is withheld. With MULTI_TENANCY on, SCIM reads, deprovisions and re-roles only default-tenant users; other tenants' users answer 404. SCIM deprovision (PATCH active=false, DELETE) and group member removal now cancel the user's pending issuance approvals (CancelPendingForRequester, W33-23); group removal cancels only approvals whose team id equals the group displayName. The SCIM bearer is one long-lived, tenant-less secret held by the IdP; without a ceiling a leak of it is a leak of every admin role, and break-glass holders can override dual control. Operators who really provision admins from the IdP opt in explicitly. Residuals, accepted for v1: custom roles are not inspected, so a custom role with admin-equivalent permissions is still assignable through SCIM; and pki-operator, an approver role, stays assignable because provisioning operators is the normal SCIM use. Whoever holds the bearer already controls identity, so the ceiling bounds the blast radius of a leaked bearer rather than making SCIM untrusted. Out-of-scope user targets, withheld group roles and group removals are audited; removing a non-member cancels nothing. security review F7; W33-23; D-102 locked (vetoable)
D-203 Agent, NHI and SPIFFE admin APIs are global-admin-only under multi-tenancy until they carry a tenant column (security review F3/F4, 2026-10-17). With MULTI_TENANCY on, GET /api/v1/agents, GET /api/v1/agents/{id}/tasks, DELETE /api/v1/agents/{id}, GET /api/v1/nhi/identities, POST /api/v1/nhi/identities/{id}/(approve, reject, revoke) and POST /api/v1/spiffe/svid return 403 (audited as denied) unless the caller is an unscoped super-admin (tenantBypass). Agent-credential endpoints (/api/v1/agent/*, enrollment) and the join-token workload paths are unchanged, as is proposing an NHI identity. No migration in v1; per-tenant agents, NHI identities and SPIFFE trust domains are the follow-up. The agents and nhi_identities tables and the SPIFFE signing CA have no tenant, so any tenant-scoped filter would be a guess; denying the operator surface is the only isolation that holds today. Tenant admins lose fleet visibility until the column lands. security review F3, F4; D-102 locked (vetoable)
D-193 Live ecosystem legs ship as PENDING-RUN harnesses. F5/Citrix appliance (W32-06), real Slack/PagerDuty/Teams (W32-09), ServiceNow dev instance + Jira Cloud (W32-18) and the clean-VM contributor dry run (W32-20) need accounts or hardware the build host lacks; each ships its harness, env contract and a results doc marked PENDING-RUN. Local stand-in results are labelled stand-in, never as the real service. Notification retries stay 3 attempts / linear 5 s (W32-09 asserts the current contract); 8-attempt exponential backoff, a Teams delivery channel and owner_team routing are filed as prerequisite tickets, not faked. W32-06, W32-09, W32-18, W32-20 locked
D-192 Every ITSM event class has a producer. announceITSM sends one itsm message per enabled itsm notification rule, tenant-visible via caVisibleToTenant, no-op when the provider does not deliver. Rules target ITSM with channel itsm and an ITSM connection id as target (migration 000302 widens the channel CHECK; /notifications/test-delivery still refuses itsm so a test never opens a real ticket). approval_pending fires on approval create (id approval:<id>, links the ticket); renewal_failed fires on the scheduler's terminal auto-renew failure (id per failure episode, fingerprint = cert SHA-256, so the next verified renewal auto-resolves it; the manual-execute path is a follow-up); expiry_no_owner fires once per cert per window. Reconcile runs hourly and alerts once per ticket deleted again. W32-26, W32-28, W32-33 locked
D-191 ServiceNow ticket type picks the table. ticket_type incident (default) or change_request; the table is recorded in the stored TicketRef.URL so later Exists/Resolve/Approval calls hit it. A change resolves to state=3, close_code=successful; Find searches incident then change_request and treats 403/404 on change_request as no match. Approval reads the record's approval field and the newest approved sysapproval_approver row (integration user needs read on it). W32-11, W32-26, W32-28 locked
D-190 ITSM connection event_classes is an array of {class, ticket_type}. Classes `renewal_failed approval_pending expiry_no_owner; ServiceNow types incident change_request, Jira any issue-type name (default Task); stored and returned verbatim, legacy string arrays still read. POST /itsm/connections/{id}/test is admin-only, tenant-scoped (404 cross-tenant), audited, read-only (Find("kk-connection-test")`), and returns one of three fixed details, never the upstream body.
D-189 ChatOps posting is best-effort and never blocks an approval. Approval and pending-action stores call a hook on create/decide; one ordered worker (256-slot queue, drop with warning when full) posts to the owner team's Slack channel / Teams conversation from notifications.slack_team_channels / notifications.teams_team_channels (env fallback); tokens/app password are Secret config keys. Unmapped team or missing credentials = no HTTP call. Message refs live in the self-healing chatops_message_refs table and outcomes (approved/rejected/expired) edit the message. W32-22, W32-23, W32-27 locked
D-188 Teams tokens are validated with the stdlib, RS256 only. Bot Framework JWT: alg must be RS256 with a kid (checked before key lookup), RSA >= 2048, iss/aud(=TEAMS_APP_ID, empty fails closed)/serviceurl exact, exp/nbf with 5-minute skew; JWKS via the egress client, cached 24 h, refetched at most once a minute on unknown kid. No JOSE dependency added. Only AAD tenants with at least one identity mapping can act. W32-23 locked
D-187 ChatOps decisions go through the real approval routes. Slack (signed v0:ts:body, 5-minute skew, replay guard; secret SLACK_SIGNING_SECRET) and Teams verify before parsing; chatopsDecide maps the external identity to an active Kryptkeeper user in the mapping's tenant and serves /approve or /reject through the mux with an injected principal and the chatops channel, so tenant gates, approver roles and proposer≠approver all apply. Every refusal is audited and changes no state; the identity map is admin-only. W32-21, W32-23 locked
D-186 Approvals record their acting channel. `ApprovalChannel{ui itsm chatops, external_id}rides in the request context; approval.* audit rows lead withchannel/external_idkeys and action.* rows append them (no schema or openapi change).authenticateDecider` honours an injected principal only when a non-ui channel is also set, so an HTTP caller can never supply one. W32-15
D-185 Ticket approvals are a poller, not a webhook. The ITSM approval bridge polls linked tickets every 60 s (Jira status + ServiceNow approval), maps the approver through the admin-only itsm_principal_map (000301), and decides through the real approve route with the itsm channel; reopening a ticket after approval does not undo it; bootstrap principals cannot be mapped. Pending actions are not bridged. W32-12, W32-26 locked
D-184 ITSM framework. Migration 000300 adds itsm_connections / ticket events; one ticket per event id (<event_id>:<connection>) across retries, backoff 5 min to 6 h, credentials from the encrypted credential store, connectors built through the egress client. /api/v1/itsm/** is admin-only; deleting a connection with ticket history is 409. W32-10 locked
D-183 Webhooks are signed v1=HMAC-SHA256(ts.body). Headers X-Kryptkeeper-Timestamp, -Event-Id, -Signature; during rotation the previous secret also signs for 24 h after the new one is set (v1=new,v1=old). No secret = unsigned with one WARN per process. Receivers reject stale (> 5 min) or unsigned deliveries (docs/ops/WEBHOOK_VERIFY.md). W32-08, W32-16 locked
D-182 The OpenAPI spec is served byte-identical and drives the SDKs. GET /api/v1/openapi.yaml serves the embedded file unmodified; info.version in the repo equals the release version (release prep bumps it; scripts/check-spec-version.sh fails the release on drift). Go/TS/Python SDKs are generated by openapi-generator 7.25.0 in the release workflow and smoke-tested against a live hub before goreleaser runs. Terraform provider: 202 from the hub is a pending-approval error carrying the action id; acceptance runs against a native hub. W32-01..05 locked
D-194 Wave progress counts delivery, not issuance. A member whose delivery outcome is delivery_unsupported or failed (persisted as migration_wave_members.delivery_status) is reported as undelivered, not migrated, and keeps the wave out of done even when its successor cert is full-chain quantum_safe; a later migrated result clears it. Found by the W31-11 live run. W31-21; D-105, D-175 locked
D-181 PQC key custody is stated, not implied. The Keys pages, Cloud Keys page and GET /reports/key-custody (pqc_custody_statement) carry one statement that ML-DSA and hybrid keys are software-keystore-only (docs/ADR_PQC_KEYS_SOFTWARE_ONLY.md); a Go drift test pins the UI text to PQCCustodyStatement. W31-19; FR-P48 locked
D-180 Scale and timing tests run nightly, not on PR CI. The 1,000-cert wave run (W31-10, ~80s) and the 100k-cert blast-radius p95 test (W31-18) skip unless KRYPTKEEPER_SCALE_TESTS=1, which nightly-scale-and-protocol.yml sets; PR CI runs internal/bootstrap under -race near its 30m budget, where a timing bound is meaningless. The 200-member wave failure-injection tests stay on PR CI. W31-10, W31-18 locked
D-179 Blast radius is honest about scope. GET /api/v1/blast-radius: unknown target 404; a cert or CA owned by another tenant 403 (same convention as CA revoke; it reveals existence); algorithm impact is computed on the tenant-filtered graph; edge_coverage is disclosed; sub-CA chaining uses ListCAs (cap 1000) and falls back to cert-only edges on error. Approve/revoke screens gate on the preview; issuance approvals show a static notice; bulk-revoke impact is deferred. W31-16, W31-17, W31-18 locked
D-178 Non-PQC algorithm transitions reuse PQC waves. Wave execution takes an optional target_algorithm (must be in the template's allowed_algorithms and a supported transition target; else 400 + audit); BuildTransitionCSR wraps BuildMigrationCSR for PQC and adds the classical branch (migrator.go unchanged). v0.19 UI is a caption only; no auto-derive endpoint. W31-14, W31-15 locked
D-177 PQC issuance refusals reuse the FIPS posture unchanged. Issuance calls keystore.CheckFIPSAlgorithm (hybrid refused whenever FIPS is enabled; ML-DSA refused only when fips140 is enforced); allow-list, FIPS and HSM-PQC refusals are 422 and audit certificate.issue_refused with `reason=allow_list fips hsm_pqc algorithm=instead of the generic failure row. FIPS-mode tests skip unless run withGODEBUG=fips140=on only`.
D-176 PQC wave approvals expire and are separately audited. KRYPTKEEPER_PQC_WAVE_APPROVAL_TTL_HOURS (default 24, separate from APPROVAL_TTL_HOURS); an expired approval is refused 409 and audited denied; proposer cannot approve (403). Audit keeps pqc.wave_execute_propose/approve and adds pqc.wave_member_result and pqc.wave_regressed; alerts pqc_wave.member_failed and pqc_wave.regressed carry no key material. W31-09 locked
D-175 PQC waves verify delivery and roll back, but production delivery stays manual for now. runWaveMigration delivers through a waveDeliverer seam; verify failure rolls back and marks the wave regressed; progress counts only members whose current cert is PQC (absent members are not migrated; leaf-only never reaches done). Production uses unsupportedWaveDeliverer: bound targets report delivery_unsupported (D-103 generate-without-deliver) until ML-DSA private-key export exists (follow-up). W31-08, W31-11; D-103, D-105 locked
D-174 ML-DSA CAs sign their own CRLs and OCSP responses. Hand-rolled RFC 5280/6960 DER in the new internal/revsign package (placed outside internal/ca to avoid an import cycle); classical issuers still use the stdlib. CAListItem.revocation_signing reports ml-dsa or classical (hybrid CAs sign classically). OpenSSL 3.6.5 verifies both (W31-04 live run). W31-05, W31-04 locked
D-173 PQC readiness labels degrade, never flatter. An unknown-OID key that is not ML-DSA is not_applicable; Ed25519 is classical; a cert whose issuing CA chain cannot be resolved (non-empty caID) takes the weaker leaf-only label; imported certs with no issuer keep the single-hop answer. CBOM certificate components carry kryptkeeper:pqc_readiness. W31-01, W31-02; D-104, D-105 locked
D-172 Track IETF LAMPS composite signature OIDs after v1.0; the hybrid encoding stays the project's own until then. Kryptkeeper's hybrid certificates use the alt-sig extensions of draft-ounsworth-x509-alt-sig-alg-07 (docs/PQC_HYBRID_ENCODING.md); no interop with LAMPS composite is claimed. Revisit when the composite draft is an RFC and OpenSSL or another mainstream verifier accepts it. Decision-tracking item only, no code. W31-07; D-104; FR-P48 locked
D-171 Process-shared HA replica ID and deduped failover alert (W30-27). Every scheduler's HACoordinator now shares one random replica ID per process (regenerated on restart), so one dead hub reads as one previous holder. Lease takeover from a different holder writes audit ha.failover per lock and at most one scheduler.failover alert per previous holder per 10 min; first acquire, self-renew and a graceful Release (row deleted) emit nothing. backup.stale measures from the newest successful backup.create audit row, latches per episode in memory (a new leader may re-alert once), and never alerts when no backup was ever taken, since backups are on-demand only W30-27, W30-23 locked
D-170 Inventory refresh fetches only changed rows (W30-25/26). The 2 s table refresh first scans (fingerprint, updated_at, revoked) and fetches full rows only where rowSupersedes could accept them (missing, newer, or newly revoked); semantics unchanged. 100k Postgres: search p99 975→115 ms, peak RSS 2.49→1.70 GiB. Resident inventory (~17 KiB/cert) stays the limit for 1M; lazy parsing is deferred W30-21, W30-25, W30-26 locked
D-169 Fan-out reports undelivered (W30-04). FanOutChannel.Send returns ErrNoConfiguredChannel when no member is configured instead of nil, so CT findings are not marked notified when nothing was delivered. Members come from deliveryChannelsFromEnv, not the escalation-wrapped provider, so fan-out cannot trigger escalation loops W30-04, W30-03 locked
D-168 Escalation target is a Secret config key (W30-03). notifications.escalation_target can hold a webhook URL or routing key, so it is Secret (spec said false); GET /config shows only configured. HTTP error text passes through delivery.RedactURLs before logging or escalation W30-03 locked
D-167 Expiry thresholds fire once per crossing per fingerprint (W30-01/02). A recorded crossing never re-fires for that fingerprint (renewal = new fingerprint = new cycle); a template-scoped rule overrides all global rules for that cert; pct/template requests return 503 when the options store is down rather than dropping options. A routed (@owner_team) rule is marked crossed once at least one route accepts; team routes are tenant-checked with caVisibleToTenant W30-01, W30-02 locked
D-166 SLO samples are in memory; first tick is the baseline (W30-05/06). Ratio SLOs are judged over the 30-day window from in-process samples, so after a restart pre-existing failures do not page until new ones arrive (documented in the dashboard __comment). Objectives are runtime-tunable via config keys slo.* (ratios 0.5<v<1, latency 0.01–3600 s); budget fields stay aggregate-super-admin-only per D-102 W30-05, W30-06, W30-15 locked
D-165 Anomaly remediations are propose-only and instance-wide (W30-08). Five remediation actions only create pending actions in the approval queue (proposer cannot approve; mcp-agent cannot approve); "disable for requester" disables the template/CA instance-wide with the blast radius shown; under multi-tenancy only a super-admin can approve because CAs/templates are instance-global; revoke_batch uses reason keyCompromise W30-08, W30-16 locked (vetoable)
D-164 NL policy drafts land disabled behind approval (W30-09). /policies/draft persists nothing; /policies/draft/submit re-parses server-side (client rules and enabled are ignored), stores the policy disabled and opens a pending policy.activate; parser algorithm names are mapped to engine names before storage. Accepted residual: an admin can still enable a draft via PUT /policies/{id} W30-09, W30-17 locked
D-163 SSE: replay ring, per-principal cap 5, tenant-filtered (W30-13/14). Events carry id:; a reconnect with Last-Event-ID replays from a 256-entry ring filtered per principal's tenant; the 6th stream gets 429 (events.stream.reject audited). The UI hook falls back to polling after 3 errors and resyncs queries after reopening, since a reopened EventSource cannot send Last-Event-ID W30-13, W30-14 locked
D-162 slog JSON logging with redaction in ReplaceAttr (W30-10/11). Secrets are redacted in the handler's ReplaceAttr (covers With/WithGroup/nested attrs and message text); probes log at Debug, 5xx at Error; std log is banned outside tests by lint W30-10, W30-11 locked
D-161 /metrics optional bearer (W30-12). metrics.bearer_token is a Secret config key compared in constant time (SHA-256 both sides), resolved with a 10 s TTL, never logged; /healthz and /readyz stay unauthenticated; satellites expose ops listeners via KRYPTKEEPER_OPS_ADDR W30-12 locked
D-160 W30 human/nightly runs ship as PENDING-RUN (W30-19..23). Egress capture, 1M bench, 50k storm, rolling upgrade and the real Slack/PagerDuty drill are recorded with exact commands, not invented numbers; the nightly perf job is expected to fail if a bar is missed. CT egress needs a 65-min window (scan interval minimum 1 h) W30-19, W30-20, W30-21, W30-22, W30-23 locked
D-140 Evidence-pack mail retries 3 times in-scan and raises evidence.delivery_failed (W28-20, 2026-10-16). A failing evidence mailer is tried 3 times per due schedule, waiting EVIDENCE_RETRY_DELAY_SECONDS (default 30) between attempts; each failure logs evidence scheduler: send <id> failed. After the 3rd failure the scheduler emits evidence.delivery_failed through the W28-04 AlertEventSink (default sink: log line plus audit row, evidence_schedule resource) and does not call MarkSent, so the schedule stays due and the next poll retries. Detail carries schedule id, framework, attempts and error, never recipients or SMTP credentials. W28-20; W28-13 locked
D-141 Posture/report pages drill through to existing list filters, and the audit page seeds its filters from the URL. CA Health and Issuance Velocity "By CA" rows link to /certificates?ca_id=<ca id>; Revocation Activity "By CA" rows and the recent-revocation CA cell link to /certificates?status=revoked&ca_id=<ca id> and the common name to /certificates/<fingerprint_sha256>; Change Audit resource cells link to /audit?resource_id=<id> (the change-audit payload carries no resource_type, so a guessed type would risk empty results; events with no resource fall back to /audit?action=<action>). Audit.tsx seeds its draft and applied filters from action, actor_type, resource_type, resource_id, outcome on load; resource_id is filtered server-side (already supported by GET /audit and the audit stores) and shown as a clearable "Filtered to resource" chip. No new query keys beyond what Certificates.tsx and GET /audit already read W28-21; W28-18 locked
D-127 Takeover of unmanaged certificates is audit-logged, not approval-gated (the owner, 2026-10-15, option card "Audit only"). Takeover assigns an owner and a renewal path and flips management_state to managed; no key material moves. Every takeover writes an estate.takeover audit row and is reversible by POST /api/v1/estate/revert. Choosing an upstream renewal path stays governed by the policy engine (UC-E01). FR-P69 is amended accordingly. No key moves; the code already behaves this way (internal/bootstrap/handlers_estate.go header). docs/v1-vision/06-DECISIONS.md #1; UC-D08; W11-06, W24-31 locked
D-128 Descope FR-063 agent self-update from v1.0. Agent upgrades are done by package manager, MSI, config management or image replacement. No self-update or manifest-verification code exists (THREAT_MODEL.md); a self-updating binary adds a signing-key and downgrade-attack surface the v1.0 threat model has not accepted. Revisit in v1.x as "Agent self-update with signed manifest". UC-M24; FR-063 locked
D-153 The RFC 3161 time-stamp service (W29-14) signs with an operator-provisioned key and certificate, and is closed to anonymous callers by default. KRYPTKEEPER_TSA_CERT_FILE + KRYPTKEEPER_TSA_KEY_FILE (PKCS#8, mode 0600 enforced, optional KRYPTKEEPER_TSA_CHAIN_FILE and KRYPTKEEPER_TSA_POLICY_OID) because the hub CA cannot mint a spec-valid TSA certificate (it never marks the EKU critical and refuses extra id-ce extensions, and openssl ts -verify requires exactly that). POST /api/v1/tsa needs a hub principal unless KRYPTKEEPER_TSA_ALLOW_ANONYMOUS=true (startup WARN), because jarsigner and openssl ts cannot send a Bearer token; no per-source rate limit exists yet, so anonymous mode is unthrottled. Follow-up: a CriticalEKU issuance option so the hub can issue its own TSA certificate. W29-14 spec decisions locked
D-152 Code-signing issuance from a CI OIDC token (W29-11/12): CSR keys are ECDSA P-256/P-384/P-521 or RSA >= 3072 (Ed25519, RSA-2048 and ML-DSA are refused with 400); failing to record an issued certificate in the inventory is fatal (503, nothing handed out), because an unrecorded certificate cannot be revoked or policy-checked; trust-rule creation is dual control through the approval queue while deletion is single control (admin-only, audited), because removing trust is the safe direction. A trust-rule issuer must be https with no loopback exception, the rule's CA must be visible to the proposer's tenant (checked at proposal and again at approval), and a rule's repo pattern must name an owner and its ref pattern must start with refs/. W29-11, W29-12 spec decisions locked
D-151 Agent enrollment: the shared, reusable CSV enrollment secret (KRYPTKEEPER_AGENT_ENROLLMENT_SECRETS) is demoted to a warned transition path; per-agent single-use enrollment tokens (admin-minted via POST /api/v1/agent/enrollment-tokens, redeemed once at /api/v1/agent/register, revocable) are the preferred mechanism. The hub logs a startup warning when a shared secret is configured (never the secret itself) and unauthenticated open registration stays off. A shared reusable secret cannot be attributed to one agent or revoked individually; single-use tokens bound to a label and TTL limit blast radius and leave an audit trail. W29-06, W29-07 locked
D-150 The request-time NHI authorizer is built and tested but not wired to any request path yet (W29-03). NHIAuthorizer.Authorize resolves scopes live by SPIFFE ID with no cache (so revocation and scope edits apply on the next call, inside the 60 s bound) and RevokeBySPIFFEID burns unredeemed join tokens, but nothing in the hub presents an SVID as a request credential until mTLS/SVID principal resolution lands. Follow-up ticket: SVID-to-principal resolution on the listener. The SVID itself lives to its expiry (max 7 d) until CRL/OCSP linkage ships. W29-03 spec decisions (registry revoke, wiring, caching) locked
D-126 After a CA key is marked compromised, OCSP keeps answering for leaves issued under it, signed by the retired (compromised) key, until the key is retired. A relying party that holds only the old anchor can verify nothing signed by the new key, so a revoked answer from the old key is the only way it learns those leaves are revoked; an attacker holding the key could forge good either way, so refusing (unauthorized) removes the true signal without removing the risk. the owner chose this recommended option on 2026-10-16 (W23 thread). The old anchor must still be distrusted out of band; retired keys are destroyed by RetireRotatedKeys, after which old-issuer requests answer unauthorized W23-19, W23-41, W23-38 locked
D-125 Bearer tokens (AUTH_MODE=jwt/oidc) are read-only by default. A valid token gets role viewer unless APP_AUTH_ROLE_CLAIM + APP_AUTH_ROLE_MAP_JSON (ordered claim-value -> role pairs; first match wins; mcp-agent and bootstrap refused) grant more. Also: oidc mode requires issuer and audience, nbf is checked, HS256 secrets must be >= 32 bytes, and auth configuration errors stop startup The 2026-10-09 audit (A02-4) showed every token from the IdP, for any client, could issue certificates; weak HS256 secrets let any session holder forge pki-admin (A02-3) the owner, 2026-10-09 (docs/security/final-report.md §6) locked
D-124 SSH certificates are issued only within a template's SSH policy. POST /api/v1/ssh/certificates requires template_id; the template's ssh_policy (cert types, exact allowed principals, host patterns, max TTL) bounds what is signed, and a template without one cannot issue SSH certificates The 2026-10-09 audit (A01S-4) had a pki-operator mint a root certificate; FR-P70 already said SSH certificates are issued against a template the owner, 2026-10-09 (docs/security/final-report.md §6) locked
D-123 Multi-tenancy ships in v0.9 as experimental. A hub with MULTI_TENANCY on refuses to start unless KRYPTKEEPER_MULTI_TENANCY_EXPERIMENTAL=accept-risk is set, then logs a warning; the UI labels it Experimental. Tenant isolation is not a security boundary in v0.9: the 2026-10-09 audit's tenancy findings (A01-001, A01S-3, A01-002, A01-004/005, A01-006, A01S-6, A01-007, OWASP-002) are scheduled for v0.10 Fixing every tenancy finding was the largest remediation group; the owner chose to gate and label rather than delay the release. Findings that also hit single-tenant installs are fixed now the owner, 2026-10-09 (docs/security/final-report.md §6) locked
D-122 Key dual control is on by default (2026-10-09, owner decision after the security audit). KRYPTKEEPER_KEY_DUAL_CONTROL unset or anything other than false means ON; only an explicit false (case-insensitive) disables it, and the hub then logs a startup WARNING. Every route that lets private key material leave the hub is covered, not only POST /keys/{id}/export: /admin/backup (key_backup), /keys/escrow (key_escrow) and its recovery (key_escrow_recover), /keys/leaf-escrow (key_leaf_escrow) and its recovery (key_leaf_escrow_recover), and /keys/byok/export (key_byok_export) all answer 202 with an action_id, a DIFFERENT human approves it in the pending-action queue, and the proposer redeems a single-use grant (10-minute TTL) by repeating the request with approved_action_id; recovery and BYOK grants are bound to the digest of the bundle the approver saw. With the guard on and the queue unreachable the routes fail closed (503). Separation of duties follows the human, not the credential: API keys record created_by (the minter's canonical human; a key minted by a key resolves to the first human), so a key an admin mints under any principal_id cannot approve that admin's proposals (nor can the admin approve proposals made with that key); the bootstrap token never approves or rejects (setup/break-glass credential); mcp-agent still never approves. Approvals execute once: the approve path wins a compare-and-set (pending to executing) BEFORE running the executor, so racing approvals run the action once and losers get 409. Known limit: one person holding both the bootstrap token and a named login still presents two ids, so a proposal made with the bootstrap token and approved by that person's own session cannot be detected; the bootstrap token can no longer be the approver, which closes the path to a token-plus-session approval. Two humans are required: keys minted with the bootstrap token all resolve to the bootstrap holder, so a bootstrap-only install needs two config-provisioned admin keys or SSO/login users to approve, or the explicit KRYPTKEEPER_KEY_DUAL_CONTROL=false opt-out (logged). A2A7-001, A07-4, LLM-006, A01-003 (2026-10-09 audit); D-088 (W9-10) locked
D-121 SCEP enrollment uses one-time, name-bound challenges (the owner, 2026-10-08: "do W20-17 then W20-16, merging each PR when CI is green"). A pki-admin or pki-operator mints a challenge for one device's names with POST /api/v1/scep/challenges (default 1 h, at most 24 h; only its SHA-256 is stored). PKIOperation consumes it atomically and issues exactly those names, never the CSR's. KRYPTKEEPER_SCEP_ENABLED=true turns SCEP on. The static shared KRYPTKEEPER_SCEP_CHALLENGE and the unauthenticated /scep/mscep_admin that handed it out are removed; if the old variable is set, SCEP stays off. Intune never used mscep_admin; real Intune support is W20-23. The CMP shared secret has the same reusable shape and is not changed here. Same class of hole as W20-08 (WSTEP) and W20-14 (EST): a reusable secret, given out unauthenticated, that let its holder choose any name. docs/ops/SCEP.md (W20-16) locked (vetoable)
D-120 Plugin ABI versioned by api_version (kryptkeeper.delivery/v1); the hub supports the current and previous versions (the owner, 2026-10-08: "accept all"). docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-119 Plugins declare their credential and target schemas; the hub validates and stores them (the owner, 2026-10-08: "accept all"). Replaces growth of the shared pushCredentialPayload. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-118 F5 and Citrix become first-party reference plugins; the built-in pushers are deleted once the plugins pass the conformance kit and one real-device run (the owner, 2026-10-08: "accept all"). W19-11 is rewritten to: both pass the kit, at least one proven on a real device or trial VM. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-117 Plugin trust and distribution in v1: local upload with a pinned SHA-256, cosign signature verified when present, three tiers shown (first-party / verified / community), no remote registry before the repo is public (the owner, 2026-10-08: "accept all"). First-party plugins are signed with a separate plugin-signing key, not the release key. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-116 Enabling a plugin with a High or Critical capability goes through the pending-action queue, proposer ≠ approver; Standard-only plugins are enabled by a pki-admin (the owner, 2026-10-08: "accept all"). Re-approval when an upgrade widens the capability set. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-115 Plugins may receive private keys as a Critical capability, with second-person approval (the owner, 2026-10-08: "accept all"). F5/Citrix-style devices need the key; the alternative is CSR or device-keygen targets only. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-114 Delivery plugins run on the hub only in v1 (the owner, 2026-10-08: "accept all"). The agent's sudoers allowlist must not be widened invisibly by third-party code. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-113 Delivery plugin execution model (the owner, 2026-10-08: "accept all"). A: WASM with brokered host functions (capabilities enforced; one new pure-Go dependency, approval-gated). B: subprocess over stdio (any language; capabilities declared, not enforced). C: in-tree Go only (not a community system). Chosen: A, WASM; adding a pure-Go WASM runtime dependency (e.g. wazero) is approved. docs/design/DELIVERY_PLUGINS.md (W20-18) locked
D-112 EST authenticates with both RFC 7030 methods (the owner, 2026-10-07: "EST auth both"). HTTP Basic over TLS against a users file (KRYPTKEEPER_EST_USERS_FILE, bcrypt), with each user limited to DNS names under its own label-anchored suffixes; the subject is reduced to the CN and nothing else from the CSR survives. A TLS client certificate chaining to operator-configured anchors (KRYPTKEEPER_EST_CLIENT_CA_FILE) yields that certificate's subject and DNS SANs. Re-enrollment needs a certificate this hub issued, checked by the same ca.CheckHubClientCertificate as WSTEP renewal, and keeps its names. Credentials are refused on any request that did not arrive over TLS, and there is no challenge. Enrollment is off unless a method is configured, and the PR #34 lab override KRYPTKEEPER_EST_ALLOW_UNAUTHENTICATED is deleted. The client-certificate method and re-enrollment need KRYPTKEEPER_TLS_REQUEST_CLIENT_CERT=true (D-111). Known limit: revocation of a client certificate from an external anchor is not checked (the hub has no CRL for that CA); the operator controls which anchors are trusted. W20-14; D-111; D-110; PR #34 locked
D-111 The TLS client-certificate request is opt-in, off by default (the owner, 2026-10-07). KRYPTKEEPER_TLS_REQUEST_CLIENT_CERT=true turns on tls.RequestClientCert on the main listener. Unset, the hub sends no CertificateRequest. Why: W18-08 showed Windows never renews by TLS client certificate (D-110), and the listener-wide request made Windows' WinHTTP revocation fetch fail (ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED, W20-10) and made browsers show a certificate picker on the UI. The WSTEP TLS renewal path itself is unchanged and still enforced when on (validity, client-auth EKU, revocation, 403 plus audit); with the flag off it is unreachable, and non-Windows clients that need it opt in. Verified on the lab hub: with the flag off the handshake carries no CertificateRequest (TLS 1.2 and 1.3), with it on it does, and lab-win11 autoenrollment is unaffected. W20-13; D-110; D-109; W20-08 locked
D-110 How Windows renews, recorded against D-109 (the owner, 2026-10-07): a domain machine renews over Kerberos with a request signed by its old key; the TLS client-certificate renewal path stays, for non-Windows clients. Background: D-109 assumed Windows renewal would present the hub-issued certificate as a TLS client certificate. W18-08's live run on lab-win11 showed otherwise. CES clientAuthentication 8 means WS-Security message-level X.509 signing, which the hub does not implement. A domain machine renews over the Kerberos URI, sending a PKCS#7 SignedData around its CMC/PKCS#10 request, signed by the old key (MS-WSTEP 4.1.5.1). So: (1) XCEP advertises only the Kerberos CES URI; (2) WSTEP accepts the PKCS#7/CMC envelope, and identity still comes from Kerberos, never from the request; (3) the TLS client-certificate renewal path built in W20-08 (validity, client-auth EKU and revocation checks, 403 plus audit) is kept unchanged for non-Windows clients. Consequence found in W20-10: the listener-wide tls.RequestClientCert that path needs makes Windows' WinHTTP revocation fetch fail (ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED). CRL/OCSP are therefore also served on an opt-in plain-HTTP listener (KRYPTKEEPER_REVOCATION_HTTP_ADDR), and certificates point there (KRYPTKEEPER_REVOCATION_BASE_URL). W18-08; W20-08; W20-10; W20-11 locked
D-109 WSTEP/XCEP authentication model (the owner, 2026-10-06): Windows-integrated (Kerberos/Negotiate via SPNEGO, service account + keytab from the DC) for initial enrollment, plus client-certificate authentication for renewal. Background: until PR #25 /wstep issued client-auth certificates to unauthenticated callers. It is now off by default (KRYPTKEEPER_WSTEP_ALLOW_UNAUTHENTICATED is lab-only). Username/password (option b) was not chosen. W18-08/W19-10 cannot close on the unauthenticated path; they depend on W20-08 implementing this. PR #25; W20-08; W18-08; W19-10 locked
D-108 W19-06 acceptance narrowed to the certificate read path (the owner, 2026-10-06). The board said "pulls real users and groups" and "a group membership change is reflected on the next sync", but the hub's AD read path (adcs_live, W13-04) syncs userCertificate values only and has no user/group model. Accepted as met by the certificate analogue proven on real Samba AD: certificates attached to directory objects sync with origin=synced, and a certificate added to a NEW object appears on the very next sync (gated TestLive_NewCertificateReflectedOnNextSync). User/group directory sync is not a current product capability; it would be new product work, not a W19-06 remainder. W19-06; STATUS 2026-10-06 locked
D-107 W19-30 resolved: KEEP BOTH subject_alt_names and uri_sans on the certificate API — not a duplication bug. W18-14 flattened every SAN kind (DNS, IP, URI, email) into subject_alt_names as strings, but uri_sans — the pre-existing typed view carrying only URI SANs (e.g. SPIFFE IDs) — kept being populated too, so a URI SAN now appears in both places with nothing merging or reconciling them. the owner chose (2026-09-11) to keep both rather than drop the duplicate: (1) no consumer treats them as needing to agree — nothing merges subject_alt_names and uri_sans together, so there is no correctness hazard from divergence, only redundancy; (2) internal/bootstrap/renewal_executor.go's splitSubjectAltNames rebuilds a renewal CSR by re-classifying subject_alt_names back into DNS/IP/URI/email — narrowing that flat list to exclude URIs (on the theory that uri_sans already covers them) would break that rebuild, which needs every SAN kind in one list to reconstruct the CSR faithfully (W18-14's own point). Dropping uri_sans instead was also rejected: existing UI/API consumers reading it as the typed URI view (e.g. SPIFFE ID display) would break for no correctness gain. docs/openapi.yaml's CertificateItem.subject_alt_names/uri_sans now document this explicitly so a future reader doesn't mistake it for undetected drift again W19-30; W18-14 locked
D-106 V5 direction: Kryptkeeper manages the whole certificate estate, not only its own CA's output — CA-agnostic inventory + takeover paths, layered on the existing platform. the owner chose (2026-08-18) to combine the current EJBCA-killer trajectory with Venafi's category-defining mechanic: most customers need crypto inventory and management of certificates issued by OTHER CAs (DigiCert/Entrust/Sectigo/Let's Encrypt/ADCS) before — or instead of — switching CAs. Concretely: an estate model on inventory (origin internal|imported|discovered|synced + management_state managed|external|unmanaged), bulk import, an external-issuer connector framework the internal engine also satisfies, an ACME upstream client (incl. EAB) so renewals can execute AT the original CA, ADCS sync-in + a commercial-CA adapter interface, a one-click approval-gated takeover flow (renew-internally or renew-upstream), and an SSH CA extending the V3 sshkeys inventory to issuance. Everything reuses the existing spine (inventory, risk, ownership, approvals, audit, notifications, last-mile install) — connectors are providers behind interfaces, same as keystores. Scope calls made here, not dodged: KMIP deferred until a customer pulls it; PGP/OpenPGP out of scope (code-signing covers the signing need; the target market does not ask CLM tools for PGP). CT-log monitoring (W6-06/FR-P15) feeds the same unmanaged-inventory funnel rather than a parallel findings-only stream. Vision: docs/sdlc/phase-0-ideation/VISION_V5.md; requirements FR-P64..FR-P70; board wave W11 VISION_V5; FR-P64..70; W11-01..07; CLM brief Tier-1 #1 "direct-CA import" locked
D-105 W4-09 headline-indicator fix: quantum_safe_leaf_only certs get partial credit toward PQCScorePercent but must NOT unlock the PQC countdown's "complete" status. While implementing D-104's new readiness category (W4-09), advisor caught that the per-cert category alone wasn't sufficient — the FLEET-level headline indicators derived from it (PQCCountdownReport.PQCScorePercent/Status) still overclaimed: pqcStatus returned "complete" whenever vulnerable==0, and leaf-only certs were never counted vulnerable, so a fleet fully migrated to leaf-only-PQC against classical CAs — the exact migrate-wave scenario D-104 approved — would report the countdown's "proof of progress" artifact as 100%/"complete", the same false-safety-record class D-104 exists to prevent, one layer above the field this session already fixed. the owner chose partial credit, honest "complete": PQCScorePercent continues to count leaf-only certs toward coverage (same weight as migration_ready — real, already-shipped progress, and migrate-wave's whole product purpose per D-042/Moat-2 is moving this number), but pqcStatus now requires BOTH vulnerable==0 AND quantum_safe_leaf_only==0 before returning "complete" — the strongest headline claim stays reserved for actual chain-level safety, while the score still visibly rewards the accepted deliverable W4-09; G-70 locked
D-291 Every template's enroll list is enforced on WSTEP/XCEP, like EST/SCEP/ACME (S-01 / D-290-C, 2026-10-18). An empty enroll list stays open. A non-empty list permits a Windows caller only through a protocol:wstep entry (every Windows client) or protocol:wstep:<host fqdn> (one machine); API roles such as pki-admin never match, the hub reading no group membership from the Kerberos ticket. XCEP stops offering and WSTEP refuses (audited, SOAP fault) any other template. This replaces the pre-B5 compatibility opt-in of 932b742e. A one-time startup upgrade (bootstrap.UpgradeWindowsEnrollLists, marker file <templates file>.d212-enroll-upgrade; templates live only in the file store, so there is no SQL migration) appends protocol:wstep to the list of every autoenrolled template with a role-only list that does not name pki-admin, without bumping the revision (a bump would re-enroll every client), and logs what it changed and which templates are now refused. Other role-only lists are deliberately not widened. locked (owner chose recommended, 2026-10-18)
D-290 Security-relevant stores fail closed; an invalid quorum policy refuses startup (v1 final scan S-02/S-03/S-04/S-10, 2026-10-18). When a database mode is configured, the agent store, break-glass store and access-review campaign store never fall back to in-memory: while the store cannot be opened every route of that feature answers 503 with a uniform body (cause logged server-side), the open is retried every 10 s, and /readyz reports not ready until it recovers. In-memory is used only when named explicitly (APP_AGENT_STORE_PROVIDER, APP_BREAKGLASS_PROVIDER, APP_ACCESS_REVIEW_PROVIDER = memory), with a loud warning. A malformed APPROVAL_QUORUM_POLICY entry stops the hub at startup with the variable and entry named, instead of silently dropping every class to 1-of-1. A Postgres blip at boot must not silently put agent tokens in a plaintext, non-constant-time store, split break-glass elevations across HA replicas, lose post-use reviews on restart, or weaken dual control. Matches D-202. V1_FINAL_SCAN_2026-10-18 S-02/S-03/S-04/S-10; D-202 locked (lead default; owner may override)
D-104 G-70 resolved: "PQC migrate" (W4-03/W4-08) delivers leaf-key protection, not chain-level protection, and must be labeled honestly rather than as full quantum_safe. Migrate-wave re-issues a member against its EXISTING (realistically classical, per G-69) issuing CA — the resulting cert's subject key is PQC-safe but the cert's own chain-level authenticity (the issuer's classical signature binding issuer to leaf) remains forgeable under a classical break. the owner chose to ship migrate-wave as scoped (re-issuing against existing CAs, no CA-rotation prerequisite) rather than require chain-level protection first (which would need CAs themselves to become PQC-capable before migrate-wave has a realistic target population — materially bigger scope). Required as part of this choice, not optional: computePQCReadiness (certificate_ca_provider.go:828) gains a new, honest readiness category distinguishing leaf-key-only PQC from full chain-level quantum_safe — ticketed W4-09. This also resolves W4-08's [DECISION] #1 (whether a CA-issued hybrid leaf needs a real issuer alt-signature, oidAltSignatureValue) for the correct reason: since chain-level protection isn't the product's stated deliverable, a classical CA producing an issuer-level ML-DSA signature is neither needed nor possible (it doesn't hold an ML-DSA key) — the original fork-drafted spec reached the same "don't populate oidAltSignatureValue" conclusion via an incorrect proof-of-possession justification; this decision corrects the reasoning without changing the outcome W4-03, W4-08, W4-09; G-67, G-69, G-70 locked
D-103 Superseded same-day, see note. W4-03's manual-install/delivery tradeoff (generate-without-deliver: the hub does not auto-install the new cert+key on the target host) is resolved — the owner chose "ship as generated, manual install documented as the deliberate scope" over descoping to plan+track-only or narrowing to agent-managed targets only (2026-07-18). This resolves only the delivery question. It does NOT mean W4-03 is buildable as specced — implementation the same day surfaced a separate, deeper blocker (G-67): the spec's CSR-building mechanism cannot actually produce an ML-DSA certificate at all (stdlib x509.CreateCertificateRequest rejects ML-DSA signers), and silently produces a classical-only CSR for hybrid targets (a false "quantum-safe" record, not a loud failure). W4-03 is blocked in plan.json pending a foundational CSR encode/parse prerequisite; this decision's "ship as specced" framing is stale until that's resolved W4-03; D-042/FR-P3; G-67 locked
D-102 D-027 resolved as both branches, split per report family: crypto-posture, ca-health, expiry-timeline, revocation-activity, issuance-velocity, change-audit, compliance-evidence, algorithm-sunset, executive-summary, and pqc-migration are now tenant-scoped (via a shared reportScopeCertificates/reportScopeCAs/reportScopeAuditEntries helper, report_tenant_scope.go). dashboard (summary/actions/history/ack/resolve), crypto-posture/trend, evidence (schedules/send), pqc-countdown, pqc-waves (list/create/auto-derive/members/accept/delete, W2-08), and renewal-slo (W2-07) are aggregate-super-admin-only (403 for any tenant-scoped principal when MULTI_TENANCY=on) — their data comes from fleet-wide summary/snapshot/wave/agent stores (CertSummaryProvider, DiscoveryProvider, NotificationProvider, PostureSnapshotStore, MigrationWaveStore, EvidenceSchedule, AgentStore) with no per-tenant breakdown; retrofitting one is a separate, larger change to those stores' query shapes, out of W2-03's write_scope. pqc-countdown mixes cert-derived counts (filterable) with fleet-wide trend/wave series (not) — filtering only the cert half would produce a self-contradictory report, so the whole endpoint is gated rather than partially scoped. pqc-waves is gated for the same reason plus one more: a wave's members can span CAs owned by different tenants, so there is no non-arbitrary any-vs-all rule for "is this wave visible to tenant X" — gating avoids inventing one. renewal-slo is gated because agent-token auth (the source of every metric in this report — agent counts, renewal outcomes, MTTR) has no tenant concept at all (G-50): there is no coherent per-tenant slice of "which agents/renewal results belong to tenant X" to filter down to, only an all-or-nothing fleet view. Alternative considered and not taken: FailedRenewals specifically (unlike the aggregate agent/outcome/MTTR counts) carries a Fingerprint per entry that COULD be resolved to an issuing CA and filtered by reportScopeCertificates-style tenant mapping, giving a tenant-scoped principal a scoped actionable queue while still denying the un-filterable aggregate metrics — this ticket took the simpler blanket-deny instead, consistent with the rest of this decision's precedent (pqc-countdown/pqc-waves also chose whole-endpoint gating over partial filtering rather than inventing a mixed response shape); revisit if tenant-scoped operators specifically need renewal-failure visibility before the underlying agent-tenant question (G-50) is resolved for real. Product tradeoff surfaced for veto: under multi-tenancy, tenant-scoped users lose the dashboard, posture trend, evidence packs, PQC countdown, PQC migration waves, and the renewal-SLO/autopilot report entirely — only unscoped super-admins can see them, until/unless those backing stores (or agent auth itself) gain real per-tenant aggregation W2-03, W2-07, W2-08; R-B3 locked (vetoable)

Vocabulary canon (D-019) — copy exactly

  • Ticket status axis: todo · in_progress · blocked · done — nothing else.
  • Ledger/decision status axis: shipped · ticketed · open (lessons); locked · proposed (decisions).
  • Severity scale: B blocker · H high · M medium · L low. (Historical docs use CRITICAL/HIGH/…, 🔴🟡🟠, P0–P3 — do not propagate.)
  • Ticket points: ∈ {1, 2, 3, 5, 8}.
  • Runners: UI = npm (package-lock.json is committed; never pnpm). Backend = go / make. Tests: go test ./..., npm --prefix ui run test, scripts/test/run.sh --suite <protocol|integration|smoke>.
  • Ports: backend :8080; staging edge (nginx, UI+API) :3000.
  • Health: /healthz, /readyz (D-021).
  • Versions: release train vX.Y.Z only (D-018).
  • ID schemes: decisions D-xxx (this file) · gaps G-x (DESIGN_REVIEW) · recommendations R-x (P2 index) · lessons L-xx (LESSONS.md) · prerequisites HP-x (PREREQUISITES.md) · requirements FR-xxx/NFR-xxx (SRS) · stories US-xxx · board tickets W<wave>-<nn> once the P5 board lands (legacy B/F/T x.y frozen). | D-205 | Authorized issuers are a declared list (W34, 2026-10-17, proposed). Per-tenant authorized_issuers rows (CA cert, issuer DN or SPKI sha256) form a third trust-anchor pool; a discovered leaf gets issuer_class (hub, authorized, public, private_unknown, self_signed, unknown) next to the unchanged trust_class, and the UI headline inventory_class derives managed / ours_unmanaged / authorized_external / unknown_issuer / self_signed. Public roots are not authorized by default; Discovery offers one-click "Authorize this issuer". | the owner's ask: tell certs from "our CA group that we authorize" apart from "a CA group we don't have"; a public cert bought outside procurement is the second case, so public cannot mean authorized. | W34-06; W34-00-DESIGN §1.3 | locked (the owner, 2026-10-17: "agree all recommended") | | D-206 | Fingerprinting is passive in fast/targeted scans, active only in full/deep (W34, proposed). Headers, banners and certificate content come from connections the scan already makes; LDAP rootDSE reads, TDS/MySQL handshakes and the raw-ServerHello TLS-stack table run only in full and deep scans. | Extra probes on customer networks trigger IDS alerts; the fast tier must stay quiet. | W34-02..05 | locked (the owner, 2026-10-17: "agree all recommended") | | D-207 | A privileged install posture never blocks renewal when a privileged credential exists (W34, proposed). A root-owned cert/keystore used by a non-root service raises PRIVILEGED_INSTALL_PATH and flags the credential; renewal proceeds through the privileged path. With no privileged credential the target is marked Blocked with the chown/sudoers recipe before any push is attempted, instead of failing at install time. SERVICE_RUNS_AS_ROOT, KEY_WORLD_READABLE, HOME_DIR_KEYSTORE and INSUFFICIENT_PRIVILEGE are the sibling findings; Accept-risk reuses FindingException with target_type target_file. | the owner: competitors assume best-practice installs and force a re-architecture in prod; we must manage the estate as it is and say loudly what we are relying on. | W34-08, W34-10, W34-18 | locked (the owner, 2026-10-17: "agree all recommended") | | D-208 | Privileged credentials are flagged and audited, not approval-gated, in v1 (W34, proposed). outbound_credentials.privileged is set automatically (sudo ALL, uid 0, raw allowlist with cat/install on globbed paths) or manually; shown on credentials, targets, findings, the access-review report and the executive summary. | the owner asked for the "this account is dangerous" check mark so such accounts are visible estate-wide; dual control is a card option, not the default. | W34-11, W34-15 | locked (the owner, 2026-10-17: "agree all recommended") | | D-209 | Agentless privilege modes (W34, proposed). New internal/privexec layer shared by hub SSH and the agent: none, nopasswd (sudo -n, today's agent model), password (sudo -S -p '' -k, password on stdin only, encrypted at rest, never in argv/logs/audit), helper (one sudoers line granting a hash-pinned helper whose verbs are the allowlist), plus a just-in-time password for one-off runs that is never stored. Default for new SSH targets is helper. Root login is never required; SSH password authentication stays unsupported. | Customers block root login and can only hand over a sudo-capable account; sudoers globs are not a path boundary (/etc/ssl/* matches ../shadow), so the helper is the only mode that bounds what the kkscan key can do, and it keeps D-114 (allowlist never widened invisibly) true because the verbs are published. | W34-13, W34-14, W34-17; D-114 | locked (the owner, 2026-10-17: helper AND raw allowlist both offered; the mode is a per-credential setting and the preselected default is an operator config agentless.default_privilege_mode, shipped as helper) | | D-283 | (Planned as D-210 in W34-00-DESIGN; main took D-210 for the release pipeline.) The hub generates the privilege bundle and runs a capability preflight (W34, proposed). GET /api/v1/targets/{id}/privilege-bundle returns the sudoers drop-in, the helper with its sha256 and a customer checklist per mode; POST /api/v1/targets/{id}/preflight (extends W33-30) reports a row per capability with the fix line (including the Defaults:<user> !requiretty remediation) and is audited and stored on the target. | Setup failures today surface as a permission error buried in a job log; the operator must see exactly which capability is missing and what line fixes it. | W34-15, W34-16 | locked (the owner, 2026-10-17: "agree all recommended") | | D-211 | Windows install posture ships in W34 as a lower-priority ticket (proposed). WinRM enumeration adds key-container ACL, http.sys binding and service logon account; LocalSystem running a non-Microsoft app server and key ACLs readable by Everyone map onto the same posture vocabulary as Linux. | the owner's example was Linux/JKS, but the same anti-pattern exists on Windows and the WinRM scanner already has the enumeration seam. | W34-12 | locked (the owner, 2026-10-17: "agree all recommended") | | D-215 | Fingerprint resolution rules (W34-01, 2026-10-17). Tech = highest summed evidence weight; an equal score goes to the tech with the single heaviest row; a surviving tie is unknown. Confidence counts only rows of weight >= 40 (port and tls_stack never lift it) and treats two different HTTP header names as independent. A fingerprint at low never yields recommended_install_mode, which removes the port-only recommendations for winrm-https, etcd, amqps, mqtts and ldaps-gc that predate it. server_tech is written as tech when that is a web server, else the legacy header token. The SQLite 000340 rebuild does not carry issues (same as 000058; EnsureSchema re-adds it, findings recompute on the next scan). | Gives D-205/D-206's "deterministic, testable precedence" a concrete tie-break, and applies the existing "ambiguous means leave it to the operator" rule to ports. | W34-01 | locked | | D-216 | Passive HTTP fingerprinting uses GET, and implicit-TLS mail greetings are read from the scan's own connection (W34-02, 2026-10-17). The Kubernetes and OWA body tells need a body, which HEAD never returns; the request stays on the open TLS connection, Connection: close, 4 KiB cap. Evidence stores header lines and canonical tokens only (never cookie values, challenge tokens or body text). Evidence gains an optional platform vote so WWW-Authenticate: Negotiate or (Win64) can speak without naming a product. AD CS issuance is marked on DiscoveredCert in memory; persisting it waits for the issuer-class migration. 5986 joins the HTTP-probed ports so WinRM's Microsoft-HTTPAPI tell is read. | Keeps D-206 (no extra connection, every tier) while making the design's body sniffs possible. | W34-02 | locked | | D-280 | privexec owns its Executor interface; password mode is stdin-only and transport-gated (W34-13, 2026-10-17). internal/privexec declares an Executor with the same method set as agentinstall.Executor (structural match) so agentinstall.SudoExecutor can delegate to it without an import cycle; RunStdin is an optional StdinRunner capability, never added to Executor, and Wrap refuses password mode on transports without it (WinRM). nopasswd Exists stays unprivileged to preserve D-114's narrow allowlist. | Widening Executor would break every implementer and the allowlist must not gain a test rule silently. | W34-13 | | D-281 | The default privilege mode is an operator setting read only by the UI (W34-14, 2026-10-17). agentless.default_privilege_mode (env KRYPTKEEPER_AGENTLESS_DEFAULT_PRIVILEGE_MODE, values none/nopasswd/password/helper, unset = helper) only preselects the radio in the credential form. A stored credential carries its own sudo_mode and an empty stored mode means none, so changing the setting never changes how an existing credential behaves. | D-209 makes helper the recommended default but a silent retroactive change of privilege on live credentials would break scans and widen exposure invisibly (D-114). | W34-14 | | D-282 | The privilege bundle also has a target-less form (W34-16, 2026-10-17). GET /api/v1/targets/privilege-bundle builds the same bundle from an install profile in the query, so the setup wizard can show the helper hash and downloads while creating the credential, which precedes target creation. The per-target route stays the one the Targets page uses. | The credential step comes before the target exists; without this the hash field could only be typed by hand. | W34-16 | | D-217 | Privilege preflight is target-level and stored on the target (W34-15, 2026-10-17). POST /api/v1/targets/{id}/preflight runs privexec.Preflight with the credential's sudo settings and keeps the secret-free report in managed_targets.last_preflight (migration 000344, the spare number, because 000340-000343 are claimed by other W34 tickets). It does not replace W33-30's credential-level ssh_key preflight. The privileged-credential flag is set through an optional store interface so W34-15 does not depend on W34-11 landing first. | The preflight needs the target's host, pin and auto_renew; the flag column belongs to W34-11's migration and one writer owns a migration. | W34-15 | | D-240 | Rollback copies of private keys stay on the host (W34-18, 2026-10-17). The helper gains backup, restore and discard verbs that keep a .kk-prev copy beside the file (cp -p), and install takes an optional owner:group. The installer uses them through optional privexec capabilities, so the hub never reads a key it will not print, ownership survives a privileged push, and a failed restore ends as rollback_failed, which the scheduler does not retry and which blocks the target. Raw modes keep content snapshots. | Helper mode refuses to print private keys, so the content-snapshot rollback could not work there; reading keys to back them up would also have undone the point of the helper. | W34-18 | | D-241 | A just-in-time sudo password travels on the context, not in a registry (W34-17, 2026-10-17). jit_sudo_password is wrapped in a jitSudo, carried by context into the scan or renewal, and zeroized when the job ends; scan creation copies it onto the background job context. No package-level store. It overrides sudo_mode none or password for that run only and is recorded as privilege_source=jit. | Scans run after the request returns, so the secret must outlive the request but never reach a table, a log or an audit row; a context value owned by the job has exactly that lifetime. | W34-17 | | D-230 | A listener row only forces high confidence at full weight (W34-07, 2026-10-17). confidenceFor returned high for any listener row; a row whose weight was lowered to 60 because the owning uid was hidden (no privilege) now falls through to the strong-row path and is medium. Clarifies W34-01 rule 2 per design 1.2(8): listener correlation is high with sudo, medium without. No existing case changes. | | D-231 | Listener correlation is an exact host:port join applied after the endpoint rows commit (W34-07, 2026-10-17). The SSH scan carries listener evidence on its own endpoint (HostObs); applyListenerEvidence merges one listener row per (port, tech) into endpoints whose ip_address or hostname equals the scanned host (no DNS: a target registered by name does not match an endpoint scanned by IP), re-resolves, and never creates endpoints, so issues/protocol/posture are untouched. A network rescan carries the stored listener rows forward (carryListenerEvidence); a later host sweep that no longer sees the port drops its row. ss -ltnp is translated to the helper's listeners verb in helper mode (the script and its pinned hash are unchanged), and /proc is read through the unelevated executor first because the helper cannot read it. The process command line is parsed in memory for keystore paths and catalina dirs and never stored. | | D-232 | Install posture classification (W34-08, 2026-10-17). A file is tied to a service by the exact path in a process argument or web/Tomcat configuration (nginx, apache, haproxy confs; Tomcat server.xml), else by living under the process's catalina base or cwd. privileged = the service's writer uid is known, non-zero, and cannot replace the file (not the owner, no group-write with the service gid, no other-write). nginx/apache/haproxy/postfix masters run as root by design: a root master can always replace the file (standard), and root_service needs an all-root process family with more than one pid, since a lone master proves nothing about its workers; a master started as a non-root user is judged like an app server. KEY_WORLD_READABLE fires on other-read, or group-read unless the group is gid 0 (0640 root:root is the usual hardening, not a leak). A file with no service tied is standard; only a failed stat is unknown, and it raises no finding (the privilege preflight explains out-of-reach paths). Keys are stat-ed in one batched stat -L through the unelevated executor first; the helper's |-separated stat format is also parsed. | | D-233 | Discovered files are replaced per host scan and keyed by tenant (W34-08, 2026-10-17). discovered_files is UNIQUE on (tenant, host, path), not (host, path) as the design sketch said, so two tenants scanning one address cannot overwrite each other. A scan that ran the posture pass replaces the host's rows (files no longer seen are deleted with their certificate_files links); one that did not run it changes nothing. managed_targets.renewal_privilege_required is set while any file is privileged, cleared when a scan that statted at least one file sees none, and untouched by a scan that statted nothing, so an unprivileged rescan cannot mask what a privileged one found. A network endpoint inherits the most severe posture among the files holding any non-CA certificate it currently serves; the match is on the leaf fingerprint, not the host, so a cert copied to a second box shows both. FindingException target_file (accept-risk per file) is deferred: it needs the finding_exceptions CHECK rebuilt and handler changes outside this ticket. | | D-234 | PRIVILEGED_INSTALL_PATH severity is carried in the finding detail (W34-08, 2026-10-17). Severity is not part of a finding code and no new code may contain an existing one, so the hub rewrites the detail to PRIVILEGED_INSTALL_PATH: severity=high; ... when the target has auto_renew and the credential's sudo_mode is none (until the credential privileged flag of 000343 exists, a sudo mode is the stand-in for "has a privileged credential"). scanner.IsHighSeverityFinding and the risky SQL both recognise the marker, so "Risky only", the summary count and the per-endpoint field still agree. SERVICE_RUNS_AS_ROOT and KEY_WORLD_READABLE are plain members of HighSeverityEndpointFindings. | | D-220 | The TLS stack is a platform tie-breaker of last resort, and its table ships unverified (W34-03, 2026-10-17). A tls_stack evidence row carries no tech and its platform vote counts only when no other row voted a platform. The ServerHello feature table is JSON embedded in the binary; every entry is verified:false (weight 25 maximum) until the W34-20 corpus confirms it, except that the go row was read off a real crypto/tls server. The server_name echo extension is ignored when matching. | Stack tells are inferred from implementations; presenting them as facts would mislabel platforms. | W34-03 | locked | | D-221 | Authorized issuers: classification order, storage and reclassification (W34-06, 2026-10-17). issuer_class is decided hub, self_signed, authorized, then the trust verdict, so a declared public CA is authorized while an undeclared one stays public (D-205: nothing is implicitly authorized). It is stored on certificates (shared across tenants, so it reflects the tenant whose scan wrote it last) while the declared set is per tenant. inventory_class is derived at read time, never stored, and an endpoint reports the least-trusted class among its leaves. Creating or removing a declaration re-judges stored leaves immediately (a hub or self-signed verdict is never weakened); spki_sha256 rules need a served issuer certificate and so wait for the next scan. | Keeps trust_class pure, makes the Authorize action visible at once, and avoids a second source of truth for the headline. | W34-06 | locked | | D-222 | Database TLS probes are full/deep only and a database offering no TLS is a high-severity endpoint finding (W34-05, 2026-10-17). MSSQL (TDS PRELOGIN, TLS framed in TDS packets) and MySQL (greeting, SSLRequest) are active probes, so 1433 and 3306 join the full tier with the implicit-TLS data-plane ports, leaving the fast and targeted lists unchanged. MSSQL_TLS_DISABLED (ENCRYPT_NOT_SUP) and MYSQL_TLS_DISABLED (no SSL capability) join HighSeverityEndpointFindings beside POSTGRES_TLS_DISABLED, so they make the endpoint risky. ENCRYPT_OFF (login-only encryption) still presents a certificate and is not a finding. MariaDB is other:mariadb because the technology vocabulary is closed. Both framings are fixture-verified only until the W34-20 live corpus. | Keeps D-206's passive-by-default promise and treats a plaintext database like the Postgres case already in the product. | W34-05 | locked | | D-223 | Only the LDAP rootDSE read is an active probe; the Kubernetes and WinRM identity tells ride the scan's one GET (W34-04, 2026-10-17). ScanConfig.ActiveProbes (full scans; implied by Deep) gates the rootDSE read, which uses the LDAP connection the scan already holds. The HTTP identity tells (JSON Status body, 401 Negotiate/NTLM on a WinRM port, Microsoft-HTTPAPI) read the response probeHTTP fetched anyway, so they run in every tier at no cost and the ticket's "one GET" holds. A refused or unrecognised rootDSE records a row with no tech vote. The OpenLDAP tell is verified against a real server; the AD and 389-ds tells are marked unverified in the spec for W34-20. | Spends no connection D-206 forbids, and keeps unverified vendor tells from being presented as facts. | W34-04 | locked | | D-250 | The privileged flag is derived from sudo -l, not from "has what the scan needs" (W34-11, 2026-10-17). privexec.Report gains HighImpact/HighImpactReason: (ALL) ALL, (ALL : ALL) ALL or NOPASSWD: ALL, or a cat/install rule whose glob is unbounded (*, /*, /etc/*). The shipped raw allowlist (cat /etc/ssl/certs/*, install -m * /etc/ssl/certs/*) names specific directories and does not trip it; helper mode never does (its verbs are the allowlist). The ssh user root also marks. The W34-15 stand-in (PrivilegedAll -> "sudo ALL") flagged every working helper credential and is replaced. Password mode lists via sudo -S -k -l. | | D-251 | Flag semantics (W34-11, 2026-10-17). Automatic marking happens once (an already-flagged credential is not rewritten or re-audited) and is never cleared automatically: a later narrow preflight does not unflag an account an operator or an earlier probe judged high-impact; clearing is the manual PUT /credentials/{id}/privileged. privileged_set_by is auto:<source> or manual:<principal>. Both paths audit credential.privileged.set with reason and source. The flag gates nothing (D-208); its one behavioural use is severity: PRIVILEGED_INSTALL_PATH is high when the target auto-renews and its credential is not privileged (replaces the sudo_mode stand-in of D-234). | | D-252 | Target scan state lives in migration 000345, not 000342 (W34-10, 2026-10-17). The ticket said the columns would ride in 000342, but 000342 had already merged; editing a shipped migration is not an option. 000345 adds last_privilege_mode, unreadable_count, last_scanned_at, blocked_kind, blocked_reason, blocked_at (000342 still owns renewal_privilege_required). They are read and written through a separate targetStateStore interface (like targetPreflightStore) and exposed as response-only fields, so ManagedTargetStore and its other implementations are unchanged. | | D-253 | Blocked has two kinds with different lifetimes (W34-10, 2026-10-17). privilege is derived every time from renewal_privilege_required + the credential's current sudo_mode + auto_renew: it appears when a scan finds a file only root can replace and the credential has sudo_mode none, and clears by itself when the credential gains a mode (target PATCH) or a scan sees the files standard. The scheduler drops such targets from the sweep (the owner reminder still goes out, since nothing was owed), persists the kind so the audit target.renewal.blocked / target.renewal.unblocked fires once per transition, not per tick. A credential whose mode cannot be read never blocks. rollback is set by the renewal executor's BlockTarget (W34-18) after a failed rollback and persists until an operator calls POST /targets/{id}/unblock (discovery.manage or certificate.renew, tenant-gated, audited); it takes precedence over a privilege block. | | D-254 | One INSUFFICIENT_PRIVILEGE finding per scan, permission errors only (W34-10, 2026-10-17). Permission-denied UNREADABLE_PATH findings and the W34-17 NEEDS_PASSWORD hint fold into INSUFFICIENT_PRIVILEGE: uid=…; user=…; mode=…; unreadable=N; paths=… (+M more); fix=…: at most 10 paths with the distinct total, the uid from id -u before elevation, and a mode-specific fix (sudoers line for nopasswd/password, helper limits for helper, helper-or-sudoers-or-one-off-password for none). Errors that are not about access (a keystore that does not parse) stay UNREADABLE_PATH. The Discovery row reads "Scan ran unprivileged; N paths unreadable". | | D-255 | The agent runs its walk through the hub's host scan, and the hub classifies (W34-09, 2026-10-17). On Linux the agent calls agentdiscovery.DiscoverLocalHost, which is AgentlessSSHScanner over privexec.Wrap(LocalExecutor) (mode from KRYPTKEEPER_PRIVILEGE_MODE: none, nopasswd, helper; password is refused at startup because the agent holds no stored secret) with the unwrapped executor for world-readable /proc and stat. It sends raw facts (unreadable paths, file owner/group/mode, listeners with the command line already reduced to keystore refs and app dirs, config refs); the hub runs the same ClassifyHostFiles as for SSH targets, so posture rules live in one place. The install allowlist is untouched (D-114). Other platforms fall back to WalkCerts and send no host pass. | | D-256 | Agent host pass is stored as one JSON report on the agent row; pre-W34 agents read as unknown (W34-09, 2026-10-17). Migration 000346 adds agents.host_report; the report carries mode, user, unreadable count and up to 10 paths, INSUFFICIENT_PRIVILEGE (with the fix for the mode) plus the per-file findings, non-standard files (cap 200), posture counts and listener counts. A push with no host marker stores posture_known:false, never an empty "standard" estate. Agent hosts are not written to discovered_files/endpoints: an agent host has no managed target or network endpoint to join, so tying agent posture to the Discovery rows is left to a later ticket. | | D-260 | Windows posture is a second WinRM session and an unfinished pass stores nothing (W34-12, 2026-10-17). The posture script runs after the certificate enumeration, ends with a done marker, and is read only when complete; its failure is a PostureErr, not a scan error. Key files are listed by ACL only, kind cng_key, with no uid. SERVICE_RUNS_AS_ROOT needs a service tied to the certificate through a listening port, which http.sys bindings do not give; that gap is tagged W34-20-verify instead of guessed. | A Windows host that cannot run certutil or lacks IIS must still return its certificates; a silent empty result must not delete earlier posture rows; and a service attribution we cannot verify must not produce a false high-severity finding. | W34-12 | | D-261 | Exceptions on a discovered file key on the file id and the bare finding code (2026-10-17). target_type=target_file uses discovered_files.id as target_id and the bare code as finding_code; the file's tenant decides visibility and the stamp, a missing or foreign file answers 404, and approval re-checks it. The evidence pack lists a file exception only when a certificate in the caller's scope lives in the file. | Posture findings live on files, not certificates, and a certificate-keyed exception would silence the same code on an unrelated file. The file id is stable across scans of the same path, and a vanished file must stop its exception applying rather than be quietly remapped. | design §2.3 | | D-270 | Discovery parses certificates with negative serial numbers (W34-20, 2026-10-18). go.mod sets godebug x509negativeserial=1. SQL Server's default TLS certificate has a negative serial, which Go 1.23+ otherwise rejects during the handshake, so every default SQL Server was unreachable to the scanner (found against a real engine). The setting is parse leniency in the hub binary and tests; chain verification, key usage and expiry checks are unchanged, and the CA still issues positive serials only. | A scanner has to inspect the certificates servers actually present; the alternative (a hand-rolled TLS record parser) is more risk than the setting. | W34-05, W34-20 | locked | | D-271 | The corpus is self-authored ground truth, and its recall is an upper bound (W34-20). expected.json is written from what compose starts, never from the scanner, but the author also wrote the tells; the figures in FINGERPRINT_RECALL_v0.22.md therefore prove the tells work on these builds, not that recall holds on an arbitrary estate. On arm64 runners the corpus substitutes Azure SQL Edge for SQL Server 2022 (the amd64 image segfaults under emulation); amd64 runners use the server image. Tomcat is run with JSSE forced so the JSSE TLS signature is observable; stock Tomcat with tcnative reads as OpenSSL. AD, F5, Citrix and appliance tells stay human-only lab items. | Keeps the release number honest. | W34-20 | locked | | D-272 | Scans use the account's own permissions wherever sudo has no rule, and a failed elevated read never becomes a path (W34-20, 2026-10-18). A root or file outside the sudoers rule (or outside the helper's character set) is scanned and read with the unelevated account; a refusal from sudo or the helper is a diagnostic, never a file name; only a denial by the account itself is reported as unreadable, which is what makes it INSUFFICIENT_PRIVILEGE. The privilege bundle gains scan_paths so a raw allowlist can name the keystore directories a scan reads. Helper-returned keystores are parsed as PEM and the helper tries the changeit PKCS12 default first. | Found by running the three privilege modes against a hardened host; each rule keeps privilege no wider than before while removing the false findings and the false unreadable paths. | W34-20 | locked | | D-273 | The nopasswd privilege bundle does not cover /etc/ssl/private, and its one INSUFFICIENT_PRIVILEGE for that directory is expected (W34-20 follow-up, 2026-10-18). Widening the raw allowlist to the default scan roots was considered so a nopasswd scan reports nothing. It is unsafe: sudoers * matches / and find ... * permits -exec, so allowing cat or find on the system key directory gives the scan account every private key on the host. The bundle still takes scan_paths for keystore directories. The agentless-sudo harness now asserts the exact outcome per mode (nopasswd: one finding naming only /etc/ssl/private; helper and password: none), and the guide explains it. | Keeps the raw allowlist as narrow as the customer's real certificate directories; a finding about a directory of keys we never read is the honest result. | W34-20 | locked | | D-210 | Releases are built and published by the the self-hosted forge runner only (2026-10-17). release.yml was written for GitHub (OIDC keyless cosign, ghcr, GitHub Release) and has failed on every tag since v0.10.0; GitHub Actions is off (spending budget) and the owner will not use it. New design: .goreleaser.forge.yaml (same builds/archives/checksum/SBOM/nfpm as .goreleaser.yaml, drift-checked by scripts/check-goreleaser-forge.sh) publishes a the self-hosted forge release; SDK packages and the Homebrew formula are attached by API; a verify step checks the asset set. Tooling (JRE for openapi-generator, goreleaser, syft, cosign, wixl; pinned by sha256) is baked into the runner image, not installed per job and not run via a container socket, because jobs hold signing keys. workflow_dispatch with a tag input rebuilds an existing tag without moving it (source = tag, tooling = running commit). Signing is key-based cosign and active only when COSIGN_PRIVATE_KEY is set; otherwise the release is published unsigned with a warning. Not in scope here: container images (no daemon in jobs), the Homebrew tap repo, apt/yum signing key. The Windows MSI and nfpm packages are in. | Tag pushes must publish real artifacts on the only CI we run; keyless signing needs an OIDC issuer the self-hosted forge does not have. | D-101; W20-02; W32-02 | locked (vetoable) |