Skip to content

Config

This page covers two kinds of configuration: how you configure the client, and how you use the platform’s configuration store (platformConfig()) for your application’s own settings and secrets.

FlowCatalystClient.builder() takes:

Method Default Meaning
baseUrl(String) none, required The platform’s base URL. A trailing slash is removed.
clientCredentials(id, secret) Service-account authentication. See Auth.
tokenUrl(String) {baseUrl}/oauth/token A custom token endpoint.
accessToken(String), accessToken(Supplier<String>) A token you supply.
routerBaseUrl(String) baseUrl Where router() calls go. The router runs on its own host in a deployed system.
subscriptionTargetBaseUrl(String) none The default base for path-style subscription targets at sync time. See Declarations.
timeout(Duration) 30 s The per-request timeout, also the connect timeout of the shared HTTP client.
retryAttempts(int) 3 The number of retries after the first request, for transient statuses, so up to four requests in all. (The SDK’s README calls this “3 attempts”; the code retries three times.)
retryDelay(Duration) 100 ms The base delay, doubled each attempt.

build() fails with NullPointerException (“baseUrl is required”) when there is no base URL, and with IllegalStateException when neither credentials nor an access token are set. There is no environment variable convention built into the client; read your own configuration and pass it in. (The one exception is DefinitionSet.defineFromEnv(), which reads FLOWCATALYST_APP_CODE.)

The client is blocking and thread-safe. Run it on virtual threads to scale concurrent calls.

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. The model is in configuration and secrets; the how-to is platform configuration.

A value is addressed by application, section and property, optionally for one client (an id or an identifier). A client value never falls back to the global one.

var config = client.platformConfig();
var all = config.list("orders");
var one = config.get("orders", "sftp", "host", null); // null: the global value
var forAcme = config.get("orders", "sftp", "host", "acme");
config.set("orders", "sftp", "host", new SetPropertyRequest()
.value("sftp.acme.test").valueType("PLAIN").description("Acme feed host").clientId("acme"));
config.delete("orders", "sftp", "host", "acme");

SetPropertyRequest has value, valueType (PLAIN or SECRET), description and clientId. List rows carry clientIdentifier (for example acme) beside the stored clientId, so you can match them by either.

A SECRET property’s value is always the literal "***" in list, get and the answer to set, for every caller. The only way to read the plaintext is revealSecret:

PlatformConfigResource.RevealedSecret secret =
client.platformConfig().revealSecret("orders", "sftp", "password", "acme");
String password = secret.value();
  • Reveal always needs a permission: platform:admin:config:reveal (a platform administrator) or platform:application-service:config:reveal (an application’s service account). The platform confines an application’s service account to its own applications and to the clients it is linked to (its explicit clients, else the clients its application is enabled for), plus the application-wide value.
  • Every reveal is audited.
  • The SDK never caches the value and never logs it; RevealedSecret.toString() prints value=***. If you cache it yourself, use a short TTL.
  • Writing "***" to a SECRET is refused (400 SECRET_VALUE_MASKED), as is an empty secret (400 SECRET_VALUE_REQUIRED). To leave a secret unchanged, do not set it.
  • Revealing a property that is not a secret answers 400 NOT_A_SECRET; read it with get. That arrives as SdkError.HttpStatus with status 400. A missing property is SdkError.NotFound and a missing permission is SdkError.Forbidden.

A service account acting for one of its signed-in users passes who as the last argument of set, delete or revealSecret. It is sent as X-On-Behalf-Of (PlatformConfigResource.ON_BEHALF_OF) and recorded in the audit row beside the service account:

client.platformConfig().revealSecret("orders", "sftp", "password", "acme", signedInUser.id());

The value is at most 256 printable characters, else 400 INVALID_ON_BEHALF_OF. The platform ignores it from a caller that is not a service account.