Treat the callback as a non-human identity with an assigned owner, a scoped app, and a defined run-as user. The key controls are matching OAuth scope to the grant type, limiting the permissions behind the run-as user, and storing the encoded credential bundle as a managed secret rather than a loose integration artifact.
How to Govern Salesforce Client Credentials for Server-to-Server Callbacks
Server-to-server callbacks should be governed as a production integration identity, not as a generic app setting. The callback needs clear ownership, a scoped connected app, and a defined run-as user so the grant is traceable and bounded. The practical question is whether the callback can only do the work it truly needs, and whether the credential bundle is managed like a secret, not copied around as an integration detail.
For OAuth design and grant handling, the core rule is to align the client credentials flow with the intended server-to-server use case and keep the token audience and scope narrow. The callback should not inherit broad org access simply because it is machine initiated. That is why teams should pair the flow with explicit app registration, documented purpose, and a run-as user whose permissions are limited to the exact objects, APIs, and actions the callback requires. The RFC 6749: The OAuth 2.0 Authorization Framework defines the grant structure, while NHIMG’s Machine-to-Machine OAuth (Client Credentials) Guide covers the practical choices around client authentication, scopes, audiences, and validation.
Operationally, the most common failure is treating the callback as a convenience integration rather than a governed identity. If the connected app, run-as user, or secret bundle is reused across environments or teams, blast radius grows quickly and ownership becomes unclear. Salesforce security practices should therefore include registration review, permission review, token and secret inventory, and logging that can show which callback used which integration path. NHIMG’s Salesforce Security Guide is the broader reference point for connected app governance, access review, and monitoring.
When callbacks are implemented with long-lived credentials, the security posture depends on how well the organisation can detect exposure and revoke fast. A managed secret store, rotation process, and clear exception handling matter because the credential bundle often becomes the easiest route to production access if it leaks. OAuth itself is only one layer, the surrounding lifecycle is what determines whether a compromise becomes an incident. The same principle is covered in Secrets Management Guide and API Key Management Guide, which both stress storage, rotation, and revocation discipline.
Risk and Threat Considerations
Server-to-server callbacks can quietly expand Salesforce exposure because the integration is often trusted, persistent, and hard to distinguish from normal application activity. If the credential bundle, connected app, or run-as user is over-scoped, a single compromise can create broad data access or unintended write capability, especially when teams reuse the same integration across multiple environments.
Failure mechanism: The callback credential is stolen, copied, or over-permissioned, then used to mint access tokens that inherit more authority than the business process needs. Weak ownership and poor secret handling make revocation slower and make misuse harder to detect.
Impact: Attackers or faulty automation can access CRM data, alter records, or use the callback path as a stable foothold into Salesforce-connected workflows. The result is not just data exposure, but also governance drift, because the integration can outlive the business reason it was created for.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Covers lifecycle control for the callback secret and token material. |
| AC-6 — Least Privilege | Directly fits the run-as user and scoped app permissions. | |
| IA-9 — Service Identification and Authentication | Applies to server-to-server authentication between systems. | |
| Recommendation — Rotate and revoke the callback secret on a defined lifecycle. Limit the run-as user to the minimum Salesforce permissions. Authenticate the callback as a service identity, not a shared user account. | ||
| CIS Controls v8 | CIS-5 — Account Management | Relevant to owning, reviewing, and removing integration accounts and access. |
| Recommendation — Inventory and review the callback account and its access paths. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The encoded credential bundle is identity-bearing material that must be protected. |
| Recommendation — Store the callback secret in a managed vault and prevent loose sharing. | ||
Practitioner Guidance
What to verify: Confirm that each callback has one named owner, one approved connected app, one documented run-as user, and one clear business purpose. If any of those are shared across unrelated integrations, the control is already weaker than it looks.
Decision rule: If the callback needs broad object access to work, redesign the integration before expanding permissions. If it only needs a narrow read or write path, keep the run-as user tightly scoped and treat any broader grant as an exception that needs explicit approval.
What good looks like: The credential bundle is stored in a managed secret system, rotation is routine, and the team can show which service owns the callback, which permissions it has, and how fast access can be revoked if the integration is suspected of abuse.
Practitioner takeaway: The security objective is not to make the callback “work somehow”, it is to ensure the callback has a small, auditable authority boundary that can be rotated or removed without disrupting unrelated Salesforce activity.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 30, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org