Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
add secret rotation docs for salesforce
adilsone097a840c528
diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/create.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/create.mdxnew file mode 100644index 0000000000..5d34fc4db7--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/create.mdx@@ -0,0 +1,82 @@+---+title: "Create"+openapi: "POST /api/v2/secret-rotations/salesforce-oauth-credentials"+---++<Note>+ Check out the configuration docs for [Salesforce OAuth Credentials Rotations](/documentation/platform/secret-rotation/salesforce-oauth-credentials) to learn how to obtain the required parameters.+</Note>++Creates a Salesforce OAuth Credentials secret rotation. Infisical will rotate the consumer secret of the specified External Client App via your [Salesforce connection](/integrations/app-connections/salesforce) and write the rotated consumer key/secret pair to the specified secret path.++## Request body++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| `name` | string | Yes | A unique, slug-friendly name for the rotation (max 100 characters). |+| `projectId` | string (UUID) | Yes | The project ID. |+| `connectionId` | string (UUID) | Yes | ID of the Salesforce app connection. |+| `environment` | string | Yes | Environment slug (e.g. `dev`, `prod`). |+| `secretPath` | string | Yes | Path where the generated secrets will be stored. |+| `isAutoRotationEnabled` | boolean | No | Whether to rotate automatically on the schedule. Defaults to `true`. |+| `rotationInterval` | number | Yes | Days between rotations (minimum `1`). |+| `rotateAtUtc` | object | No | Time of day (UTC) to run rotation: `{ "hours", "minutes" }`. Defaults to `{ "hours": 0, "minutes": 0 }`. |+| `parameters.appId` | string | Yes | The identifier of the Salesforce External Client App to rotate the consumer secret for. |+| `parameters.appName` | string | Yes | The developer name of the Salesforce External Client App to rotate the consumer secret for. |+| `secretsMapping.consumerKey` | string | Yes | Secret key name to store the rotated consumer key (e.g. `SALESFORCE_CONSUMER_KEY`). |+| `secretsMapping.consumerSecret` | string | Yes | Secret key name to store the rotated consumer secret (e.g. `SALESFORCE_CONSUMER_SECRET`). |+| `description` | string | No | Optional description. |++## Sample request++```bash+curl --request POST \+ --url https://us.infisical.com/api/v2/secret-rotations/salesforce-oauth-credentials \+ --header 'Content-Type: application/json' \+ --header 'Authorization: Bearer <ACCESS_TOKEN>' \+ --data '{+ "name": "my-salesforce-rotation",+ "projectId": "<project-id>",+ "description": "Salesforce ECA consumer secret rotation",+ "connectionId": "<salesforce-connection-id>",+ "environment": "dev",+ "secretPath": "/",+ "isAutoRotationEnabled": true,+ "rotationInterval": 30,+ "rotateAtUtc": { "hours": 0, "minutes": 0 },+ "parameters": {+ "appId": "<external-client-app-id>",+ "appName": "<external-client-app-developer-name>"+ },+ "secretsMapping": {+ "consumerKey": "SALESFORCE_CONSUMER_KEY",+ "consumerSecret": "SALESFORCE_CONSUMER_SECRET"+ }+ }'+```++## Sample response++```json+{+ "secretRotation": {+ "id": "<rotation-id>",+ "name": "my-salesforce-rotation",+ "description": "Salesforce ECA consumer secret rotation",+ "secretsMapping": {+ "consumerKey": "SALESFORCE_CONSUMER_KEY",+ "consumerSecret": "SALESFORCE_CONSUMER_SECRET"+ },+ "isAutoRotationEnabled": true,+ "activeIndex": 0,+ "connectionId": "<salesforce-connection-id>",+ "rotationInterval": 30,+ "rotateAtUtc": { "hours": 0, "minutes": 0 },+ "type": "salesforce-oauth-credentials",+ "parameters": {+ "appId": "<external-client-app-id>",+ "appName": "<external-client-app-developer-name>"+ }+ }+}+```diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/delete.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/delete.mdxnew file mode 100644index 0000000000..ff3e675c20--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v2/secret-rotations/salesforce-oauth-credentials/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-id.mdxnew file mode 100644index 0000000000..4e6135d664--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v2/secret-rotations/salesforce-oauth-credentials/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-name.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-name.mdxnew file mode 100644index 0000000000..ffb868cea8--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v2/secret-rotations/salesforce-oauth-credentials/rotation-name/{rotationName}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-generated-credentials-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-generated-credentials-by-id.mdxnew file mode 100644index 0000000000..c4e03ed187--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-generated-credentials-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get Credentials by ID"+openapi: "GET /api/v2/secret-rotations/salesforce-oauth-credentials/{rotationId}/generated-credentials"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/list.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/list.mdxnew file mode 100644index 0000000000..809ec5616a--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v2/secret-rotations/salesforce-oauth-credentials"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/rotate-secrets.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/rotate-secrets.mdxnew file mode 100644index 0000000000..4755b45f06--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/rotate-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Rotate Secrets"+openapi: "POST /api/v2/secret-rotations/salesforce-oauth-credentials/{rotationId}/rotate-secrets"+---diff --git a/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/update.mdx b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/update.mdxnew file mode 100644index 0000000000..f5f4ad8c6b--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/update.mdx@@ -0,0 +1,8 @@+---+title: "Update"+openapi: "PATCH /api/v2/secret-rotations/salesforce-oauth-credentials/{rotationId}"+---++<Note>+ Check out the configuration docs for [Salesforce OAuth Credentials Rotations](/documentation/platform/secret-rotation/salesforce-oauth-credentials) to learn how to obtain the required parameters.+</Note>diff --git a/docs/docs.json b/docs/docs.jsonindex c4d83ff667..7a16102eb2 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -487,6 +487,7 @@"documentation/platform/secret-rotation/oracledb-credentials","documentation/platform/secret-rotation/postgres-credentials","documentation/platform/secret-rotation/redis-credentials",+ "documentation/platform/secret-rotation/salesforce-oauth-credentials","documentation/platform/secret-rotation/supabase-api-key","documentation/platform/secret-rotation/unix-linux-local-account","documentation/platform/secret-rotation/windows-local-account"@@ -2394,6 +2395,19 @@"api-reference/endpoints/secret-rotations/redis-credentials/update"]},+ {+ "group": "Salesforce OAuth Credentials",+ "pages": [+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/create",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/delete",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-id",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-by-name",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/get-generated-credentials-by-id",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/list",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/rotate-secrets",+ "api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/update"+ ]+ },{"group": "Supabase API Key","pages": [diff --git a/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx b/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdxnew file mode 100644index 0000000000..fb0429a447--- /dev/null+++ b/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx@@ -0,0 +1,165 @@+---+title: "Salesforce OAuth Credentials Rotation"+description: "Learn how to automatically rotate Salesforce External Client App consumer secrets."+---++<Note>+ **Rotation Type: Dual-Phase**++ This rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles.+</Note>++## Prerequisites++- Create a [Salesforce Connection](/integrations/app-connections/salesforce). That connection authenticates Infisical against your Salesforce org and is used to issue and revoke staged consumer credentials during rotation.+- The target **External Client App (ECA)** must have the OAuth Client Credentials flow enabled and a configured **Run-As user**, the same as the connection's own ECA.+- The Run-As user backing the Salesforce Connection must be permitted to read and modify the target ECA's OAuth credentials (the rotation calls `/services/data/v65.0/apps/oauth/credentials/{appId}` and the staged-credentials URL returned by Salesforce).++<Warning>+ **Use a different External Client App than the one your Salesforce Connection authenticates with.**++ Rotating the consumer secret of the same ECA that the connection itself uses would immediately invalidate the connection's credentials, breaking this rotation and any subsequent ones. Infisical refuses this configuration at runtime — choose a separate ECA, or create a dedicated Salesforce Connection for management operations.+</Warning>++<Note>+ If the target ECA has more than one consumer, only the **first** consumer is rotated and a warning is logged. Assign each consumer to its own External Client App if all of them need rotation.+</Note>++## Create a Salesforce OAuth Credentials Rotation in Infisical++<Tabs>+ <Tab title="Infisical UI">+ 1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.++ ++ 2. Select the **Salesforce OAuth Credentials** option.++ ++ 3. Configure the rotation behavior, then click **Next**.++ ++ - **Salesforce Connection** – The connection that will perform the rotation of the target External Client App's consumer secret.+ - **Rotation Interval** – The interval, in days, after which a rotation is triggered.+ - **Rotate At** – The local time of day when rotation runs once the interval has elapsed.+ - **Auto-Rotation Enabled** – Whether to rotate automatically on the schedule. Turn off to rotate only manually or pause rotation.++ 4. Select the External Client App whose consumer secret you want to rotate, then click **Next**.++ ++ - **External Client App** – The Salesforce ECA whose consumer secret will be rotated. The dropdown is populated from the connected org via the connection — only ECAs with OAuth client credentials enabled and reachable by the connection appear.++ 5. Specify the secret names that the rotated consumer credentials should be mapped to, then click **Next**.++ ++ - **Consumer Key** – The name of the secret in Infisical that the rotated consumer key will be mapped to (default: `SALESFORCE_CONSUMER_KEY`).+ - **Consumer Secret** – The name of the secret in Infisical that the rotated consumer secret will be mapped to (default: `SALESFORCE_CONSUMER_SECRET`).++ 6. Give your rotation a name and description (optional), then click **Next**.++ ++ - **Name** – A slug-friendly name for this rotation configuration.+ - **Description** (optional) – Notes about this rotation.++ 7. Review your configuration, then click **Create Secret Rotation**.++ ++ 8. Your **Salesforce OAuth Credentials** rotation is created. The current consumer key and consumer secret are available as secrets at the mapped paths. Subsequent rotations issue a new staged credential, switch the active secrets to it, then revoke the previous credential for zero-downtime rotation.++ + </Tab>+ <Tab title="API">+ To create a Salesforce OAuth Credentials rotation, call the [Create Salesforce OAuth Credentials Rotation](/api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/create) API endpoint.++ You will need both the **identifier** and the **developer name** of the target External Client App. These are returned together by the connection's `GET /api/v1/app-connections/salesforce/{connectionId}/oauth-apps` endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://us.infisical.com/api/v2/secret-rotations/salesforce-oauth-credentials \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-salesforce-rotation",+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "description": "Salesforce ECA consumer secret rotation",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "environment": "dev",+ "secretPath": "/",+ "isAutoRotationEnabled": true,+ "rotationInterval": 30,+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "parameters": {+ "appId": "0CiSb000000XXXXXXX",+ "appName": "My_External_Client_App"+ },+ "secretsMapping": {+ "consumerKey": "SALESFORCE_CONSUMER_KEY",+ "consumerSecret": "SALESFORCE_CONSUMER_SECRET"+ }+ }'+ ```++ ### Sample response++ ```bash Response+ {+ "secretRotation": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "name": "my-salesforce-rotation",+ "description": "Salesforce ECA consumer secret rotation",+ "secretsMapping": {+ "consumerKey": "SALESFORCE_CONSUMER_KEY",+ "consumerSecret": "SALESFORCE_CONSUMER_SECRET"+ },+ "isAutoRotationEnabled": true,+ "activeIndex": 0,+ "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "createdAt": "2026-05-04T05:31:56Z",+ "updatedAt": "2026-05-04T05:31:56Z",+ "rotationInterval": 30,+ "rotationStatus": "success",+ "lastRotationAttemptedAt": "2026-05-04T05:31:56Z",+ "lastRotatedAt": "2026-05-04T05:31:56Z",+ "lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "nextRotationAt": "2026-06-03T05:31:56Z",+ "connection": {+ "app": "salesforce",+ "name": "my-salesforce-connection",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "environment": {+ "slug": "dev",+ "name": "Development",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "folder": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "path": "/"+ },+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "lastRotationMessage": null,+ "type": "salesforce-oauth-credentials",+ "parameters": {+ "appId": "0CiSb000000XXXXXXX",+ "appName": "My_External_Client_App"+ }+ }+ }+ ```+ </Tab>+</Tabs>