Skip to content
Registry StackDocsv0.49.0

Production hardening checklist

View as Markdown

Use this checklist after product configuration is valid and before exposing a deployment to callers. It covers Registry Evidence, Base Registry Engine (BReg), and Registry Casework, and the settings of the shared audit writer that these products and Registry Render use.

  • Record the exact source revision, package digest, runtime configuration, and operator approval.
  • Use the product’s production check and keep the report with the deployment record.
  • Identify every secret owner, source owner, audit owner, and recovery owner.
  • Test recovery with non-production data.
  • Have evidence check --require-runtime-dependencies runnable on the target host against the exact revision you intend to serve. Registry Evidence has no posture endpoint or admin surface. Startup, readiness, and offline checks expose invalid deployment inputs.
  • Signed deliveries have the same form in both postures, so use separate deployment keys and never give production trigger keys to development producers.
  • Configure one active ES256 P-256 Registry Evidence public JWK with a derived RFC 7638 thumbprint kid, plus only the overlap keys needed to verify current assertions. evidence check refuses a revoked or malformed active public JWK, and evidence check --require-runtime-dependencies on the target host refuses a configured signer that does not match it.
  • Supply local-assurance private JWKs, HMAC keys, and source credentials through secret:file/<name> references below secretProviders.file.root. The file provider applies the rule in Secret files.
  • Prefer the file provider with a secret root dedicated to the deployment. Enable secretProviders.environment: {} only for a dedicated, curated process environment. Review each bundle secret:env/<NAME> reference because an enabled environment provider can resolve any named variable in that environment. Only runtime.yaml can enable a provider.
  • Give the Registry Evidence audit hash key and subject-binding key independently generated raw key material of at least 32 bytes each. The file provider does not base64-decode them.
  • Rotate a Registry Evidence signing key by publishing the next public JWK first, then changing the active JWK and pinned Transit key version. Retain the old public key for at least the maximum assertion validity plus allowed clock skew. Follow Rotate Registry Evidence signing keys.
  • Use a workload-local Vault or OpenBao Transit proxy over a Unix socket for Registry Evidence signing. Require P-256, signing enabled, non-exportable key material, plaintext backup disabled, and an exact governed public-key match. Local JWK signing is for local assurance. See Configure Transit signing.
  • Escrow the BReg Transit key before the first encrypted field goes live. The runtime stores only the wrapped data-encryption key, so losing the Transit key irrecoverably loses every value sealed with it. A health check does not certify escrow.
  • Keep the BReg base64 local-file DEK out of production. Production uses Transit for field encryption: startup permits fieldEncryption.provider.type: local-file only in the development posture, and bregctl doctor reports the same refusal.
  • Retire or encrypt every backup taken before a BReg field was encrypted. A pre-flip backup holds plaintext for as long as it is retained. See Field encryption for restricted fields.

Every secret:file/<name> reference resolves under secretProviders.file.root. Every runtime applies one rule when it opens the file. The check runs on the open file, so a file replaced after the check is not read.

The file must meet all of these:

  • It is a regular file with one hard link. A directory, device, socket, or pipe is refused.
  • It is reached from the root by downward steps only. The name may be a relative link, such as the chain Kubernetes writes for a mounted Secret, through at most 8 links. A link that is absolute or holds .. is refused, so is a link that leaves the root. The root itself must not be a link.
  • Others have no access: no read and no write.
  • Its owner and mode are one of two shapes. The runtime user owns it with mode 0400 or 0600. Or root owns it with no bit outside 0640, usually 0440 or 0640, and the runtime is not root. The runtime then reads it through the file’s group.
  • No execute, setuid, setgid, or sticky bit is set, and a file the runtime user owns can be read by that user.

A file the runtime user owns with any group access is refused. Group read is accepted only on a file root owns. Give that file’s group to the runtime user alone, because every member of the group can read the secret. On a plain host that is every member of the group in /etc/group.

Registry Evidence and both wallet adapters require a real secret root directory owned by root or the runtime account. The runtime must be able to open and search it. Clear group and other write bits in both postures, even on a read-only mount. evidencectl doctor checks the same root rule.

Each secret file refusal names the failed check by a platform.secret-file.* code and states the fix. The error reference lists the ten codes.

