Skip to content

Architecture Change Management (TOGAF Phase H) ​

Auto-generated from USM decisions, risks, and future items.

Architecture Decisions (99) ​

IDDecisionStatusSource
metadata-only-loggingLog identifiers and outcomes, never values or key material.acceptedsafekeys/audit-logging
record-denialsRecord denied attempts as first-class events.acceptedsafekeys/audit-logging
append-only-by-constructionProvide no mutation path for audit records rather than relying on access control alone.acceptedsafekeys/audit-logging
go-and-postgresImplement the control plane as a Go service on Postgres.acceptedsafekeys/control-plane-api
no-create-with-value-endpointDeliberately omit any endpoint that accepts a secret value.acceptedsafekeys/control-plane-api
api-key-then-mtlsStart with API keys and add mTLS for sidecars alongside hardware binding.acceptedsafekeys/control-plane-api
policy-at-both-pointsEvaluate policy at issuance and again locally at resolve.acceptedsafekeys/policy-engine
default-denyDefault to deny when no rule matches.acceptedsafekeys/policy-engine
enterprise-features-laterKeep SSO, compliance reporting, and rich policy authoring out of the MVP.acceptedsafekeys/policy-engine
policy-via-database-rulesEvaluate policy from operator-authored rules in Postgres, rebuilt per evaluation so a change takes effect without a restart.acceptedsafekeys/policy-engine
resolve-time-rules-now-loadedThe sidecar now loads real resolve-time rules from the control plane (cached, default-deny) instead of the previous hardcoded allow.acceptedsafekeys/policy-engine
policy-fail-closed-warm-cachePolicy evaluation denies when rules cannot be loaded and no cache exists; a warm cache serves last-known-good.acceptedsafekeys/policy-engine
systemd-single-vm-firstShip systemd units plus a production Compose file targeting a single hardened VM as the reference deployment; defer Kubernetes manifests.acceptedsafekeys/deployment-packaging
os-isolation-via-systemdFold the sidecar's OS isolation into the systemd unit's hardening directives, with an AppArmor profile where the host supports it, rather than deferring it as separate work.acceptedsafekeys/deployment-packaging
socket-shared-groupChange the sidecar socket from 0600 to group-access (sidecar user plus a dedicated shared group, group-only mode) so agent processes running as a distinct user can connect.acceptedsafekeys/deployment-packaging
publish-by-digestPublish CI-built images to a registry and have production pin them by digest.acceptedsafekeys/deployment-packaging
signing-key-holding-patternDeployment provisions the Ed25519 signing seed as a root-owned credential delivered to the control plane only; HSM or secure-element custody remains the Phase 1 target.acceptedsafekeys/deployment-packaging
credentials-as-filesEvery credential is resolved from a file when a *_FILE variable is set, falling back to the environment only otherwise; the production profile refuses the environment path outright for the signing key and the key-store token.acceptedsafekeys/deployment-packaging
esbuild-pattern-for-cliDistribute the CLI as @smithgray/safekeys-cli with optionalDependencies on per-platform packages containing the prebuilt binary.acceptedsafekeys/distribution
ghcr-canonical-dockerhub-mirrorPublish images to ghcr.io/smith-gray-pty-ltd as canonical and Docker Hub org safekeys as a mirror.acceptedsafekeys/distribution
no-agent-publishesEvery first publish and every account/org creation is performed by James; agents prepare packages, workflows, and the runbook only.acceptedsafekeys/distribution
cloudflare-pagesHost the docs and site on Cloudflare Pages, matching how USM is hosted.—safekeys/docs-hosting
two-projects-per-audiencePublish the contributor and help docs as two separate Pages projects on separate subdomains.—safekeys/docs-hosting
direct-upload-not-git-integrationDeploy by uploading the built directory from GitHub Actions, rather than connecting Pages to the repository.—safekeys/docs-hosting
correct-canonical-urls-post-buildRewrite the generated sitemap's domain after each build as a known workaround.—safekeys/docs-hosting
marketing-site-deploys-separatelyWire the docs deploy now and add the marketing site when it is built.—safekeys/docs-hosting
cheapest-option-firstOrder hardware options cheapest first: TPM 2.0, cloud confidential computing, USB token or dongle, soldered secure element.acceptedsafekeys/hardware-root
drop-shipped-provisioningSupport factory-provisioned devices that are drop-shipped to customers.acceptedsafekeys/hardware-root
no-custom-silicon-day-oneDo not require custom silicon for the MVP or Phase 1.acceptedsafekeys/hardware-root
defer-to-phase-2Keep threshold crypto and post-quantum ratchets out of the MVP and Phase 1.acceptedsafekeys/threshold-crypto
hybrid-not-pq-onlyUse a hybrid classical plus ML-KEM-class construction rather than post-quantum only.acceptedsafekeys/threshold-crypto
threshold-over-single-deviceSplit knowledge across element and authority rather than trusting a single device.acceptedsafekeys/threshold-crypto
mcp-is-firstMake the MCP server the first harness integration shipped.acceptedsafekeys/integration-mcp-server
three-harnesses-onlyLimit MVP integrations to the MCP server, the CLI exec wrapper, and the Python SDK.acceptedsafekeys/integration-mcp-server
examples-not-runtimesSupport further harnesses later as examples calling the same SDK or MCP tools.acceptedsafekeys/integration-mcp-server
mcp-holds-no-credentialThe MCP server holds no control-plane API key and no key material; list and revoke are proxied through the sidecar rather than called directly.acceptedsafekeys/integration-mcp-server
create-takes-a-source-filecreate_secret accepts a source_file path, never a value parameter.acceptedsafekeys/integration-mcp-server
stdio-transport-single-serverUse standard MCP over stdio with no vendor-specific code.acceptedsafekeys/integration-mcp-server
no-interactive-secret-promptcreate_secret takes a file path the sidecar reads; it never prompts the operator interactively and never accepts a literal value parameter.acceptedsafekeys/integration-mcp-server
python-firstShip the Python SDK as the first language binding, with LangChain and LangGraph tools.acceptedsafekeys/integration-python-sdk
unrepresentable-plaintextDesign the API so plaintext cannot be passed or received.acceptedsafekeys/integration-python-sdk
delegate-all-cryptoKeep the SDK free of decryption and key handling.acceptedsafekeys/integration-python-sdk
zero-dependency-coreKeep the core SDK dependency-free; make LangChain/LangGraph an optional extra.acceptedsafekeys/integration-python-sdk
value-becomes-a-temp-fileEven the in-process value parameter is written to a 0600 temp file that the sidecar reads, rather than being sent over the socket.acceptedsafekeys/integration-python-sdk
return-type-is-the-guaranteeRely on return types (CreatedSecret, ResolveResult, ObjectMetadata) having no value-bearing field, rather than on documentation.acceptedsafekeys/integration-python-sdk
local-channel-for-createSend plaintext from caller to sidecar over the local authenticated Unix socket, never over the network.acceptedsafekeys/secret-creation
stdin-not-argvAccept values via stdin or file only; never as a command-line argument.acceptedsafekeys/secret-creation
create-not-a-web-console-flowDo not build a web console for creation in the MVP.acceptedsafekeys/secret-creation
transport-is-the-differentiatorDifferentiate on transport — folders and tokens that agents create and move through arbitrary flows — rather than on use-time brokering alone.acceptedsafekeys/secret-transport
bus-agnostic-payloadCarry only folder URIs and tokens over MCP, A2A, and other agent buses.acceptedsafekeys/secret-transport
denylist-plus-ttlUse a jti denylist alongside short TTLs rather than one or the other.acceptedsafekeys/token-revocation
authoritative-check-at-resolveCheck revocation at resolve time in the sidecar rather than trusting token validity alone.acceptedsafekeys/token-revocation
uri-formExpress tokens as a URI: safekey://v1/<id>?scope=<action>&aud=<env>&exp=<unix>&kid=<key-id>acceptedsafekeys/capability-token
short-ttl-over-long-livedUse short TTL plus a jti denylist rather than long-lived tokens with periodic rotation.acceptedsafekeys/capability-token
generic-denialsDenials return a generic failure rather than the specific violated check.acceptedsafekeys/capability-token
jws-over-query-stringCarry the token as a standard RFC 7515 compact JWS in the URI fragment (safekey://v1/<sid>#<JWS>) rather than the blueprint's bespoke query-string claims with a separate sig claim.acceptedsafekeys/capability-token
alg-allowlistPermit only EdDSA and ES256; reject alg 'none' and all symmetric algorithms (HS256/384/512).acceptedsafekeys/capability-token
key-custody-hsmRequire the token signing key to be HSM- or secure-element-backed from Phase 1; never a bare file in production.acceptedsafekeys/capability-token
ordinary-directoryUse an ordinary directory or object prefix rather than a custom container format.acceptedsafekeys/encrypted-folder
aes-gcm-or-chachaEncrypt objects with AES-256-GCM or ChaCha20-Poly1305.acceptedsafekeys/encrypted-folder
readme-is-a-featureShip a README.safekeys in every folder, designed to be model-readable.acceptedsafekeys/encrypted-folder
manifest-is-metadata-onlyThe manifest may hold a wrapped DEK but never plaintext, an unwrapped DEK, or a KEK, enforced structurally via additionalProperties: false.acceptedsafekeys/encrypted-folder
objects-path-constraintRequire every object path to match ^objects/[A-Za-z0-9][A-Za-z0-9._-]*.enc$.acceptedsafekeys/encrypted-folder
openbao-or-vaultUse OpenBao or Vault Transit/KV as the MVP key store.acceptedsafekeys/envelope-encryption
envelope-not-directWrap keys rather than encrypting secrets directly under a master key.acceptedsafekeys/envelope-encryption
keep-insecure-keystore-nameKeep SAFEKEYS_ALLOW_INSECURE_KEYSTORE as the file-mode opt-in rather than renaming to SAFEKEYS_DEV_INSECURE_KEYFILE.acceptedsafekeys/dev-key-custody
keychain-is-a-speed-bump-not-a-boundaryDocument the macOS Keychain as a storage improvement, not an access boundary, and name the separate-user mode as the strong local boundary.acceptedsafekeys/dev-key-custody
openbao-dev-is-the-linux-defaultMake the containerised dev OpenBao the default Linux dev keystore instead of the local file.acceptedsafekeys/dev-key-custody
exec-is-framework-agnosticShip the exec wrapper as a first-class MVP harness integration.acceptedsafekeys/exec-wrapper
minimal-envGive the child a minimal, explicit environment rather than inheriting and augmenting the parent's.acceptedsafekeys/exec-wrapper
redaction-in-sidecar-not-mcpImplement redaction in the sidecar's relay path rather than in the MCP server.acceptedsafekeys/output-control
mcp-deny-by-defaultMCP-initiated resolves require an explicit command allowlist; without one they are refused regardless of the denylist.acceptedsafekeys/output-control
denylist-is-a-backstopKeep a denylist of known dumpers for CLI and SDK resolves and document it as a backstop, not the control.acceptedsafekeys/output-control
commands-in-policy-not-claimsCommand restrictions live in policy rules, not token claims.acceptedsafekeys/output-control
substrings-not-whole-valueRedact substrings of the secret of 8+ characters (or the full value when shorter), in every listed encoding.acceptedsafekeys/output-control
four-methods-not-oneSupport env, 0600 temp file, socket/pipe, and exec rather than a single injection mode.acceptedsafekeys/secret-injection
exec-wrapper-preferredMake the exec wrapper the preferred and best-documented path.acceptedsafekeys/secret-injection
placeholder-over-valueReturn a placeholder name or path instead of a value whenever a return is needed.acceptedsafekeys/secret-injection
mvp-scope-socket-pipe-deferredShip env, file, and exec injection in the MVP; defer the long-running socket/pipe method.acceptedsafekeys/secret-injection
sidecar-is-the-only-resolverConcentrate all token resolution and decryption in the privileged sidecar.acceptedsafekeys/sidecar-resolution
socket-request-responseExpose resolution to local callers over a Unix domain socket.acceptedsafekeys/sidecar-resolution
no-shared-memoryThe sidecar shares no memory with agent processes.acceptedsafekeys/sidecar-resolution
sidecar-holds-public-keys-onlySplit protocol.Signer (mint) from protocol.Verifier (public keys only). The sidecar and CLI hold a Verifier and never a Signer.acceptedsafekeys/sidecar-resolution
verifier-fails-closed-coldA verifier with a cold key cache and an unreachable control plane denies every token; a warm cache serves last-known-good.acceptedsafekeys/sidecar-resolution
exec-is-primary-injectionThe exec wrapper is the preferred injection mechanism over returning values on stdout.acceptedsafekeys/cli
postgres-not-embeddedUse Postgres rather than an embedded store (SQLite) for the control plane.acceptedsafekeys/control-plane-db
denylist-not-allowlistStore the revocation denylist rather than an allowlist of valid tokens.acceptedsafekeys/control-plane-db
audit-never-contains-secretsThe audit table stores identifiers and outcomes only, never values.acceptedsafekeys/control-plane-db
wrapped-dek-not-in-dbWrapped DEKs live in the folder manifest, not in Postgres.acceptedsafekeys/control-plane-db
go-and-postgresImplement the control plane in Go backed by Postgres.acceptedsafekeys/control-plane
no-plaintext-at-control-planeThe control plane must never accept or store plaintext secret material.acceptedsafekeys/control-plane
mcp-firstShip an MCP server as the first harness integration, ahead of any framework-specific SDK.acceptedsafekeys/mcp-server
mcp-not-in-v0-scopeKeep CrewAI, AutoGen, Pydantic AI, smolagents, and custom enterprise harnesses out of MVP scope.acceptedsafekeys/mcp-server
token-only-apiThe SDK API accepts and returns only tokens and folder paths — never plaintext values.acceptedsafekeys/python-sdk
open-protocol-wedgePosition the site around the open protocol as the adoption wedge, with hardware and hosted authority as the commercial layer.acceptedsafekeys/site
go-sidecarImplement the sidecar in Go rather than Rust.acceptedsafekeys/sidecar
separate-os-userThe sidecar runs as a different OS user from any agent process, with no shared memory.acceptedsafekeys/sidecar
deny-by-defaultIf the key store or control plane is unreachable, resolution fails closed.acceptedsafekeys/sidecar
ts-after-pythonShip the TypeScript SDK immediately after the MVP, not inside it.acceptedsafekeys/typescript-sdk

System Risks ​

IDTitleSeverityStatusMitigation
rooted-osRooted OS or compromised local agent processhighidentifiedProcess isolation in the MVP; secure element, TEE, or TPM binding in Phase 1. Plaintext remains transient and zeroised.
stolen-tokenStolen or replayed capability tokenmediumidentifiedShort TTL, audience binding, scope least-privilege, jti denylist revocation, and optional mTLS device identity.
provider-kms-exposureMulti-tenant AI-cloud KMS used as the roothighmitigatedDo not use multi-tenant AI-cloud KMS as root. Self-hosted key store, then HSM or secure element.
quantum-harvest-nowHarvest-now-decrypt-later against long-lived ciphertextmediumacceptedExplicitly not an MVP concern. Hybrid KEM and ratchet in Phase 2.
human-pastes-plaintextA human pastes plaintext into a chathighacceptedOut of scope even in later phases. The product exists to make this unnecessary, not to detect it.
output-relay-leakA prompt-injected agent reads the secret back out of relayed command outputhighmitigatedThe sidecar redacts the resolved value — and substrings of 8+ characters — from any output it relays, in raw, base64, base64url, hex, percent-encoded, and JSON-escaped form, including split-across-chunk matches; output is size-capped by default; MCP-initiated resolves require a command allowlist and CLI/SDK resolves fall back to a documented backstop denylist. See safekeys/output-control.
network-exfil-allowed-commandAn allowed command exfiltrates the secret over the network or via a written filemediumacceptedCommand allowlists bind high-value tokens to exact executables and argument patterns. The residual risk is stated in the README's Security guarantees and limits section rather than claimed away.
dev-kek-agent-readableThe development KEK is readable by the same user the coding agent runs ashighmitigatedThe default dev flow keeps the KEK in the macOS Keychain with an ACL restricted to the sidecar binary, or in the containerised OpenBao dev instance on Linux; a plaintext file survives only behind SAFEKEYS_ALLOW_INSECURE_KEYSTORE=1 with a permission check and a loud warning. A separate-user local mode mirrors the deployment isolation. See safekeys/dev-key-custody.

Future Items (15) ​

ItemSource
Windows binary.safekeys/cli
Shell completion packages.safekeys/cli
Partition the audit table by month and export to cold storage for retention.safekeys/control-plane-db
Row-level policy scoping for the multi-tenant hosted authority.safekeys/control-plane-db
Multi-tenant hosted authority with SSO and compliance reporting.safekeys/control-plane
mTLS device identity binding for sidecars.safekeys/control-plane
Claude Agent SDK / Claude Code hook for coding-agent .env leaks.safekeys/mcp-server
TypeScript SDK and OpenAI Agents SDK adapter.safekeys/mcp-server
TypeScript SDK with an identical API surface.safekeys/python-sdk
OpenAI Agents SDK adapter built on the same tools.safekeys/python-sdk
Interactive protocol explorer for tokens and folders.safekeys/site
Hosted documentation portal for the open core.safekeys/site
Secure element / TPM / cloud enclave backend for the long-term key share.safekeys/sidecar
Threshold reconstruction of key material inside the element.safekeys/sidecar
Framework adapters built on top of the core SDK rather than bespoke runtimes.safekeys/typescript-sdk

Change Governance Principles ​

  • The LLM is never on the decryption path: No language model ever holds, receives, or can derive plaintext secret material or long-term keys.
  • Agents see only opaque capability tokens: The only secret-bearing artefact an agent reasons about is a short-lived, scoped, audience-bound capability token containing zero secret material.
  • Stable agent-facing interface: The public interface (tokens plus folders) stays constant as backends harden from software isolation to hardware to threshold crypto.
  • Plaintext is materialised only for the consumer, then zeroised: Plaintext exists only transiently inside the sidecar's injection path for the consuming non-LLM process, and is zeroised immediately after use.
  • Open protocol, commercial authority: Token and folder specifications, the sidecar reference implementation, CLI, and core SDKs are open source; the hosted authority, hardware, and enterprise controls are commercial.