Enforce least privilege on scoped MCP OAuth tokens

reference brazil Updated Sep 10, 2026 2 min read sc-enforce-least-privilege-in-scoped-outbound-tokens.md
Raw file servicenow.com

The com.snc.platform.security.oauth.mcp.aig_scope_support property controls how OAuth access tokens are cached and reused for Model Context Protocol (MCP) flows in AI Gateway (AIG).

The MCP OAuth flows cache and reuse outbound access tokens issued on behalf of connected AIG clients. This optimization prevents the requirement to mint a new token for each repeated call to a downstream resource.

When set to true, the cache key used to look up a reusable token is computed from the client's requested and baseline configured scopes. Requests carrying different scope combinations resolve to separate cached tokens instead of sharing one. When set to false, a single cached token is reused for every request from that client regardless of which scopes were involved when it was created.

To configure this property:

  1. Navigate to /sys_properties_list.do on the ServiceNow instance.
  2. Set the com.snc.platform.security.oauth.mcp.aig_scope_support property to true.

More information

Attribute

Description

Configuration name

com.snc.platform.security.oauth.mcp.aig_scope_support

Configuration type

System Properties ( /sys_properties_list.do)

Data type

Boolean

Recommended value

true

Default value

false

Fallback value

false

Category

Access control

Security risk

  • Severity score: 4.3
  • CVSS rating: Low
  • Security risk details: It is insecure to reuse a single cached access token across every request from a client, independent of which permissions were involved when that token was created. This approach allows a token issued under one context to be handed out again for an unrelated request. When the original context carried a broader set of permissions, a later, narrower request can still be served the same token. This blurs the boundary between what different requests are authorized to do creating a token confusion risk. A lower-trust or compromised request path can leverage access that was meant to be reachable through a different, more privileged context.

Functional impact

Enabling this control changes outbound-token issuance for MCP OAuth client-credentials and authorization-code flows. Instead of one shared token per user/client, the platform provisions or reuses a distinct outbound token per effective scope combination. This approach increases the number of stored token mappings for clients that vary their requested scopes across calls. Regression test MCP client credentials token issuance, the MCP authorization code flows, and outbound token reuse and expiry behavior for AIG connections.

Dependencies and prerequisites

None

**Parent Topic:**[Access control](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/platform-security/instance-security-hardening-settings/sc-access-control.md)
Keywords scoped outbound tokensOAuth access tokensModel Context ProtocolAI Gatewaytoken cachingleast privilege
Search documentation
Search document titles and file paths on the brazil branch