AI ecosystems are moving toward agents from one organization calling tools owned by another. The easy answer is federation: accept the other company's token and let the agent work. But federation does not mean foreign authorization becomes local authorization. It means you can verify who made a claim. Your system still decides what that claim is worth.
Portable identity is useful. Portable permission is dangerous only.
Preserve the issuer and actor
The stable identity key is normally issuer plus subject. A subject identifier without its issuer can collide. An email address can change or be reassigned. Map the external identity into a local tenant and account through configured trust, not through a domain string supplied at runtime.
Agents add another identity. The human or organization authorizing the work is the subject, while the agent workload is the actor. Flattening both into one sub claim makes audit and policy weaker.
const principal = {
issuer: token.iss,
subject: token.sub,
actor: token.act?.sub,
audience: token.aud,
tenant: localTrustMap.resolve(token.iss, token.sub),
};
Reject unknown issuers, unexpected audiences, and algorithms outside the configured profile. Federation metadata helps distribute keys and endpoints, but configuration still needs ownership and change control.
Exchange external proof for local authority
Do not forward a partner token through every internal service. Validate it at the federation boundary, apply local policy, then issue or exchange a shorter internal credential for the exact resource. RFC 8693 token exchange provides one model. Workload federation systems use a similar principle: external proof becomes a local, bounded credential.
This translation is where tenant policy, contractual limits, risk, and resource ownership belong. The external issuer can say that agent X belongs to company Y. It cannot decide that agent X may update your production customer records.
Keep trust directional. Accepting an issuer for one API does not mean accepting it everywhere. Bind the local token to one audience and prevent confused-deputy behavior where a token for a low-risk tool is replayed at a high-risk service.
Plan for trust lifecycle
Federation relationships change. Keys rotate, partners are offboarded, issuers are compromised, and agent identities are replaced. Cache metadata with bounded lifetimes, support emergency distrust, and audit which trust configuration produced each decision.
The future AI ecosystem will not have one global identity provider. It will have many trust domains exchanging evidence. The winning architecture will make those exchanges explicit and local authority narrow.
The takeaway is that federation connects identities, not permission models. Verify external proof, preserve the actor chain, then make a local authorization decision. Trust can cross organizations without becoming unlimited.
Akash Devdhar is a Senior Software Engineer specializing in enterprise identity, authentication, authorization, and AI infrastructure. He writes about building secure AI systems using OAuth, OIDC, RBAC, and modern identity architectures.

Top comments (0)