Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Learn
Start
Guides
Domain packs
Participants
Security and privacy
Pilot kits
Operations
Ecosystem

Threat note: production public services

Source docs/security/service-production.md

On this page
  1. Trust boundaries added
  2. Threats and controls
  3. What is tested
  4. Not covered

Non-normative. Scope: reference/rust/obsp-services (registry, transparency log, discovery, credential status on axum and PostgreSQL), its key management, identity and access, admin API and audit log, and the access guard of the participant gateway (obsp-gateway, feature access). The protocol-level threats are in the threat model; the per-service notes (registry, log, discovery, status) still apply, because the Rust services answer the same routes with the same documents as the reference services (checked by services/public-services/parity). This note covers what the production layer adds and what is left. It does not say the services can be exposed without the operator’s own review, TLS terminator and network controls.

Trust boundaries added

Id Boundary What crosses it Trust rule
P1 Caller to service Requests, credentials (operator token, API key, access token, DPoP proof) Anonymous unless a credential verifies; a scope per write; a tenant acts on its own resources only
P2 Service to identity provider JWKS and discovery document Fetched over https (loopback or plain http only by an explicit test flag), no redirect, 256 KiB limit, cached five minutes
P3 Service to key store Signing requests; never private keys Keys named by secret:// only; a key-management service’s signatures are checked against its public key
P4 Service to database Log entries, documents, status events, tenants, key hashes The database refuses updates and deletes of append-only rows and any entry that does not extend its chain
P5 TLS terminator to service The client certificate’s thumbprint for certificate-bound tokens Trusted only from the configured header, which the terminator must strip from inbound requests

Threats and controls

STRIDE Threat What the code does Residual risk
Spoofing A stolen bearer token replayed by someone else Scopes can be marked bound: those need DPoP (proof key thumbprint equals cnf.jkt, method and URL match, iat within the leeway, ath is the token’s hash, jti never seen in the window) or a certificate-bound token (cnf["x5t#S256"] equals the terminator’s thumbprint) Unbound scopes accept plain bearer tokens; the DPoP replay cache is per process, so a replay to another replica within the window is not caught
Spoofing A forged access token Asymmetric algorithms only (RS, PS, ES, EdDSA; none and HMAC refused), issuer, audience, expiry, not-before and subject checked; keys from the issuer’s key set only; private members in a JWK refused A compromised identity provider issues valid tokens; tokens stay valid until they expire (no introspection)
Spoofing A guessed or leaked API key 32 random bytes; stored as HMAC-SHA-256 under a pepper held outside the database (secret://), compared in constant time; shown once; revocable; expiry A key leaked from a client stays usable until revoked; the pepper and the database together allow an offline search, which 256-bit keys make impractical
Spoofing A forged witness cosignature The reference logs’ format: only keys of the operator’s witness policy, never the log’s own key, over a head the log signed whose root is the log’s root at that size; a head counts as witnessed at the policy’s threshold of distinct witnesses Witness keys are configuration; no witness discovery; no draft specifies witnesses
Tampering Rows changed or deleted in the database Triggers refuse UPDATE, DELETE and TRUNCATE on log entries, documents, status events, cosignatures and key records; an API key’s hash, id and tenant never change; a log entry must be the next index and name the previous entry hash; entries are stored in their RFC 8785 form and re-hashed on load A database superuser can drop the triggers; the chain check on load and clients’ consistency proofs detect a rewritten log, not a rewritten document store
Tampering A split view of the log Signed tree heads, consistency proofs, GET /v1/tree-head/witnessed (the newest head at the witness threshold), the notification hook to witnesses; the witness (witness::Witness) cosigns only a head consistent with the last one it cosigned and keeps split-view evidence Detection still needs readers to require witnessed heads or compare heads
Tampering A key-management service returning a wrong signature Every signature is verified against the key’s public key before use A service that signs with the right key on the wrong request cannot be detected by the signer
Repudiation An operator or tenant denies a privileged call Every call that needs a scope (refused or not) is appended to an audit log in the transparency-log format: method, path, scope, principal kind and id, tenant, status, request id, time; inclusion proofs; key changes appended too The audit log’s tree heads are signed with the service key only when one is configured; the record names a key id or a token subject, not a person
Repudiation A key change hidden after the fact Rotation and revocation produce draft OIP-0008 key records (ROTATED with validUntil, REVOKED with revokedAt), validated against the draft schema, stored append-only, served at /v1/keys and logged Verifiers must fetch key records from a source they trust, not only from the service
Information disclosure Secrets in logs, errors or answers Request logs carry no client address, query string, header or body; problem documents carry the service’s own messages; key hashes are never returned; secret:// errors never echo key material; the registry serves only the documents it recorded Audit records hold API key ids and token subjects, which identify clients to whoever reads the audit log (scope obsp.audit.read)
Information disclosure A path outside the secrets directory secret://file/ paths are relative, without empty, . or .. segments, under OBSP_SECRETS_DIR Symbolic links inside that directory are followed
Denial of service Floods, large or deep bodies, many query fields Token buckets per tenant (its own rate) or per client address, writes cost more, daily quotas per tenant; request target 2048 bytes, a body limit per service, Content-Length required, JSON nested at most 64 levels (checked before parsing), at most 32 query fields; status list decoding stops at 16 MiB Limits are per process; replicas need a shared limiter in front; bucket tables are bounded (oldest dropped first)
Denial of service Expensive proofs The Merkle tree keeps every complete subtree hash, so a head, an audit path or a consistency proof costs O(log n) hashes All leaves stay in memory (32 bytes each)
Elevation of privilege A tenant acting on another tenant A {tenant} in a path must be the caller’s own, a {listId} one of its status lists; a tenant never mints a scope it does not hold; listing tenants, reading the audit log and key rotation are for global principals A token without a tenant claim is global with its scopes: the identity provider must not issue global admin scopes broadly
Elevation of privilege The self-service sandbox Off by default (flag on the service and on the site); sandbox tenants have no write scope, a rate of 2 per second, a quota of 1000 a day and keys that expire in 24 hours Each sandbox call creates a tenant row; the anonymous rate limit bounds how fast

What is tested

  • Parity with the reference services: services/public-services/parity/run_parity.py (file and PostgreSQL stores).
  • Access: reference/rust/obsp-services/tests/access.rs (tenants, keys, isolation, quotas, audit, OIDC refusals, DPoP replay and binding, certificate binding, sandbox flag, rotation and revocation, witness cosignatures, the gateway guard).
  • Database rules: tests/pg.rs (with OBSP_TEST_DATABASE_URL).
  • Parsers: fuzz/ (cargo-fuzz targets for request bodies, query strings, UNIs, secret:// references, status lists, receipts and envelopes) and their properties on seed inputs in tests/fuzz_seeds.rs.

Not covered

No load test, no penetration test, no review by a third party. PKCS#11 signing is compiled and its code path written against PKCS#11 3.0 CKM_EDDSA, but no token was available to run it here. The compose stack with a local OpenID Connect provider (infra/compose/platform.yaml) was written for tests and was not run in the environment that wrote it.