A process that declares the development posture loads a file whose read or mode bits are too loose (world-readable, group-access, mode-bits) and logs one warning per check. Every other refusal holds in development. Production refuses all of them.

  • Host or systemd. Create each file as the service user with install -m 0400, or as root with chown root:<service-group> and chmod 0440. Keep the service group to the service user.
  • Kubernetes. You can mount a Secret directly when the directory meets the root rule and the runtime can read each referenced file under the file rule. A root-owned file at mode 0440 is suitable if the non-root runtime can read it through its group. A root-owned file at mode 0400 is unreadable by a non-root runtime. If you set securityContext.fsGroup, it applies to the whole pod. Check the resulting owner, mode and access on the target host. If the projection cannot meet both rules, stage files at mode 0400 in a runtime-owned directory at mode 0700 on a memory-backed volume.
  • The Helm chart. The chart stages each secret into a memory volume owned by the runtime user at mode 0400, which the rule accepts. It does not use fsGroup. See the chart’s README.
  • Docker Compose. A Compose file secret keeps the host file’s owner and mode on some hosts, and on others Compose ignores the uid, gid, and mode you declare and presents the file world-readable, which production refuses. Prepare a volume or bind-mounted directory with the owner and mode above instead.
  1. Use separate migration and runtime database roles with TLS. Run the product’s doctor against the deployed runtime configuration and confirm the serving credential cannot activate packages.
  2. Review scopes, access profiles, source requests, and disclosure rules as governed input. Verify the exact issuer, audience, admitted clients, scopes, and selected access profiles with both permitted and refused synthetic calls.
  3. For BReg, verify the installed package digest and current database activation before serving. A package carries digests, not signatures. Test row and field disclosure with a least-privilege caller as well as the administrator.
  4. For Casework, bootstrap only the intended teams and queues. Test requester, reviewer, and supervisor separation, initiator exclusion, distinct approvals, and a revoked Directory member. Resolve the doctor’s distinct-approver warning before relying on a multi-approval stage.
  5. Keep current-source human display on the caller’s own token and source profile. Give the service status credential only its declared read purpose. Deploy BReg and Casework at matching versions, and verify that Casework approval alone cannot apply a producer mutation.
  6. Reconcile a mutation whose response was lost. Archive service and operator audit streams, and test the separate database restore and payload retention procedures with synthetic data.

Treat a failed negative test as an authorisation or deployment defect. Correct the responsible policy, grants, or credentials and rerun the test before exposing traffic.

Freeze the Registry Evidence package and target

Section titled “Freeze the Registry Evidence package and target”
  • Mount the installed package and its artifacts, the deployment target’s runtime.yaml, and each named CA bundle read-only and non-writable to the service process. Apply the secret root rule separately. Keep every bound source extract non-writable too. Registry Evidence refuses writable deployment inputs before serving.

  • Freeze the package and target before proving or serving them, then prove the frozen bytes on the target host:

    Terminal window
    chmod -R a-w "<installed-package>" && chmod 444 "<deployment-target>/runtime.yaml"
    evidence check --runtime-config "<deployment-target>/runtime.yaml" \
    --require-runtime-dependencies --require-audit-under "<audit-root>"
    evidence evaluate --runtime-config "<deployment-target>/runtime.yaml" \
    --fixture "fixtures/<cases>.yaml"
  • Review the complete simultaneously enabled bundle as one disclosure surface, including threshold ladders, overlapping categories, more precise regions, jurisdiction variants, coexisting revisions, and relationship combinations. A declared disclosureGuard family is an operator attestation, not a semantic classifier.

  • Confirm that no two authority paths cover the same requirement, purpose, and subject tuple. Startup does not detect that overlap. Request-time evaluation denies the ambiguous request.

  • Keep responseFormats at the signed default unless a reviewed decision widens it. Unsigned output is transport-authenticated convenience and is never later-verifiable evidence.

  • Registry Evidence, Render, BReg and Casework configure the shared audit writer through their audit block. It selects file or stdout. A file destination also sets path, rotateBytes (100 MiB by default), and retentionDays (90 by default). Put the path on durable storage in a directory owned by the service user and not writable by group or others.
  • Audit is fail-closed. Registry Evidence durably accepts an access-attempt entry before every source stage and a disclosure-release entry before returning the response. Render accepts its request entry before work and response entry before release. A full or unwritable disk stops those operations instead of degrading to best-effort logging.
  • Run one process per audit path. The writer holds an exclusive <path>.lock for its lifetime. Give each replica a separate path, or use stdout and collect every stream centrally.
  • After any failed write, the writer refuses later entries until restart. Readiness rechecks the active file, so renaming, truncating, or replacing it under a running process revokes readiness.
  • Rotation renames the active file to <path>.<sequence> and removes sealed files older than retentionDays. Ship each sealed file before local retention deletes it.
  • The log has no hash chain or signature. Ship sealed files or stdout to append-only storage the service account cannot change. The products do not prove remote receipt.
  • Before first use of the shared writer, archive older chained audit segments and start with a fresh path so the new retention policy cannot delete the old format unexpectedly. The writer refuses an active file whose first entry has the older hash-chained shape.
  • Every Registry Evidence pseudonym carries audit.hashKeyVersion. Raise that version when rotating the audit master, and retain the old master for as long as older pseudonyms must be recomputable.
  • Terminate TLS and manage certificates at a reviewed reverse proxy or load balancer.
  • Take runtime updates on a deliberate cadence. Track advisories against pinned base images and edge components as well as the runtime.
  • Keep the refusal surface uninformative end to end. Do not let the edge add distinguishing error pages, redirects, or timing differences in front of the runtime’s closed problem shapes.
  • Alert on the runtime’s refusal counter. Each runtime counts every refused request by the check that refused it, in <product>_request_refusals_total{check}, and writes one request refused log line per refusal with no caller value. The line is limited to five per check per minute, so the counter is the signal (refused requests).
  • Treat loopback as one rule on every outbound destination. A host is loopback when it is an address in 127.0.0.0/8, ::1 or an IPv4-mapped form of a 127.0.0.0/8 address, or the name localhost, which the runtime connects to only through loopback addresses. a.localhost and localhost. are ordinary named hosts. Allow plain http only to loopback. The runtime trusts loopback, so anything that shares its host or Pod network can stand in for a loopback issuer or database.
  • Leave allowedPrivateCidrs out unless a destination needs a private address. An omitted or empty list admits no private address. Name the smallest range that holds the service when one does.
  • Do not let an edge cache store an authenticated response. BReg, Casework and Registry Evidence mark such responses no-store. Render marks only its error responses, so set the cache policy for Render at the edge.
  • Bind Registry Evidence to loopback, a private IPv4 address, or a unique-local IPv6 address. A wildcard bind needs networkExposure: container-private on a container network. Its runtime fixes tlsTermination to operator-controlled-upstream and trustProxyIdentityHeaders to false, and it validates tokens itself.
  • Leave metricsListener unset unless needed. When present, bind it to a distinct private address. It serves only GET /metrics, and the Evidence listener does not serve metrics.
  • Size Registry Evidence rateLimits as per-process, in-memory budgets. N replicas multiply each limit by N, and restart restores the full budget. Set the failed-selector budget deliberately and enforce per-client quotas at the gateway.
  • Keep every Evidence source hop on a private network where possible. Give Registry Evidence a dedicated source credential scoped to the exact operation the bundle performs.
  • Use https for every Evidence HTTP source. Plain http is accepted only to a numeric loopback host, where no certificate is checked. Registry Evidence ignores HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY, follows no redirect, and has no application proxy setting.
  • Rehearse replacement of a governed Evidence bundle. The time to withdraw a disclosure is the deployment pipeline’s, so measure it before an incident.

