Skip to content

Publish credentials to AWS Parameter Store

A service account’s secrets are shown once, when they are created or regenerated, and someone has to copy them to wherever the application reads them. Credential publishing removes that step: the platform also writes each credential to AWS Parameter Store, one parameter per credential, so the receiving application, or a function or ingestion through an aws-ps:// reference, reads it from there.

Publishing is additional. Every credential stays where it is today (the webhook token and signing secret encrypted on the service account, the OAuth client secret as a hash), and delivery, signing and token checks work as before. Publishing is opt in per service account or OAuth client, because a credential handed to someone else is not the platform’s to store elsewhere without being asked. It exists since fcdev 0.30.0, and only Parameter Store is supported: Secrets Manager and Vault are not built.

Publishing is a deployment setting, not a console setting, because the platform’s AWS role has to match it. Until FC_CREDENTIAL_PUBLISH is set, no publishing control appears anywhere in the console, and asking for it through the API is refused with CREDENTIAL_PUBLISHING_UNAVAILABLE.

Variable Meaning Default
FC_CREDENTIAL_PUBLISH The store: aws-ps. Empty or unset: publishing is not offered. unset
FC_CREDENTIAL_PUBLISH_PREFIX Every published parameter must lie under it, for example /flowcatalyst/np/. Required when publishing is on; it must start and end with /. A path outside it is refused, whatever a template or custom path says. none
FC_CREDENTIAL_PUBLISH_SERVICE_ACCOUNT_PATH Template of a service account’s parameter names {prefix}service-accounts/{account}/{credential}
FC_CREDENTIAL_PUBLISH_OAUTH_CLIENT_PATH Template of a stand-alone OAuth client’s parameter names {prefix}oauth-clients/{oauthClient}/{credential}
FC_CREDENTIAL_PUBLISH_DEFAULT Whether the option starts ticked on the create forms: off or on off
FC_CREDENTIAL_PUBLISH_KMS_KEY KMS key id or alias for the parameters empty (the account’s aws/ssm key)

A template may use {prefix}, {account} (the service account’s code; an application account’s app:<code> is written app.<code>, because Parameter Store names allow no :), {app} (the service account’s application code), {oauthClient} (the OAuth client_id) and {credential}. Each placeholder is a whole path segment, and a template must end in {credential}. An invalid setting is a start-up error, not a silent fallback. The region is the AWS default chain’s.

The platform’s AWS role needs this on the prefix (<env> is yours to choose):

{
"Effect": "Allow",
"Action": ["ssm:PutParameter", "ssm:DeleteParameter", "ssm:AddTagsToResource", "ssm:ListTagsForResource"],
"Resource": "arn:aws:ssm:<region>:<account>:parameter/flowcatalyst/<env>/*"
}

With a customer-managed key in FC_CREDENTIAL_PUBLISH_KMS_KEY it also needs kms:Encrypt on that key. The receiving application’s own role needs ssm:GetParameter on its path only.

Reading it back through the platform. For a function or ingestion to use a published credential through the console’s Stored as selector, the operator must also admit the path in FC_SECRET_REFERENCE_ALLOW, for example aws-ps:///flowcatalyst/np/service-accounts/. The two lists are separate on purpose: publishing a credential does not, by itself, let anyone point a function at it.

When you create. The create dialogs for a service account, an application’s Provision Service Account, and a confidential OAuth client show Publish credentials to Parameter Store. It starts as FC_CREDENTIAL_PUBLISH_DEFAULT says (unticked by default). The path the parameters will get is shown beneath it. Custom path replaces the part before {credential}; it must start and end with / and lie under the prefix, and it is fixed once publishing is on.

Later. Open the service account (or the stand-alone OAuth client) and use the Parameter Store section: Publish credentials, with the same path choice. Public OAuth clients have nothing secret and are not offered it. An OAuth client that belongs to a service account (the one made with the account or by an application’s provisioning) is published with that service account, under the account’s path and setting; its own page says so.

Through the API. PUT /api/service-accounts/{id}/credential-publication and PUT /api/oauth-clients/{id}/credential-publication switch it on (an optional body {"basePath": "/flowcatalyst/np/custom/"}); GET reads the state; DELETE switches it off; POST .../credential-publication/retry retries now. The create requests take publishCredentials. Switching it on needs permission to update service accounts (or OAuth clients), and enabling and disabling are audited.

Every parameter is a SecureString, and its last path segment names the credential:

Owner Credential Parameter
Service account OAuth client id client-id
Service account OAuth client secret client-secret
Service account Webhook bearer token auth-token
Service account Signing secret signing-secret
Stand-alone confidential OAuth client Client id, client secret client-id, client-secret

With the default templates a service account orders gets /flowcatalyst/np/service-accounts/orders/signing-secret and the others beside it. The panel lists each parameter’s name with its aws-ps:// reference, for pasting into a Stored as selector. Basic-auth user names and passwords are not published, because the platform does not store them. Portal-app OAuth clients and application login clients are not published.

Each parameter is tagged flowcatalyst:managed=<owner>, and the platform never overwrites a parameter it did not create: if a parameter of that name exists without the tag, that credential’s publish fails with a message saying so, and you choose another path or remove the parameter.

The client secret needs a rotation. The platform keeps an OAuth client secret only as a hash, so it can publish it only at the moment it is minted: on create or on rotate. Switch publishing on for an existing client and everything else is published at once, but the client secret shows Not published: rotate the client secret to publish it, with Rotate and publish. That is the normal rotation, with its 24-hour overlap, so nothing using the old secret breaks. The service account’s token and signing secret change at once when you regenerate them, as before, and the new value is published.

Each change to a published credential (create, regenerate, rotate, a webhook credential update) queues its publish in the same transaction as the change, so a credential is never changed without its publish being queued, and a rolled-back change queues nothing. A background worker, running on one platform instance, then writes the parameter. A credential that stops existing has its parameter deleted; so does deleting the service account or OAuth client, and so does switching publishing off. A parameter that is not tagged as the platform’s own is left in place. Deactivating the owner changes nothing: the copy stays, as the credential does.

A failed write never blocks or undoes the create or rotate that queued it, so AWS being down does not stop a rotation. The worker retries with a delay that starts at 30 seconds, doubles and is capped at one hour, and keeps retrying while the item is pending. The panel shows each credential as Published, Publishing, or Failing with the AWS error and the next attempt, and Retry now tries again at once. The error text never contains the value. Stop publishing deletes the parameters after a confirmation that names them; the credentials in FlowCatalyst are not changed.