Skip to content

Platform configuration and secrets

Platform configuration is a store of named values that an application keeps on the platform: settings it reads at start-up, per-client options, and secrets such as an API key or an SFTP password. It lets one deployment of an application serve many clients, each with its own values, without a configuration file per client and without secrets in environment variables.

Each value belongs to an application and is addressed by section and property, for example orders / sftp / password.

Axis Choices
Scope Global (application-wide) or for one client. They are separate values: asking for a client’s value never falls back to the global one
Type Plain (stored and shown as text) or secret (encrypted, never shown)

A client is named by its id (clt_…) or its identifier (acme); the platform stores the id, so both mean the same scope.

Why no fall-back. A per-client secret that silently fell back to a global one would let one client’s job run with credentials meant for another purpose. Making the two separate means a missing client value is a visible “not found”, not a quiet substitution.

Each call is checked twice: a permission on the application, and a client confinement that decides which of its values the caller reaches.

Caller Client values Global value
Platform administrator (anchor tier) Every client’s Read and write
The application’s own service account Only the clients it is linked to Read and write
A person below anchor tier (through access grants on the application) Only their own clients’ Read only

A value outside the caller’s reach is 403 and is left out of lists. An application’s service account reaches only its own application, never another’s. An application acting for one of its signed-in users can say so (X-On-Behalf-Of), and the platform records it beside the service account in the audit log.

A secret is encrypted at rest with AES-256-GCM under the platform key (FLOWCATALYST_APP_KEY), and the ciphertext is bound to its coordinate (application, section, property and client). A stored value copied to another property does not decrypt there.

A secret is never returned by the ordinary calls. Listing, reading and setting all return the literal *** for a secret, for every caller, administrators included. The mask is not a value: writing *** back is refused, so a read-modify-write cannot replace a secret with its mask.

The one way for a person or an application to read a secret is the reveal call (GET /api/config/{app}/{section}/{property}/secret).

  • Reveal is always its own permission, never implied by being able to view or edit configuration: platform:admin:config:reveal for an administrator (the platform:config-secrets-admin role is the deliberate grant), and platform:application-service:config:reveal for an application’s own service account.
  • Every reveal is audited: who, which property, when, and on whose behalf; never the value. A reveal that cannot be recorded is refused.
  • The answer carries Cache-Control: no-store and an updatedAt, so a caller that caches the value briefly can tell when it was rotated.

Why an explicit, audited reveal. Most people who manage configuration never need to see a secret’s value. Separating “edit” from “read the secret” keeps the set of people and systems who can read credentials small and reviewable, and the audit trail answers “who has read this password” after the fact.

flowchart LR
  write["Set a secret<br/>(value or AWS reference)"] --> store[("Encrypted at rest,<br/>bound to its coordinate")]
  store -->|ordinary read| mask["***"]
  store -->|reveal, permission + audit row| app["Application or administrator"]
  store -->|bound-secret fetch, telemetry| rt["Ingestor runtime"]
  store -->|settings document| fr["Function runner"]
  ref["AWS Secrets Manager<br/>or Parameter Store"] -.->|resolved at read,<br/>cached 5 min| store

Besides the reveal, two platform components receive secrets as part of their own job:

  • The ingestor runtime fetches the secrets its ingestion’s live definition names, at the ingestion’s own client, through its runtime API. It re-reads them about once a minute, so a fetch is recorded as security telemetry (a log line, a counter and a “last fetched” record on the ingestion) rather than an audit row per read. A refused fetch is audited.
  • The function runner receives a function’s declared secret and database settings in its settings document. Function secrets are function settings, set per function, not configuration properties.

A secret’s value may be a reference to a secret kept in AWS instead of the secret itself, so it is set and rotated in one place:

Reference Resolves to
aws-sm://<name-or-arn> The Secrets Manager secret’s string value
aws-sm://<name-or-arn>#<key> Field <key> of that secret read as a JSON object
aws-ps://<parameter> The Parameter Store parameter’s value, decrypted (a path parameter is aws-ps:///path/to/param)

References are accepted for configuration secrets, ingestion secrets and function secret and database settings. The platform stores the reference and resolves it at read time, when it reveals the secret, hands it to an ingestor runtime or renders a function’s settings. A resolved value is cached for FC_SECRET_REFERENCE_TTL (5 minutes), so a rotation in AWS reaches every reader within that time with nothing to change on the platform. While AWS cannot be reached, the last value is served for up to FC_SECRET_REFERENCE_MAX_STALE (1 hour).

  • Off by default. A reference must start with one of the prefixes in FC_SECRET_REFERENCE_ALLOW, checked when it is written and again when it is resolved. Unset means no reference is accepted. Without the allow-list, anyone who may set a function secret could point it at any secret the platform’s own AWS role can read, its database password included.
  • Only these two schemes resolve. gcp-sm://, vault:// and env:// are refused at write (400 SECRET_REFERENCE_UNSUPPORTED). env:// in particular must never resolve: it would hand the platform’s own environment to a caller.
  • A reference is not a secret. Ordinary reads and the console show it where a real secret shows ***; the reveal returns the secret it points at.
  • A reference that does not resolve is an explicit error (SECRET_REFERENCE_NOT_FOUND, _DENIED, _KEY_MISSING, _NOT_ALLOWED, or 503 SECRET_REFERENCE_UNAVAILABLE). For a function, the setting is left out and the platform logs which function, key and reference failed.

Publishing credentials to Parameter Store. The other direction is also available. When an operator sets FC_CREDENTIAL_PUBLISH=aws-ps and FC_CREDENTIAL_PUBLISH_PREFIX, a service account or a stand-alone OAuth client can be marked to publish its credentials (client id and secret, webhook token, signing secret) as SecureString parameters under that prefix, so a receiving application reads them through an aws-ps:// reference instead of having them copied by hand. It is opt-in for each owner and off unless the variable is set; the copy is in addition to the platform’s own, which does not change.

Section ingest holds the per-environment settings of ingestions: one plain JSON value per client and key, which an ingestion’s source names instead of holding its settings inline. It is written only through the ingestion that names it, after being checked against every ingestion that does, so the generic configuration calls refuse to write it (400 CONFIG_SECTION_RESERVED).

Setting and deleting a property are audited (never a secret’s value) and emit the events platform:admin:platform-config:property-set and platform:admin:platform-config:property-deleted. Configuration belongs to its application: deleting the application deletes its values, secrets included.

Operating notes. Without FLOWCATALYST_APP_KEY a secret can be neither written nor revealed: the platform refuses rather than store or return plaintext. After rotating the key, keep the old one in FLOWCATALYST_APP_KEY_PREVIOUS (a comma-separated list) so existing secrets stay readable, then run fc-server reencrypt to move every stored secret to the new key. See the key rotation runbook.

Every SDK has the configuration calls and a reveal call. Applications built on the FlowCatalyst framework read per-client secrets through the framework’s secret resolver, whose platform driver uses the reveal call as the application’s service account, and their admin pages send X-On-Behalf-Of with the signed-in user.