Registry Evidence exposes no posture route. Its posture is the exact package and closed runtime file it loaded, mounted read-only, with no reload, merge, governed-field override, or fallback. Record the package digest and retain the runtime file with the deployment record. One process serves one operator-controlled trust domain. Mutually distrustful issuers or customers require separate deployments, signers, bundles, and audit boundaries.

  • Know the private vulnerability reporting channel before an incident.
  • For a compromised Evidence signing key, disable provider signing authority, remove its public JWK, add its thumbprint to signing.revokedKeyIds, and activate a checked replacement or leave the service unavailable. Restart affected issuers and consumers. Registry Evidence has no assertion revocation or status feature, so use short validity windows and key denylisting.
  • Rotate a compromised source credential at the source and restart the affected process.
  • Preserve shipped audit copies and copy the entire local audit directory, including sealed files, before retention removes them.
  • A 403 evidence.denied deliberately does not identify the failed authorisation check, and the audit entry for the refusal is the same whichever check failed. Check trusted local configuration in this order: audience, matching grant, authority, purpose and subject roles, then response-format permission. The request log’s category field separates an authorisation refusal from a response-format refusal.

Before handoff, confirm each of the following with synthetic data and record the result.

  1. Exercise valid, missing, invalid, expired, wrongly issued, and insufficiently scoped credentials. Record the authenticated and unauthenticated results.
  2. Confirm that a denial reaches no source.
  3. Confirm that configuration cannot widen access through an unknown or ignored field.
  4. Confirm that an audit failure blocks release.
  5. Test source timeout and size-limit behaviour, backup, restore, and rollback. Record the rollback trigger and the responsible operator.

Check that each serving product reports posture: production in its readiness response.

Confirm that Registry Evidence readiness rechecks the subject-binding key, signer, pinned audit sink, and every source credential. It does not send an evidence-data request, so readiness does not prove that a source returns data. Verify a stored assertion offline with independently retained expectations, and confirm an audited request reaches the configured durable sink.

SymptomCauseFix
Registry Evidence refuses a non-immutable inputThe package, runtime.yaml, captured artifact, or CA bundle is writableFreeze the package and target and restart
Registry Evidence refuses /secretProviders/file/rootThe directory fails the secret root ruleApply the fix in the diagnostic and rerun the runtime dependency check
Registry Evidence refuses an invalid bound source extractThe named extract is writableMake the extract non-writable and restart
A second Registry Evidence process reports a locked audit sinkTwo processes share one audit.pathUse one writer per path or use distinct paths or stdout per replica
Registry Evidence returns 403 evidence.denied unexpectedlyAudience, grant, authority, purpose, subject, or format authorisation failedCheck local configuration in the incident-response order and read the request log’s category