Loading

Migration Guide for Zero-Downtime API Client Secret Rotation in Account Manager for B2C Commerce

Дата публикации: Nov 11, 2026
Описание

Overview

Account Manager for B2C Commerce now supports two concurrently valid secrets for each API client. This article explains the timeline, the behavior changes, and the actions that administrators and developers need to take.

 

Release Timeline

DateWhat happens
October 2026Salesforce publishes the advance customer notice and updates the API documentation.
March 10, 2027The new client-secret endpoints and the three-tab user interface become available in B2C Commerce Account Manager.
March 10 to April 7, 2027Legacy password API calls complete without an error and do not change the secret.
April 8, 2027Legacy password modification endpoints return HTTP errors.

 

Changes in Account Manager

Account Manager moves from one user-defined password per API client to two concurrently valid, system-generated secrets. The table below compares the current and new behavior.

Feature AreaCurrent StateNew State (Effective March 10, 2027)
Secret modelOne user-defined password per API clientTwo system-generated secrets: a Primary secret and a Rotated secret
Secret formatPlain text entered by the userHigh-entropy string with an embedded pattern and checksum for leak detection
Password change APIThe PUT /apiclients/{id}/password endpoint changes the password immediatelyThe PUT /apiclients/{id}/password endpoint is deprecated. Use the new client-secret endpoint to rotate instead
User interfaceOne page for each API clientThree tabs: General Settings, Credentials and Audit History
Existing passwordsOne active passwordExisting passwords remain valid until you explicitly rotate them

 

Dual-Secret Architecture

Account Manager accepts two secrets at the same time during a rotation. This lets you update client applications gradually without downtime.

  • Primary secret: the active secret that applications use to authenticate.
  • Rotated secret: the previous Primary secret. It stays valid until you revoke it, so applications that have not yet reloaded their configuration keep working.

The authorization server accepts both secrets during the transition, which keeps API integrations running.

 

Deprecation of the Legacy Password Endpoint

The PUT /dw/rest/v1/apiclients/{id}/password endpoint and the optional password field in POST /dw/rest/v1/apiclients are deprecated because Account Manager no longer accepts user-defined secrets.

  • March 10 to April 7, 2027 (four weeks): legacy password change requests complete without an error but do not change the secret.
  • From April 8, 2027: legacy password endpoints return explicit HTTP errors.

 

Example Scenario

A B2C Commerce merchant runs a storefront, an order-export job and a third-party inventory integration. All three use one API client. An administrator opens the Credentials tab in Account Manager and rotates the client secret. The storefront and order-export job pick up Secret B at their next deployment. The inventory integration keeps using Secret A for two days and continues to work. After Audit History shows that every system uses Secret B, the administrator revokes Secret A. No system has downtime.

Решение

Creating an API Client Is Now a Two-Step Process

Creating an API client now separates the client record from its credentials. This keeps secret generation on a single code path.

  1. Send POST /dw/rest/v1/apiclients to create the client record. This call no longer returns a working secret.
  2. Call the client-secret endpoint to generate the Primary secret.

Reading a client (GET) and deleting a client (DELETE) are unchanged.

 

Client Secret API Endpoints

Client secrets are sub-resources of the API client resource. The same operations are available in two APIs:

  • Legacy REST API (the API behind the Account Manager user interface): /dw/rest/v1/apiclients/{api-client-id}
  • Salesforce Commerce API (SCAPI), the newer Account Manager REST API: /merchant/am-admin/v1/organizations/{organization-id}/api-clients/{api-client-id}. This endpoint is not available at the time of writing. Check the release notes for availability.
OperationWhat it does
POST .../client-secretGenerates a new Primary secret. On a client that still has a legacy secret, this performs the first rotation.
GET .../client-secretReturns the current Primary secret. If it is still a legacy secret, the response contains no secret value because the original value cannot be restored.
GET .../client-secret/rotatedReturns the Rotated secret. If it is a legacy secret, no value is returned. Returns 404 if no Rotated secret exists.
DELETE .../client-secret/rotatedRevokes the Rotated secret.

 

Account Manager API Client Management Interface

The API client page in Account Manager has three tabs, which group tasks by purpose.

  • General Settings: client name, organization assignments and assigned roles.
  • Credentials: the authentication method toggle (private or public client), controls to reveal and copy the secret, and rotation actions.
  • Audit History: audit logs, actor details and last authentication timestamps.

 

How to Rotate an API Client Secret Without Downtime

Follow these steps in order. The order matters because applications keep working on Secret A until you revoke it.

  1. Start the rotation. In the Credentials tab, an administrator selects the rotate action. Account Manager generates a new Primary secret (Secret B) and moves the previous secret (Secret A) into the Rotated slot.
  2. Deploy the new credential. Copy Secret B and update environment variables, secret vaults or client application configuration. Do this before revoking anything so no application loses access.
  3. Shift traffic. As applications reload their configuration, they request tokens with Secret B. Requests that still use Secret A continue to succeed.
  4. Revoke the old secret. After you confirm all traffic uses Secret B, revoke Secret A in the user interface. Revoking removes the risk of a leaked old secret staying valid.

 

Required Actions

For Developers and Integrators

  • Audit integrations. Find deployment scripts, continuous integration and delivery (CI/CD) pipelines and utilities that call PUT /dw/rest/v1/apiclients/{id}/password or send a password when creating a client.
  • Update automation. Check CI jobs, cron-triggered scripts, sfcc-ci client:rotate steps and other tooling for calls to the old endpoint. Update them to the new client-secret endpoint before the next scheduled rotation. Add a check that raises an error if a rotation silently does nothing, because the response code alone does not show this.
  • Adopt the dual-secret workflow. Build the Rotate, Deploy, Revoke sequence into your secret-management automation.

 

For Account Administrators

  • Review API clients. Confirm each client is configured correctly and assigned to the right organization scope.
  • Prepare operations teams. Make sure administrators know the three-tab layout and the rotation controls.

 

Frequently Asked Questions

Do existing API client passwords stop working on March 10, 2027?

No. Existing passwords continue to authenticate until you explicitly rotate the secret.

 

Can I still supply a custom secret for an API client?

No. All new secrets are system-generated, with fixed prefix patterns and checksums, to support automated leak detection.

 

What happens if I try to regenerate a secret twice in a row?

The Regenerate button stays disabled while a secret occupies the Rotated slot. Revoke the Rotated secret before you generate a new Primary secret.

 

What happens if I keep calling the old change-password endpoint?

During the four weeks after March 10, 2027, the call completes without an error but does not change the secret. From April 8, 2027, it returns an HTTP error. Move to the client-secret endpoint now.

 

Will sfcc-ci client:rotate or a similar scheduled job show an error?

Not during the four-week no-op period. The underlying endpoint returns success but does not change the secret. Update the automation before the period ends. Do not wait for an error.

Номер статьи базы знаний

005461458

 
Загрузка
Salesforce Help | Article