Secrets and credential rotation
FastHook uses several unrelated secret classes. Rotate the exposed class only, update every consumer, and verify one controlled event before revoking the previous provider credential. Never reuse a project API key as a webhook secret or a provider token as a FastHook signing secret.
Secret inventory
| Secret class | Purpose | Where it is used | Rotation effect |
| --- | --- | --- | --- |
| Scoped project API key | Authenticate Control API, CLI, and compatible machine clients for one team | Authorization: Bearer ... or x-api-key | Each key has its own scopes, execution grants, rate limit, lifecycle, and audit trail. |
| Project signing secret | Sign outbound FastHook deliveries using FASTHOOK_SIGNATURE | Receiver-side signature verification | Receivers using the previous secret reject new signatures after rotation. |
| Connected provider credential | Authorize Triggers, subscriptions, resource lookups, and Actions | OAuth, app installation, API-key, or service-specific account connection | Reconnect or credential replacement can affect every Source and Action using that account. |
| Source authentication secret | Verify inbound webhook senders | Source auth configuration and provider signature headers | The provider and Source must agree during cutover. |
| Destination or Action credential | Authenticate an outbound call | Destination configuration or provider account | Delivery can fail immediately if the receiver has not accepted the new value. |
| Sanitized share token | Read one expiring request snapshot | Public share URL | It expires according to its TTL; treat the URL itself as a bearer credential. |
Keep a private inventory with the team, environment, resource ID, owner, last rotation time, and all known consumers. Do not put secret values in the inventory.
Connected provider credentials
Provider accounts store usable credential material in authenticated encrypted envelopes. The current backend uses AES-GCM with a random 12-byte IV and supports key identifiers so operators can rewrap stored credentials during encryption-key rotation. Ordinary connected-account responses expose lifecycle and metadata, not the credential value.
This protection does not make broad account access safe. A connected account can be reused by multiple Triggers and Actions in the same team, so one reconnection, revocation, scope change, or provider-side role change can affect several Workflows.
For OAuth and app installations:
- identify every Source and Action using the account;
- pause Workflows where failed or repeated side effects would be unsafe;
- reconnect from the affected Trigger or Action so current scope requirements are included;
- confirm the account lifecycle returns to
active; - reload remote resource selectors; and
- execute one controlled event and inspect Audit and the provider result.
For API credentials, create the replacement at the provider, save it in the correct FastHook connected account, test it, and only then revoke the previous provider credential.
Project API key and signing secret
New automation should use independently revocable keys from /v1/project-api-keys. A project owner can create multiple named keys, assign control:read, control:edit, and control:execute scopes, restrict execute access with resource grants, and set a per-minute rate limit. The raw credential is returned exactly once by POST /v1/project-api-keys; list and detail responses return masked metadata only. Use DELETE /v1/project-api-keys/{keyId} or its /revoke alias for permanent revocation, and inspect /audit for recent authorization decisions.
GET /v1/project-secrets remains the compatibility surface for the legacy team API credential and the project signing secret. It returns masked values, has_secret, and last-rotation timestamps, never reusable values. A project owner can rotate either legacy value; the replacement is returned only in that successful rotation response, so copy it directly into an approved secret store.
The two values are independent:
- the API key authenticates a caller to FastHook; and
- the signing secret lets a receiver verify outbound FastHook delivery signatures.
POST /v1/project-secrets/rotate rotates both values when rotate is omitted. Pass {"rotate":["api_key"]} or {"rotate":["signing_secret"]} to rotate only one class. PUT /v1/project-secrets accepts a caller-supplied api_key, signing_secret, or both; each supplied value must be at least 12 characters. Both mutation endpoints require an owner dashboard session (site administrators are also permitted); project API keys and non-owner sessions cannot mutate this trust root.
Create or revoke a scoped project API key
- Choose the minimum scopes and execution grants required by the caller.
- Create a named key with an owner dashboard session and capture the one-time
data.api_keyvalue directly into an approved secret store. - Verify one harmless operation, then inspect the key's audit endpoint for the decision.
- Revoke the individual key when the caller is retired or the credential may have leaked.
Rotate the legacy project API key
- Inventory every API, CLI, MCP, tunnel, script, and secret-manager entry that uses the current key.
- Pause automated configuration changes when partial cutover would be unsafe.
- Authenticate one rotation request with an owner dashboard session and capture the returned new value directly into an approved secret store.
- Update all callers immediately. Keep
x-team-idaligned with the key’s team. - Verify
/v1/auth/meor one harmless list operation from every caller. - Remove the previous value from local files, CI variables, shell history, and temporary incident notes.
Legacy rotation replaces the compatibility credential for the whole team. It does not rotate, revoke, or otherwise change scoped keys created through /v1/project-api-keys.
Rotate the project signing secret
- Inventory every receiver that verifies
FASTHOOK_SIGNATURE. - If receivers support dual-secret verification, deploy the new secret as an additional accepted value first.
- Rotate only
signing_secretin FastHook. - Send one controlled delivery and verify the signature with the new secret.
- Remove the old receiver secret after the cutover window.
If a receiver accepts only one secret, plan a short coordinated change window. Do not rotate the API key merely because the signing secret changed.
Rotate inbound Source secrets
Inbound signature or API-key validation is configured per Source. The provider and FastHook must use matching material, and some providers control whether two secrets can overlap.
- Confirm the Source type,
auth_type, expected signature header, and provider account. - Pause downstream side effects when failed verification could lose important events.
- Add or generate the new provider-side secret according to the provider’s overlap rules.
- Update the FastHook Source configuration.
- Send a signed test event and confirm it is verified and routed once.
- retire the previous provider secret; and
- inspect rejected requests for
source_auth_failedafter cutover.
Use the relevant Source type reference for exact headers and validation input.
Exposure response
If a secret may have leaked:
- identify its class before rotating anything;
- remove the value from public pages, screenshots, fixtures, mappings, logs, and tickets;
- rotate or revoke it at the authoritative system;
- update consumers and run a controlled verification;
- inspect FastHook Audit, request history, and provider logs for use during the exposure window; and
- record the affected resources and response timeline without copying the secret into the incident report.
Audit and sanitized sharing redact many sensitive key names, but redaction is a safety layer, not permission to place credentials in payloads. Continue with Data handling and retention and Security and governance.