Description
SalesforceTools currently supports two auth methods:
- Session ID + Instance URL
- Username + Password + Security Token
Many production Salesforce orgs use Connected Apps with OAuth 2.0 Client Credentials for headless server-to-server integrations. This avoids storing user passwords and is the recommended approach for automated flows.
Proposed Change
Add consumer_key and consumer_secret parameters to SalesforceTools.__init__ with SALESFORCE_CONSUMER_KEY / SALESFORCE_CONSUMER_SECRET env var fallbacks, enabling OAuth 2.0 Client Credentials authentication.
Use Case
Server-to-server integrations where no interactive user login is available (CI/CD pipelines, background agents, scheduled jobs).
Description
SalesforceTools currently supports two auth methods:
Many production Salesforce orgs use Connected Apps with OAuth 2.0 Client Credentials for headless server-to-server integrations. This avoids storing user passwords and is the recommended approach for automated flows.
Proposed Change
Add
consumer_keyandconsumer_secretparameters toSalesforceTools.__init__withSALESFORCE_CONSUMER_KEY/SALESFORCE_CONSUMER_SECRETenv var fallbacks, enabling OAuth 2.0 Client Credentials authentication.Use Case
Server-to-server integrations where no interactive user login is available (CI/CD pipelines, background agents, scheduled jobs).