Gateway Trust and Security
Cakewalk Agent Access is built on Credential Mediation and a clear layer boundary. This page covers what Cakewalk protects, how and what stays with the downstream apps.
Cakewalk Agent Access enforces trust through structural choices: Agents never see real credentials, the MCP Gateway is the choke point and the audit trail is immutable. This page explains the parts and the boundaries.
📖 Key Concepts
Credential Mediation: Agents never receive real tokens. The gateway stores each credential encrypted, resolves and decrypts it server-side, and injects it into outbound requests at proxy time.
Server-side injection: The Agent holds no credential and no stand-in for one. The gateway resolves the stored credential from the authenticated principal and injects it as a Bearer header; nothing credential-like ever enters the Agent's context.
Encrypted credential store: Credentials (OAuth tokens and personal tokens) are persisted encrypted, scoped per tenant. They are never stored in plaintext, and the credential is never returned to the Agent.
Layer boundary: Cakewalk governs access. Downstream apps enforce what happens once access is granted.
💡 Why this matters: Prompt injection is the primary risk for Agents. With real tokens in an Agent's context, a poisoned document can exfiltrate credentials. Because the Agent never holds a token or any stand-in for one, the same attack has nothing to exfiltrate.
🗝️ Credential Mediation
Credentials are stored encrypted, scoped to the User and tenant. The Agent never receives the credential or any stand-in for it.
On every tool call:
The Agent makes the tool call through the gateway, identified by its own session and principal.
The gateway resolves the User's stored credential for that Connection and decrypts it server-side.
The gateway injects the credential as a Bearer header into the outbound HTTP request.
The downstream Connection sees a request that looks like the User made it directly.
The Agent sees only the response. The credential never reaches the Agent.
This is the structural mitigation for prompt injection. If the Agent's context is compromised, there is no credential in it to steal. Access stops when the Agent's session or the User's Connection is revoked.
🛡️ The Encrypted Credential Store
The encrypted store is where credentials live at rest:
Envelope encryption: Each credential is encrypted with a fresh AES-256-GCM data key. The data key is wrapped with an RSA public key from an external key management service (AWS KMS), so the gateway process cannot unwrap it on its own.
Per-tenant isolation: Each customer's credentials are scoped to their tenant.
Credential types: A Connection holds either an OAuth token or a personal token from the MCP provider. Both are stored the same way.
Rotation: OAuth refresh is handled transparently. The Agent is unaffected when a token rotates.
Credentials belong to the User. When an Agent's access is revoked, the stored credential is untouched and the User keeps their Connection.
🧱 The Layer Boundary
Cakewalk operates at one layer. Other systems operate at adjacent layers. The boundary is intentional.
Access governance
Cakewalk
Should this Agent be allowed to call this tool?
Action enforcement
Downstream app or runtime partner
Within the granted scope, is this specific operation acceptable?
Resource permissions
Downstream app
Can the User access this specific record?
Cakewalk decides whether a tool call passes the gateway and under what action-type constraints. What the Agent does within those constraints at the resource level (this Salesforce record, this GitHub repo, this Notion page) is the downstream app's responsibility.
📜 Audit Immutability
Every tool call produces an audit event. Audit events are immutable:
Cannot be edited after they are written
Survive Policy changes, User offboarding and Agent restriction
Retain the Policy that fired at the time of the call, not the current Policy
Audit is the output of enforcement. Every tool call that passes the gateway leaves a complete record. Tool calls that bypass the gateway, such as direct API access with a leaked credential, are not captured.
🚧 Scope Boundaries
Cakewalk governs access at the Connection and tool-call level. Three things sit outside this scope:
Resource-level access. Per-record permissions (this Salesforce record, this GitHub repo, this Notion page) stay with the downstream app.
Compositional risk. Each tool call is evaluated independently. Decisions based on an Agent's accumulated access path across a session are not part of the current evaluation model.
Agent-to-agent delegation. Sessions are single-Agent. Recursive delegation chains are out of scope.
Related Concepts
The MCP Gateway: the choke point credential mediation runs through
The Tool Call Lifecycle: where credential injection happens (Step 5)
The Tool Call Record: the immutable record of every tool call
Policies: what gets enforced at the gateway
Last updated
Was this helpful?