ADR-INFRA-003 — Secret Source and Injection Mechanism

By Engineering & Security Architecture Team•October 17, 2026•4 min read

Status: Accepted Date: 2026-10-20 Authors: Engineering & Security Architecture Team

Context

Infrastructure tools need API tokens and a state passphrase. Plain-text files, shell exports and history leak them, and a secret service whose provider can decrypt them (server-side encryption, SSE) lets a provider breach or insider reach every value. BRD-INFRA-002 requires client-side zero-knowledge encryption, hardware approval and task-lifetime exposure. Specified in SR-INFRA-002. Implements workspace rules 10 (sections 4 and 7) and 12.

Who the two approaches serve

The two families answer different consumers, so they are not interchangeable:

  • Client-side zero-knowledge (1Password): the consumer is a person at a workstation, including one that is not fully trusted. Decryption happens in the device’s memory after biometric approval, the master key stays in the device hardware, and a server breach cannot leak plaintext. It needs a person present, or a scoped service account for automation.
  • Server-side encryption (GCP, AWS, Infisical): the consumer is an unattended workload such as a pod, a Cloud Run service or a microservice. Decryption happens at the provider’s API layer under a provider-managed key service, and the workload authenticates by keyless OIDC federation, with trust placed in network boundaries and access policies.

This record decides the first case: how an administrator’s infrastructure commands, and the GitHub Actions workflows that apply and publish the sites, receive credentials. How a deployed service receives its values is a separate decision, not made here. A cloud secret manager with OIDC is the likely fit for it. OIDC federation does not help the Cloudflare provider used for infrastructure today, which has no federated exchange for a CI identity.

Decision Drivers (FRs & NFRs)

  • BR-1.1 — the provider cannot decrypt.
  • BR-1.3 — physical biometric approval before release.
  • BR-1.2, BR-1.4 — nothing on disk, nothing after the task.
  • BR-1.5 — references only in the repository.

Options

Option 1 — Cloud secret manager (GCP, AWS, Azure) or server-side encrypted service (Infisical)

Pros:

  • Mature access policies, fine-grained permissions and central audit logging.
  • Suited to unattended services, which authenticate keylessly by OIDC federation.
  • No extra subscription for a team already using the same cloud provider.

Cons:

  • The provider holds or can reach the decryption keys (SSE), so a provider breach, an insider or a hijacked API session can expose plaintext (BR-1.1).
  • No per-run biometric approval: access is by a stored identity, bearer token or key, not a physical prompt on the operator’s device (BR-1.3).
  • Local runs need a persistent command-line login on the Mac, which lengthens the time credentials are exposed on a developer machine (BR-1.2, BR-1.4).

Option 2 — Encrypted files in Git (SOPS) or a general password manager (Bitwarden)

Pros:

  • Encrypted values sit next to the code, so a secret change is tracked with the commit that needs it.
  • Open-source tooling with no subscription, and no hosted service for the file-based approach.
  • Files can be decrypted offline when the private key is present.

Cons:

  • Distributing public keys, offboarding people and re-encrypting files are complex and easy to get wrong.
  • No native hand-over to one child process: decrypted content tends to end up in a temporary file or a shell export, which leaks (BR-1.2, BR-1.4).
  • Unlocking relies on a passphrase or a local key, not a hardware biometric prompt for each run (BR-1.3).
  • A general password manager without run-time reference injection still needs values copied by hand (BR-1.5).

Option 3 — 1Password: op run with Touch ID for people, a read-only service account per environment for pipelines (CHOSEN)

A person’s privileged run resolves op:// references with op run on the Mac host after Touch ID. A GitHub Actions workflow reads its environment’s vault through a 1Password service account that is read-only on that one vault; the service account’s value is the GitHub environment’s only secret, and the workflow loads each value by its op:// reference with 1Password’s load-secrets action. Every value lives in exactly one vault per project and environment.

Pros:

  • Client-side zero-knowledge encryption: the provider stores only ciphertext, and values are decrypted in the Mac’s memory after Touch ID, or in the runner’s memory for a pipeline (BR-1.1).
  • The master key stays in the Mac’s secure hardware, and a physical Touch ID approval is needed before a value is released to a person’s run (BR-1.3).
  • op run resolves references into one child process’s environment only, then clears them when it exits (BR-1.2, BR-1.4, BR-1.5).
  • One place per value: a pipeline reads the same vault a person maintains, so no value is copied into GitHub and none goes stale there (BR-1.5).
  • A pipeline’s reach is one vault, read-only, and its service account expires and is replaced like any other credential.
  • Nothing static on the Mac: no service account, copied token, stored key or environment file on the default path.

Cons:

  • A person must be at the Mac for every privileged run of their own; this is intended for administrator work, but it adds friction.
  • The service account’s value is one stored secret per GitHub environment; a leak exposes that environment’s vault until it is revoked.
  • A pipeline run depends on 1Password being reachable.
  • A paid per-user subscription.

Final Decision

1Password is the one source of credentials: people’s privileged commands receive them through op run with Touch ID on the Mac host, and each GitHub Actions environment reads its own vault through a read-only service account whose value is that environment’s only secret. Option 1 is rejected because the provider can decrypt, Option 2 for key-rotation overhead, the risk of temporary files on disk and no per-run hardware approval. The costs accepted are the subscription, that a person’s privileged work needs the administrator at the Mac, and one stored service-account value per GitHub environment, limited to read-only access to one vault and replaced before it expires. Runtime services are out of scope and need their own record.