Loading
Ongoing maintenance for Salesforce HelpRead More

Rotating a client secret under the Client ID Enforcement policy

Publish Date: Sep 18, 2026
Description

This article applies to APIs protected by the Client ID Enforcement policy. Customers who have seen that OIDC secret rotation is zero-downtime often assume the same applies here — it does not, and this explains why.

Unlike the OpenID Connect Access Token Enforcement policy, with Client ID Enforcement the consumer sends its client_id and client_secret directly to the Mule API on every request (in the client_id / client_secret headers by default, or a configured credential origin). The policy validates those credentials against the configured client provider on every call.

Because an Anypoint client application has a single client secret, resetting/regenerating it invalidates the previous secret immediately. There is no old-and-new co-existence window. Any consumer still sending the old secret will not work.

For this reason, simply resetting the secret is disruptive to active consumers and should not be treated as a zero-downtime operation.

 

 

Resolution

Choose one of the following depending on whether downtime is acceptable and how much change you can make.

Option A — Coordinated cutover (brief downtime / maintenance window)
1. Reset the secret in the Anypoint client application.
2. Immediately update every consumer with the new secret.
3. Accept that calls with the old secret fail (401) between the reset and the consumer update.

Use only when consumers can be updated quickly and a short failure window is acceptable.

Option B — Dual client application (zero-downtime)
1. Register a second client application with its own client_id/secret and grant it access to the same API (approve its contract).
2. Migrate consumers onto the second application's credentials.
3. Once all consumers are migrated, delete or revoke the original application.

This achieves zero-downtime by having two valid credential sets active in parallel — the equivalent effect to OIDC's dual-secret window, but accomplished at the application level rather than the secret level.

Option C — Use the OpenID Connect Access Token Enforcement policy instead

If seamless, zero-downtime secret rotation is a firm requirement, consider protecting the API with the OpenID Connect Access Token Enforcement policy (backed by an external OIDC provider such as Azure / Entra ID) rather than Client ID Enforcement. With that policy the secret is used only to obtain a token from the IdP — not sent to the Mule API on every call — so old and new secrets can co-exist during rotation with no downtime. See the companion KB.

This is an architectural change (different policy, IdP-issued bearer tokens, consumers updated to the token-based flow), so it's a longer-term option rather than a quick rotation fix.

Related

- Companion KB: OIDC secret rotation is zero-downtime — old and new client secrets can co-exist (Azure / Entra ID)

Knowledge Article Number

005460262

 
Loading
Salesforce Help | Article