Platform config
The platform keeps configuration for each application: named values addressed by section and
property, global or per client, each plain or secret. A secret is encrypted at rest and shown
as *** by every ordinary read; the one way to read it is the reveal call, which the platform
records (Platform configuration and secrets describes the model).
The FlowCatalyst module gives an application two things on top of it, both acting as the application’s own service account and both confined to its own platform application code:
- the
platformsecrets driver, so the secret resolver can resolve a per-client secret from the platform (Secrets); - an admin section to list, add, change, delete and reveal that configuration.
| Java | Go | |
|---|---|---|
platform secrets driver |
built | built (2026-11-07) |
Admin section platform-config and its page |
built | not built: the Go framework has the driver and the client call for reveal only |
The design and the wire are in the specification. Everything below about the admin section is therefore Java-only; the driver sections apply to both languages.
The platform secrets driver
Section titled “The platform secrets driver”A per-client secret n for client c is the platform property (application, section, n) at client
scope c. The application is the configured flowcatalyst.application; a reference cannot name another
one. The default section is secrets.
SecretsModule.builder() .store("platform", PlatformSecrets.store()) // section "secrets", cache 5 min .store("platform-ftp", PlatformSecrets.store().section("ftp").withCache(CachePolicy.of(Duration.ofMinutes(1), 1000))) .defaultStore("platform") .build()List FlowCatalystModule as well; the driver takes the PlatformClient from it, and start-up fails if
flowcatalyst.enabled is false. SecretStores.platform() in the core module is only a placeholder that
fails start-up naming PlatformSecrets.store() (core cannot depend on the platform client).
fc, err := flowcatalyst.Build(ctx, b, fcd)resolver, err := secrets.Build(ctx, b, sd, secrets.WithStore("platform", flowcatalyst.PlatformSecrets(fc.Client())), secrets.WithStore("ftp", flowcatalyst.PlatformSecrets(fc.Client()).Section("ftp")), secrets.DefaultStore("platform"))PlatformSecrets(client) reads section secrets with secrets.DefaultCache(); .Section(name) and
.WithCache(policy) return modified copies. Building the store fails when the section is not
[a-z][a-z0-9-]{0,63}, the cache policy is out of range or the module is disabled (ErrDisabled).
What the service account needs
Section titled “What the service account needs”Every platform-config call is a permission on the platform: platform:application-service:config:view
(list), :update (set, delete) and :reveal (read a secret). All three are carried by the platform’s
platform:application-service role, which an application’s provisioned service account holds. It reaches
only the application(s) the account is bound to and, for an account below anchor tier, only the values of
clients it may act for. After upgrading a platform that predates the permission, make sure the platform’s
roles are synced.
Lookups and results
Section titled “Lookups and results”- The client in a lookup is the platform’s client id (
clt_...) or the client’s identifier (acme), so an application that names clients by code needs no translation; the platform resolves both to the same scope. A name that is neither shape isRefusedwithout a call, and a client the platform does not know isNotFound. - There is no fall-back to the global value: a missing per-client value is
NotFound.
| Platform answer | Result |
|---|---|
200 |
Found |
404 with code Config_NOT_FOUND or Client_NOT_FOUND |
NotFound (never cached) |
any other 404 (no code, another code, a proxy’s page) |
a store failure, not a missing secret |
400 NOT_A_SECRET |
Refused |
403, a server error, a network error or an undecodable answer |
a store failure that names the store, client and secret, and never a value or a response body |
Caching
Section titled “Caching”Found values are cached by the secrets cache policy (default 5 minutes, bounded, least recently used; not-found is never cached).
- Rotation is seen when the entry expires, after an explicit evict, or (Java) when the admin page writes
or deletes that secret. The platform’s
updatedAtis not used. - The identifier and the stored id of a client share one cache entry once the driver has seen the platform answer for it (up to 10 000 pairs are remembered); concurrent misses make one platform call.
- Stale on error: if the platform fails, the last value is served for
staleIfError(default 5 minutes, 0 to 24 hours, 0 turns it off) past its expiry, with a WARN naming store, client and secret. It never applies to not-found or refused answers.
See Secrets for the resolver and the cache API.
Calling the config API directly
Section titled “Calling the config API directly”PlatformClient has the calls behind the driver: configProperties(),
setConfigProperty(section, property, clientId, request), deleteConfigProperty(...) and
revealConfigSecret(...). Each of the last three also takes an onBehalfOf text, sent as
X-On-Behalf-Of so the platform’s audit row names the person as well as the service account. The small
records are in PlatformConfigData; a secret’s plaintext is in Revealed and SetRequest only, and both
print as value=withheld.
PlatformClient.RevealConfigSecret(ctx, section, property, clientID) calls
GET /api/config/{application}/{section}/{property}/secret and returns a RevealedSecret whose Value
is a config.Secret. Failures are a *PlatformError of kind not-found, rejected or forbidden.
CanonicalClient(client) returns the stored client id the platform answered for an identifier earlier.
There are no Go wrappers for list, set or delete; use the SDK client
(module page).
The admin section (Java)
Section titled “The admin section (Java)”// as in PlatformConfigAdminTestb.module(AdminModule.of(APP)).module(PlatformConfigAdminModule.of(APP)).module(new FlowCatalystModule());List it after AdminModule and FlowCatalystModule; flowcatalyst.application must equal the code you
pass. The section id is platform-config, the path /admin/platform-config. For the admin area itself
see Admin.
| Operation id | Method and path | Permission |
|---|---|---|
listAdminPlatformConfig |
GET /api/admin/platform-config (section?, clientId?) |
{app}:admin:platform-config:view |
setAdminPlatformConfig |
PUT /api/admin/platform-config/{section}/{property} (clientId?) |
{app}:admin:platform-config:manage |
deleteAdminPlatformConfig |
DELETE /api/admin/platform-config/{section}/{property} (clientId?) |
manage |
revealAdminPlatformConfig |
POST /api/admin/platform-config/{section}/{property}/reveal (clientId?) |
{app}:admin:platform-config:reveal |
- A section name matches
[a-z][a-z0-9-]{0,63}. A property name is exactly a secret name ([a-z0-9]+(-[a-z0-9]+)*, at most 100 characters), so what the driver can read is what the page can manage. Anything else is400 INVALID_NAMEand no platform call. A value is required, not blank, at most 65 536 characters. - A secret’s
valueis***in every answer except the reveal, whatever the platform sent. The reveal answer carriesCache-Control: no-store; it is aPOSTso it is never prefetched or cached. - Deleting a property that is not there is
204. Revealing one that is not there is404 CONFIG_NOT_FOUND; revealing a plain one is400 NOT_A_SECRET. - The framework writes an INFO log line for every write, delete and reveal naming the signed-in principal, section, property and client, never a value.
- Set, delete and reveal send the signed-in principal’s id as
X-On-Behalf-Of, so the platform’s audit row names the person. A set or delete also drops the cached secret of that client and name from the application’s secret resolver, when there is one. - Platform failures are reported as the other platform-backed admin sections report them:
502 PLATFORM_ERROR, and503 PLATFORM_NOT_CONFIGUREDwhen the platform is disabled.
Which clients a user may name
Section titled “Which clients a user may name”clientId must be a client the signed-in user may act for, else 403 CLIENT_FORBIDDEN and no platform
call. A request context holds one client (the user’s own), so the rule is: a user holding
{app}:admin:platform-config:all-clients may name any client, anyone else only their own (by identifier,
or by stored id). The list shows global rows and, without all-clients, only the user’s own client’s
rows. The platform checks again and its reason reaches the person.
Permissions and roles
Section titled “Permissions and roles”| Permission | Grants |
|---|---|
{app}:admin:platform-config:view |
the section and its list |
{app}:admin:platform-config:manage |
add, change, delete |
{app}:admin:platform-config:reveal |
read a secret’s plaintext |
{app}:admin:platform-config:all-clients |
name any client; without it a user acts for the global values and their own client only |
reveal is separate from manage on purpose: writing a secret does not let the caller read it back. The
suggested {app}:admin role ({app}:admin:*:*) holds all four. To keep plaintext away from
administrators in general, grant view and manage explicitly in that role instead of the wildcard and
give reveal to a narrower role. A role for a client’s own administrators should list view and manage
(and reveal if wanted) without all-clients, so they manage their client’s values and the global ones
only. The platform records each reveal against the service account, so the application’s own log line is
the record of who asked.
Per-client secrets appear in this section under the secrets driver’s section (secrets unless you chose
another), scoped to a client: that is where they are managed.
The page
Section titled “The page”standardAdminPages(application) in @flowcatalyst/ui mounts the section’s page at
/admin/platform-config (the seventh standard page; pass the four *AdminPlatformConfig operations in
admin.api). It reads the session (GET /auth/session: its permissions and its client) to decide what
to show; the server checks every call again.
- Controls follow the permissions. Add, edit and delete appear only with
manage. Reveal appears only withreveal, on a secret, after a confirmation that says the reveal is recorded. The revealed value is dropped when its dialog closes. - Clients follow
all-clients. With it, the add form has a free client field (an idclt_...or an identifier such asacme, empty for the global value). Without it, the page says so in a note naming the permission and the form offers only Global or Your client. A session for no particular client (_platform) gets global values only. - Secrets are write-only. The value of a secret is a password field that is never pre-filled; changing
a secret needs a new value, and
***(the platform’s mask) is refused as one in the form. The platform’s own refusals,400 SECRET_VALUE_MASKEDand400 SECRET_VALUE_REQUIRED, are shown on the value field. - Names are checked as the module checks them.
Status
Section titled “Status”The Java side is built and tested against the framework’s platform stand-in. A run against a real platform (set a per-client secret in the page, resolve it, rotate it, evict, resolve again) has not been recorded in the contract. The Go driver is built; the Go admin section and page are not.