Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

remove unnecessary logs

adilsone6938eb844a2
diff --git a/backend/src/ee/services/secret-rotation-v2/salesforce-oauth-credentials/salesforce-oauth-credentials-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/salesforce-oauth-credentials/salesforce-oauth-credentials-rotation-fns.ts
index e7dc6024e3..12f2d80afc 100644
--- a/backend/src/ee/services/secret-rotation-v2/salesforce-oauth-credentials/salesforce-oauth-credentials-rotation-fns.ts
+++ b/backend/src/ee/services/secret-rotation-v2/salesforce-oauth-credentials/salesforce-oauth-credentials-rotation-fns.ts
@@ -82,11 +82,6 @@ export const salesforceOauthCredentialsRotationFactory: TRotationFactory<
"Cannot rotate the consumer secret of the External Client App that this Salesforce connection authenticates with. Choose a different app or use a separate Salesforce connection."
});
}
- if (consumersData.consumers.length > 1) {
- logger.warn(
- `Salesforce app [appId=${appId}] has ${consumersData.consumers.length} consumers; rotating the first one only — assign each consumer to its own External Client App if all need rotation`
- );
- }
const { data: stagedData } = await request.request<TSalesforceStagedCredentialsResponse>({
method: "POST",
@@ -152,17 +147,14 @@ export const salesforceOauthCredentialsRotationFactory: TRotationFactory<
// policy name is the app name with _plcy suffix
const fullName = `${appName}_plcy`;
+ const result = await conn.metadata.update("ExtlClntAppConfigurablePolicies", {
+ fullName,
+ externalClientApplication: appName,
+ isOauthPluginEnabled: false
+ });
- logger.info({ appName }, "Disabling OAuth on Salesforce External Client App");
- const result = await conn.metadata.update("ExtlClntAppConfigurablePolicies", [
- {
- fullName,
- externalClientApplication: appName,
- isOauthPluginEnabled: false
- }
- ]);
-
- if (result.length === 0 || result[0].success === false) {
+ if (!result.success || result.errors.length > 0) {
+ logger.error({ result }, "Failed to disable OAuth on Salesforce External Client App");
throw new BadRequestError({
message: `Failed to disable OAuth on Salesforce External Client App "${appName}": unknown error`
});
diff --git a/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx b/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx
index 76e45f472c..b2b2477057 100644
--- a/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx
+++ b/docs/documentation/platform/secret-rotation/salesforce-oauth-credentials.mdx
@@ -12,7 +12,7 @@ description: "Learn how to automatically rotate Salesforce External Client App c
## 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 target **External Client App** 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>
diff --git a/docs/integrations/app-connections/salesforce.mdx b/docs/integrations/app-connections/salesforce.mdx
index eb5ecf0e8a..e5f2c3cd0b 100644
--- a/docs/integrations/app-connections/salesforce.mdx
+++ b/docs/integrations/app-connections/salesforce.mdx
@@ -21,8 +21,8 @@ Infisical supports the OAuth 2.0 [Client Credentials](https://help.salesforce.co
<Step title="Enable OAuth Settings">
Under **API (Enable OAuth Settings)**:
- Check **Enable OAuth**.
- - Provide a callback URL (any valid HTTPS URL — it is not used for the Client Credentials flow).
- - Add the OAuth scopes your integration requires (for secret rotation, you must select **Manage user data via APIs (api)** and **Full access (full)**).
+ - Provide a callback URL (this is not used for the Client Credentials flow).
+ - Add the OAuth scopes your integration requires. For secret rotation, you must select **Manage user data via APIs (api)** and **Full access (full)**.
- Check **Enable Client Credentials Flow** and **Enable Token Exchange Flow** (along with the sub-option **Require secret for Token Exchange Flow**).
![OAuth Scopes and Flow Enablement](/images/app-connections/salesforce/oauth-scopes.png)