Unreleased documentation. These pages follow the main branch and can change before the next release. For supported guidance, use v0.44.0.
Document Store configuration reference
The Registry Document Store reads two files: the documents.yaml project that declares access
profiles, document policies, and hooks, and the runtime.yaml an operator deploys.
Contract status
Section titled “Contract status”| File | Kind | Status | Source |
|---|---|---|---|
documents.yaml | DocumentsProject | Pre-1.0, may change | products/documents/generated/project/project.schema.json |
runtime.yaml | DocumentsRuntimeConfig | Pre-1.0, may change | products/documents/generated/runtime/runtime.schema.json |
Every mapping is closed: an unknown key is refused with its path. JSON Schema is not the
acceptance path: a document these schemas accept still has to pass documentsctl check, which
resolves the access profiles each policy names and checks each profile’s role against the
policy that uses it. The check also refuses:
- an OAuth client listed in
requesterClientsof two profiles (documents.project.shared-requester-client); - a profile whose
principalClaimdiffers from another profile’s with the sameactorKind(documents.project.mixed-principal-claim): every profile of one actor kind reads the subject from one claim; - a hook whose
handler.destinationIdthe runtime configuration does not bind underdestinations.hooks(documents.runtime.unbound-hook-destination, at/destinations/hooks), when the check is given both--projectand--runtime-config. The runtime refuses to start with the same diagnostic at the same position, before it connects to the database, anddocumentsctl verification replay, which activates the same hooks, refuses with it too.
A profile’s requesterClients, requiredScopes, actorKind, and principalClaim are what an
access token must match, beside the runtime’s authentication.oidc block.
Access tokens lists every header and claim a token
must carry.
Key paths
Section titled “Key paths”A key path writes a property as name, an array item as name[], and a map entry whose name you
choose as name.*, as in documentPolicies.*.mandatoryRestrictions.cleanupGraceHours or
destinations.hooks.*.url.
documents.yamlSource preview, pre-1.0, 48 key pathsruntime.yamlSource preview, pre-1.0, 74 key paths
documents.yaml
Source preview, pre-1.0
Generated from products/documents/generated/project/project.schema.json. 48 key paths. Explained in docs/site/src/content/docs/reference/documents-configuration.mdx.
| Key path | Type | Required | Accepted values | Constraints |
|---|---|---|---|---|
accessProfilesThe caller profiles a document policy names, by id. | object | Yes | Not specified | None specified |
accessProfiles.*Map valueOne declared caller profile. | object | No | Not specified |
|
accessProfiles.*.actorKindThe actor kind the token must claim. | string | Yes |
| None specified |
accessProfiles.*.institutionThe institution this profile acts for. The Document Store records it
as the issuing institution of every document version a caller under
this profile reserves; a profile that names none records none. | string | No | Not specified |
|
accessProfiles.*.principalClaimsub, or the name of another string claim identifying the principal.
Every profile of one actor kind names the same claim. | string | Yes | Not specified |
|
accessProfiles.*.requesterClientsThe OAuth clients whose tokens resolve to this profile; at least one. | array | Yes | Not specified |
|
accessProfiles.*.requesterClients[]Array itemAn identifier another system issues, written exactly as its issuer gives it. | string | No | Not specified |
|
accessProfiles.*.requiredScopesThe scopes a token must carry; at least one. | array | Yes | Not specified |
|
accessProfiles.*.requiredScopes[]Array itemAn identifier another system issues, written exactly as its issuer gives it. | string | No | Not specified |
|
accessProfiles.*.roleWhat a caller resolved to this profile is to a document. | string | Yes |
| None specified |
apiVersion | string | Yes |
| None specified |
documentPoliciesThe policies a document is held under, by id. | object | Yes | Not specified | None specified |
documentPolicies.*Map valueOne document policy: who may hold, grant, and receive a document held
under it, and the restrictions every such document carries. | object | No | Not specified |
|
documentPolicies.*.custodianWho holds a document a service places for a named person: the
reserving system for its institution, or that person. | string | Yes |
| None specified |
documentPolicies.*.custodyProfilesProfiles that may place a document in custody under this policy. | array | Yes | Not specified |
|
documentPolicies.*.custodyProfiles[]Array itemA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | No | Not specified |
|
documentPolicies.*.grantingProfilesProfiles that may issue a document grant on a document they hold in
custody under this policy. A system that only reserved a document for
another custodian never grants on it. | array | Yes | Not specified |
|
documentPolicies.*.grantingProfiles[]Array itemA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | No | Not specified |
|
documentPolicies.*.labelHuman-readable display text. Bidirectional embedding, override, and isolate controls, byte-order marks, line and paragraph separators, and Unicode noncharacters are refused; multilingual joiners and direction marks remain valid. | string | Yes | Not specified | None specified |
documentPolicies.*.mandatoryRestrictionsThe restrictions every document held under a policy carries. | object | Yes | Not specified | None specified |
documentPolicies.*.mandatoryRestrictions.allowedContentTypesThe media types a document may be declared as, matched exactly. | array | Yes | Not specified |
|
documentPolicies.*.mandatoryRestrictions.allowedContentTypes[]Array itemA lowercase concrete media type type/subtype without parameters or wildcards, matched exactly. | string | No | Not specified |
|
documentPolicies.*.mandatoryRestrictions.cleanupGraceHoursTime between the custodian's removal request, or a rejection, and
erasure of the bytes, and the length of a reservation's upload
window. At least one hour, so an operator always has a window to
restore from a mistaken request. Grant expiry and revocation erase
nothing: they only stop a grant releasing. | integer | Yes | Not specified |
|
documentPolicies.*.mandatoryRestrictions.grantExpiryHours | integer | Yes | Not specified |
|
documentPolicies.*.mandatoryRestrictions.maximumCustodianBytesThe bytes one custodian may hold under this policy, counted over
every reserved or stored version not yet erased and checked at
reservation. | integer | Yes | Not specified |
|
documentPolicies.*.mandatoryRestrictions.maximumDocumentBytesThe largest document a reservation may declare. It may not exceed
the deployment ceiling storage.maximumDocumentBytes; the runtime
refuses to start otherwise. | integer | Yes | Not specified |
|
documentPolicies.*.mandatoryRestrictions.maximumGrantExpiryHours | integer | Yes | Not specified |
|
documentPolicies.*.recipientProfilesProfiles a document grant may name as its recipient. | array | Yes | Not specified |
|
documentPolicies.*.recipientProfiles[]Array itemA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | No | Not specified |
|
documentPolicies.*.representedPrincipalGrantsWhether the represented principal may issue document grants itself. | string | Yes |
| None specified |
documentPolicies.*.representedPrincipalProfileThe profile a represented principal authenticates under. | string | Yes | Not specified |
|
documentPolicies.*.version | string | Yes | Not specified | None specified |
hooksAfter-commit observer hooks. A project with none omits the member. | array | No | Not specified | None specified |
hooks[]Array itemOne after-commit observer hook. | object | No | Not specified | None specified |
hooks[].handlerWhere an observer hook delivers, chosen by its type member: a URL
destination the runtime configuration binds under destinations.hooks. | object | Yes | Not specified | None specified |
hooks[].handler.destinationIdA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | Yes | Not specified |
|
hooks[].handler.type | string | Yes |
| None specified |
hooks[].idA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | Yes | Not specified |
|
hooks[].phaseWhen an observer hook runs relative to the triggering transaction. | string | Yes |
| None specified |
hooks[].policiesThe document policies whose documents the observer hears about: a
change to a document held under any other policy captures nothing
for it. Listing them is the operator's declaration of who may
receive which documents' events. | array | Yes | Not specified |
|
hooks[].policies[]Array itemA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | No | Not specified |
|
hooks[].projectionThe fields of the trigger's projection the observer receives. | array | Yes | Not specified |
|
hooks[].projection[]Array itemAn identifier another system issues, written exactly as its issuer gives it. | string | No | Not specified |
|
hooks[].triggerThe committed change an observer hook follows. | string | Yes |
| None specified |
kind | string | Yes |
| None specified |
projectThe members that name a project (CFG-ENV-6): a project's project block
holds these, and may add project-wide members of the product's own.
Schema name ProjectIdentity. | object | Yes | Not specified | None specified |
project.idA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | Yes | Not specified |
|
project.version | string | Yes | Not specified | None specified |
runtime.yaml
Source preview, pre-1.0
Generated from products/documents/generated/runtime/runtime.schema.json. 74 key paths. Explained in docs/site/src/content/docs/reference/documents-configuration.mdx.
| Key path | Type | Required | Accepted values | Constraints |
|---|---|---|---|---|
apiVersion | string | Yes |
| None specified |
auditWhere the audit journal is written and the key its hashes are made with. | object | Yes | Not specified | None specified |
audit.destinationWhere audit entries go: a rotated file (the default) or stdout. | string | No |
"file" | None specified |
audit.hashKeyRefSecret reference to the audit hash key. | string | Yes | Not specified |
|
audit.pathThe absolute path of the active audit file, for destination: file. | string | No | Not specified |
|
audit.retentionDaysHow many days a sealed audit file is kept, for destination: file;
90 when omitted. | integer | No | Not specified |
|
audit.rotateBytesThe size at which the active file is sealed and a new one begun,
for destination: file; 100 MiB when omitted. | integer | No | Not specified |
|
authentication | object | Yes | Not specified | None specified |
authentication.oidcThe OIDC issuer whose access tokens this runtime accepts, the clients it
admits, and the claim carrying their scopes. | object | Yes | Not specified | None specified |
authentication.oidc.allowInsecureHttpPermit plain HTTP beyond loopback to the configured issuer and to a
JWKS URI declared in configuration. TLS remains required unless the
operator explicitly accepts this transport risk. | boolean | No | Not specifiedSchema default, where declared: false | None specified |
authentication.oidc.allowedClientsClient identifiers whose access tokens are admitted. Required in every
file; an omitted or empty list, an empty or repeated client, and
unrestricted are refused. | array | Yes | Not specified |
|
authentication.oidc.allowedClients[]Array item | string | No | Not specified |
|
authentication.oidc.assertionIssuersAssertion authorities each client may exchange a subject token from,
keyed by client identifier. Omitted, no assertion-issuer rule applies;
written, it lists at least one client, each with at least one
authority. Once a client is listed, a token it exchanged is accepted
only for one of that client's declared authorities, and a client that
is not listed may exchange from no authority. | object | No | Not specified |
|
authentication.oidc.assertionIssuers.*Map value | array | No | Not specified |
|
authentication.oidc.assertionIssuers.*[]Array item | string | No | Not specified |
|
authentication.oidc.audienceThe audience every accepted access token must carry in aud. | string | Yes | Not specified |
|
authentication.oidc.issuerExact issuer accepted in access-token iss claims, an absolute
https URL, or a plain http URL when allowInsecureHttp is set. | string | Yes | Not specified |
|
authentication.oidc.jwksSourceWhere the issuer's signing keys come from. Absent reads the issuer's
OpenID Connect discovery document. | object | No | Not specifiedSchema default, where declared: {"type":"discovery"} | None specified |
authentication.oidc.jwksSource.documentRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Conditional | Not specified |
|
authentication.oidc.jwksSource.type | string | Yes |
| None specified |
authentication.oidc.jwksSource.uriAn absolute http or https URL with a host preserved as written, no user information, and no backslash, whitespace or control character. DNS case and equivalent IPv6 literals are permitted. | string | Conditional | Not specified |
|
authentication.oidc.scopeClaimAn identifier another system issues, written exactly as its issuer gives it. | string | No | Not specifiedSchema default, where declared: "scope" |
|
cleanupErasure of the bytes of documents whose custodian asked for their
removal. | object | Yes | Not specified | None specified |
cleanup.erasureWhether erasure work runs. paused stops every erasure and the sweep
of orphaned objects; a removal request still stops release at once, and
lapsed uploads are still expired. | string | Yes |
| None specified |
contentVerificationThe content verifier every document version passes before it becomes
releasable. | object | Yes | Not specified | None specified |
contentVerification.attemptTimeoutMillisecondsThe longest one verification attempt may run, body included.
Omitted, 10000. | integer | Conditional | Not specifiedSchema default, where declared: 10000 |
|
contentVerification.authorizationRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Conditional | Not specified |
|
contentVerification.policyIdNon-secret identity of the external scanner and its rules generation. | string | Conditional | Not specified |
|
contentVerification.type | string | Yes |
| None specified |
contentVerification.urlThe URL the content is posted to. It is https; http is accepted
only for a loopback host, for local development. | string | Conditional | Not specified |
|
databaseThe PostgreSQL connection a stateful runtime uses. Both URLs are secret
references and may name the same secret. | object | Yes | Not specified | None specified |
database.migrationUrlRefSecret reference to the migration connection URL. | string | Yes | Not specified |
|
database.runtimeUrlRefSecret reference to the least-privileged runtime connection URL. | string | Yes | Not specified |
|
database.testOnlyPlaintextAllow a plaintext connection. Refused outside test builds. | boolean | No | Not specifiedSchema default, where declared: false | None specified |
database.trustedRootCertificateRefSecret reference to a PEM root certificate the connection trusts.
Absent, the connection trusts the platform's root certificates. | string | No | Not specified |
|
destinationsWhere the project's hooks deliver, by destination id. | object | No | Not specified | None specified |
destinations.hooksLogical URL hook destinations. The project names only these ids; the
URL, signing key, and delivery budget stay deployment-owned. At most
128 are bound, each keyed by a local identifier. | object | No | Not specifiedSchema default, where declared: {} |
|
destinations.hooks.*Map valueOne URL hook destination a runtime signs and sends hook deliveries to:
the URL, the HMAC-SHA256 key reference, and the delivery budget. The
outbound policy is fixed: registry-platform-hooks activates it with no
private address range and no client certificate. A runtime whose
destinations need either configures its own full outbound policy instead. | object | No | Not specified |
|
destinations.hooks.*.attemptTimeoutMillisecondsHow long one delivery attempt may take, from 100 through 10000
milliseconds. | integer | No | Not specifiedSchema default, where declared: 5000 |
|
destinations.hooks.*.hmacSha256KeyRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Yes | Not specified |
|
destinations.hooks.*.maximumAttemptsHow many delivery attempts one event gets, from 1 through 20. | integer | No | Not specifiedSchema default, where declared: 8 |
|
destinations.hooks.*.urlAn https URL, or http on 127.0.0.1, localhost, or [::1], without a
query or fragment. | string | Yes | Not specified |
|
identityOptional in the type so a missing block gets a refusal naming the key
to add; the document requires it. | object | Yes | Not specified | None specified |
identity.databaseIdA local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -. | string | Yes | Not specified |
|
kind | string | Yes |
| None specified |
listenerThe listener of a runtime that declares its TLS termination and network
exposure. | object | Yes | Not specified | None specified |
listener.bindSocket address the runtime listens on, written host:port with an IP address host ([addr]:port for IPv6). | string | Yes | Not specified |
|
listener.networkExposureThe operator-declared private network placement of an HTTP listener. | string | No |
"private-address" | None specified |
listener.tlsTerminationDeclares the trusted transport boundary for a runtime's plaintext HTTP
listener. Production listeners require operator-controlled upstream TLS
termination; direct plaintext is limited to the explicit loopback-only
development mode. | string | Yes |
| None specified |
packageThe package a runtime serves: root is the absolute package directory,
and expectedDigest, when set, pins the package digest the runtime must
find there. The package digest is the digest of the package's
SHA256SUMS file; see [crate::package]. | object | Yes | Not specified | None specified |
package.expectedDigestsha256: label of the package digest, the digest of the package's
SHA256SUMS file. When set, the runtime refuses to start on any other
package. | string | No | Not specified |
|
package.rootAbsolute path of the package directory. | string | Yes | Not specified |
|
retentionRetention periods, in days. A jurisdiction's retention schedule approves
the deployed values; the bounds only keep a typo from becoming a policy. | object | No | Not specified | None specified |
retention.hookPayloadRetentionDays | integer | No | Not specifiedSchema default, where declared: 7 |
|
retention.receiptRetentionDays | integer | No | Not specifiedSchema default, where declared: 7 |
|
secretProvidersThe secret providers a runtime enables. A reference is resolved only by a
provider declared here: secret:file/name under file.root, and
secret:env/NAME only when environment: {} is present. | object | Yes | Not specified | None specified |
secretProviders.environmentEnables secret:env/NAME references, read from the process
environment. Declared as an empty mapping: environment: {}. | object | Conditional | Not specified | None specified |
secretProviders.fileEnables secret:file/name references, read from files under root. | object | Conditional | Not specified | None specified |
secretProviders.file.rootAbsolute directory holding one file per secret. Each file must be a
regular file owned by the runtime user, mode 0400 or 0600, with exactly
one hard link. | string | Conditional | Not specified |
and, where a rule elsewhere applies
|
storageWhere document version bytes are held. | object | Yes | Not specified | None specified |
storage.accessKeyIdRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Conditional | Not specified |
|
storage.attemptTimeoutMillisecondsThe longest one request may run, body included. Omitted, 10000. | integer | Conditional | Not specifiedSchema default, where declared: 10000 |
|
storage.bucketThe bucket name: lowercase letters, digits, - and .. | string | Conditional | Not specified |
|
storage.caBundleRefPEM CA bundle for the service. Omitted, the platform's trusted roots
verify it. | string | Conditional | Not specified |
|
storage.maximumDocumentBytesThe deployment ceiling on one document version; a policy's
mandatory restriction may only be lower. Omitted, 16 MiB. | integer | No | Not specifiedSchema default, where declared: 16777216 |
or
|
storage.pathStyleAddress the bucket as a path under url rather than as a host name.
Omitted, true. | boolean | Conditional | Not specifiedSchema default, where declared: true | None specified |
storage.regionThe signing region: lowercase letters, digits and -. | string | Conditional | Not specified |
|
storage.secretAccessKeyRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Conditional | Not specified |
|
storage.sessionTokenRefAn exact secret reference: secret:file/name, resolved under secretProviders.file.root, or secret:env/NAME, resolved only when secretProviders.environment is declared. | string | Conditional | Not specified |
|
storage.type | string | Yes |
| None specified |
storage.urlThe service's base URL, with no path. It is https; http is
accepted only for a loopback host, for local development. | string | Conditional | Not specified |
|
transfersHow long one upload or download may take: a floor, plus an allowance
for every mebibyte the document carries. A transfer still running at its
deadline is cut off and lets go of its bytes. | object | No | Not specified | None specified |
transfers.mebibyteAllowanceSecondsThe time added for every started mebibyte of the document. | integer | No | Not specifiedSchema default, where declared: 8 |
|
transfers.minimumDeadlineSecondsThe deadline of the smallest transfer. | integer | No | Not specifiedSchema default, where declared: 60 |
|
Check commands
Section titled “Check commands”Both files have a command that checks them offline, with no service, database, or secret. Each prints the diagnostics, JSON output, and exit codes that Check a file before you deploy it describes.
| Format and files | Check command |
|---|---|
Document Store project
| documentsctl check --project <project> |
Document Store runtime configuration
| documentsctl check --project <project> --runtime-config <file> |
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.