Rotate credentials safely: Map all consumers using a secret manager with next run times and owners; Use dual credentials during cutover; update one dependency at a time; Revoke old credentials only after all workflows confirm normal operation
Image: Workflow Automation Guide

Error Handling

Part of Workflow authentication and secrets

Rotating credentials without breaking scheduled workflows

Credential rotation succeeds when the old secret is revoked and every dependent workflow still runs as intended.

Treat rotation as a coordinated cutover: map every consumer, make the replacement available while the old credential still works, verify each dependent workflow, then revoke the old value. A replacement saved in a secret manager is not enough if a scheduled job continues resolving the old one.

Map dependencies first

List every connection, service, script, scheduled job, environment and fallback job that uses the credential—not just the obvious consumers. Record the next run time and a safe test action for each one.

Use an owner register with one entry per consumer. Record the credential, consumer, responsible owner, secret location, next run time, cutover status and evidence that normal work resumed.

Store the replacement where each consumer resolves its secret; AWS Secrets Manager and HashiCorp Vault are examples of external secret managers used in rotation integrations. Standardise how consumers access secrets where possible, and include rotation in the secrets lifecycle process.

If the provider supports two active credentials, keep both valid during the cutover and update one dependency at a time. For example, Hodoflow stages a new client pair that can authenticate alongside the current pair; capture the new client ID and secret in the integration’s secret manager, and leave the active pair in place.

Account for work already in progress: let active runs finish while both credentials remain valid, and do not end the overlap while consumers still use the old pair. If executions need more time, hold new launches and let the current work drain before promotion.

For the Hodoflow canary, exchange the new pair at /api/v1/oauth/token and make a bounded api_read request. Then roll the pair to every client and verify that old-client traffic has stopped; promotion ends the overlap and prevents future exchanges with the old pair.

Test a permitted call and confirm the failure alert works. Watch the first scheduled run after the change as well as the manual test, since a cached token or overlooked secondary workflow can hide a problem.

Set a rollback trigger before rollout: a failed canary exchange, failed bounded request or unsuccessful consumer check. During the overlap, stop the rollout, keep the current pair active and restore affected consumers to it; correct the new configuration and repeat the canary before resuming.

Close the change

Promote the staged credentials only after every consumer has moved and old-client traffic has stopped. Remove the old pair from secret stores and deployment manifests, then confirm the superseded credential is revoked, not merely unused.

Record the change date, affected services, responsible owner and evidence that normal work resumed. Keep logs free of either credential value.

If exposure is suspected, follow the incident process as well as the routine change process. Hodoflow’s emergency guidance is to deactivate or revoke immediately, remove the credential from the external system and secret manager, and retain non-secret request IDs and audit timestamps; changing one visible copy may not remove every leaked copy.

More from Error Handling

Authentication

Comparing API keys with delegated and application access

Choose a workflow credential by asking whose authority the action should use and what it must be able to do.