The cross-cloud agent interoperability problem just got a serious security patch. A new proof-of-concept detailed on DEV.to demonstrates a secure handoff mechanism between Microsoft Foundry on Azure and Google Cloud Agent Runtime, ensuring that when Agent B passes a task to Agent A, the customer's identity is preserved without leaking their full access rights. This isn't a production-ready system yet, but the architecture offers a compelling blueprint for how we stop treating agents as black boxes that blindly forward bearer tokens.

The Problem With Forwarding Tokens

Standard approaches to agent delegation fail hard in multi-cloud environments. The PoC authors highlight two common pitfalls: forwarding the customer's original token, which lets a compromised agent replay that token for any action the customer can perform, or giving agents their own service identity, which reduces the customer to a mere parameter that an agent can hallucinate. The new design rejects both. Instead, it implements OAuth 2.0 Token Exchange (RFC 8693) where every hop results in a new, narrowly scoped token. The customer signs in once, and the gateway immediately swaps that token for one addressed specifically to the first agent, stopping the original credentials from ever entering the agent chain.

Strict Scope Reduction and Actor Chains

The core innovation here is the strict monotonic reduction of permissions. The design enforces four rules: no token is forwarded to a new destination without an exchange; the gateway swaps tokens at the entry; agents exchange tokens using their own platform identity (no secrets); and scopes only shrink. For example, if a customer has rights to 'read' and 'transfer', but the agent's policy ceiling is only 'read', the agent cannot obtain a token with 'transfer' scope, even if the customer asked for it. The resulting token includes an 'act' claim that nests the chain of actors (e.g., Agent B acting for Agent A acting for the Customer), providing a clear audit trail without letting any single component become a point of failure for the entire chain's security context.

Implementation Details and Standards Alignment

Built on Keycloak 26 with a custom extension, the PoC uses Entra ID tokens for agent authentication and Apigee/API Management as gateways. The implementation aligns with recent standards drafts, including the IETF WIMSE architecture (draft-ietf-wimse-arch-09) and the AIMS draft (draft-ietf-wimse-aims-01), both of which discourage token passthrough. The authors note that while the standards don't dictate exactly where the exchange happens (gateway vs. agent), they chose to have the agent initiate the exchange to ensure the actor proves its identity directly to the CIAM. This design prevents a compromised gateway from minting tokens on behalf of agents it doesn't control.

Key Takeaways

  • Token forwarding is an anti-pattern for secure agent delegation; strict exchange is required.
  • Scopes must only shrink along the agent chain, enforced by the CIAM and verified by gateways.
  • The 'act' claim provides a nested audit trail of which agents handled the request for the customer.
  • Session termination must be enforced via introspection to stop agents from using stale tokens.
  • The model itself never sees or handles the security tokens; exchange happens in deterministic code.

The Bottom Line

This PoC is a wake-up call for anyone building multi-agent systems. If your agents are just passing around customer tokens like hot potatoes, you're one prompt injection away from a data breach. The shift to scoped, exchanged tokens with explicit actor chains is painful to implement but necessary for production-grade security.