# Identity and access for AI agents

> Agent identity: why AI agents need their own scoped, expiring tokens, not a person's password, how OAuth 2.1 and the MCP spec handle it, and what CoreFA gives.

Canonical page: https://finray.tech/platforms/corefa/ai-agents/
Publisher: Finray Technologies Ltd (finray.tech), unrelated to finray.io
Sources accessed 23 November 2026.

Agent identity, a kind of non-human identity, means that an AI agent signs in as itself: with a credential of its own, limited to one application and to the actions its task needs, set to expire, and never with a person's password. CoreFA gives sign-in and access to any application, including your own and third-party ones, and to AI agents.

## What agent identity and non-human identity are.

- **Non-human identity.** Any identity that is not a person: a service account, an API key or token, a workload, a script, and now an AI agent. Non-human identities sign in and call APIs as people do, so each needs what a person's account has: an owner, a scope and an end date.
- **Agent identity.** The identity an AI agent uses when it calls an application or a tool. An agent is not a script: it chooses its next step itself, from instructions in plain language, so what it can reach has to be set by its credential and checked by the application, not left to what it is asked to do.
- **The person behind it.** Each agent identity should have a named person who issued it and answers for it. The agent acts for that person, inside the limits the person or an administrator set.

## Why an agent needs its own credential, not a person's password.

An agent that signs in with a person's password and two-factor code can do everything the person can, and everything it does looks as if the person did it. Stopping it means changing the person's password. A credential of its own changes each of these:

- **Attributable.** The application and its audit log can tell the agent's actions from the person's.
- **Scoped.** The credential is for one application, its audience, and carries only the rights the task needs, its scope: read, or read and write. Least privilege applies to agents as it does to people.
- **Expiring.** It stops working on a set date, so an agent that is forgotten does not keep its access.
- **Revocable.** It can be revoked on its own, without locking the person out.

How to set an agent token's scope, owner and expiry, and the token register to keep, is set out in [API token permissions for AI agents](https://finray.tech/notes/ai-agent-api-token-permissions/).

## How OAuth 2.1 and the MCP authorization specification handle it.

The Model Context Protocol (MCP) is the open protocol through which AI applications connect to tools and data. Its authorization rules are in the specification's current revision, 2026-07-28. They apply to HTTP-based transports and are optional: a local MCP server that runs over STDIO should take its credentials from the environment instead.

Under these rules a protected MCP server is an OAuth 2.1 resource server, the MCP client is an OAuth 2.1 client, and an authorization server issues the access tokens. OAuth 2.1 is not yet an RFC: it is an Internet-Draft of the IETF OAuth working group. The MCP revision builds on draft-ietf-oauth-v2-1-13; the latest draft is draft-ietf-oauth-v2-1-17, dated 31 October 2026.

### The server says where to sign in

MCP servers must publish OAuth 2.0 Protected Resource Metadata (RFC 9728), and clients must use it to find the authorization server. A request with an invalid or expired token gets HTTP 401.

Sources: [Model Context Protocol, specification revision 2026-07-28: Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization) · [RFC 9728, OAuth 2.0 Protected Resource Metadata (April 2025)](https://www.rfc-editor.org/rfc/rfc9728.html)

### A token names its server

Clients must send the resource parameter of RFC 8707 in both the authorization request and the token request, set to the MCP server's canonical URI, so that the token is issued for that server.

Sources: [Model Context Protocol, specification revision 2026-07-28: Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization) · [RFC 8707, Resource Indicators for OAuth 2.0 (February 2020)](https://www.rfc-editor.org/rfc/rfc8707.html)

### The server accepts only its own tokens

MCP servers must check that each access token was issued for them as its audience, and must not accept or pass on any other token. A server that calls an upstream API uses a separate token, issued by the upstream authorization server.

Sources: [Model Context Protocol, specification revision 2026-07-28: Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization) · [Model Context Protocol, specification revision 2026-07-28: Authorization security considerations](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/security-considerations)

### Codes and tokens are protected

Clients must use PKCE, with the S256 method where they can. Authorization servers should issue short-lived access tokens, and must rotate refresh tokens for public clients.

Sources: [Model Context Protocol, specification revision 2026-07-28: Authorization security considerations](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/security-considerations) · [IETF, The OAuth 2.1 Authorization Framework, draft-ietf-oauth-v2-1-13 (the draft the MCP revision cites)](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13)

### A missing scope gets a challenge

A server should name the scopes an operation needs in its WWW-Authenticate challenge, and a request whose token has too little scope should get HTTP 403 with the error insufficient_scope. Clients should respond by requesting a new access token with an increased set of scopes via a step-up authorization flow, or handle the error in other, appropriate ways; clients acting on behalf of a user should attempt the step-up authorization flow.

Source: [Model Context Protocol, specification revision 2026-07-28: Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization)

In plain words: an agent's token is for one server, for named scopes and for a limited time, and the server refuses every other token. The same questions, which audience, which scope and how long, apply to a token an agent uses outside MCP.

## Approvals for sensitive actions.

A scope says what an agent may attempt; it does not decide whether a sensitive action should stand. For that, organisations ask for a second person: the [four-eyes principle](https://finray.tech/intelligence/glossary/four-eyes-principle/), under which the one who prepares an action is not the one who approves it.

An agent should not approve its own work, and an agent's token should not count as the second approver. How people review what agents write is set out in [AI agent approval workflows](https://finray.tech/notes/ai-agent-approval-workflow/).

The same applies when an agent initiates a payment: the limits it works within and the approvals it needs should be set by people, not by the agent. How AI agents pay at banks, e-money institutions and fintechs is set out in [agentic payments for banks, EMIs and fintechs](https://finray.tech/solutions/agentic-payments/).

### The two-admin rule in CoreFA

In CoreFA, the Two-admin rule sits under Company administration, beside Products, Users, Waiting for approval, Company policy and the Audit log, and approvals that are denied show on the dashboard.

## Audit: which credential acted, and for whom.

An audit record of agent work should answer who asked for an action, which agent and which credential carried it out, what changed, when, with what outcome, and who accepted or rejected the result. The record belongs in the system that holds the data, not in a chat transcript, and agents should not be able to change or delete it. The field list is in [AI agent audit trail](https://finray.tech/notes/ai-agent-audit-trail/).

CoreFA keeps an audit log under Company administration. Its dashboard shows failed sign-ins and distinct IP addresses in the last 30 days, denied approvals, the devices enrolled and each person's own API tokens, active, expired and revoked.

## What CoreFA gives AI agents.

- **Any application.** CoreFA gives sign-in and access to any application, including your own and third-party ones, and to AI agents. CoreFA is sold on its own.
- **Tokens of their own.** People mint API tokens in CoreFA from their profile. A token of the type Agent / automation is for scripts and AI agents, and each token has a name, an audience (the application it is for), a scope (read, or read and write) and an expiry.
- **OAuth for MCP clients.** CoreFA supports OAuth sign-in, including for MCP clients.
- **One identity service.** CoreFA owns identity: passwords, two-factor codes (TOTP), session handling and token signing. Applications validate CoreFA-signed tokens (JWT) against its published keys (JWKS) and resolve roles themselves.
- **Two-admin rule and audit log.** The Two-admin rule and the Audit log sit under Company administration, and the dashboard shows denied approvals and failed sign-ins.

Every Finray platform signs in through CoreFA: Corebanq, Zahlex, XZiel, Ordinis, Corebanq Accounting and Pync. In Pync, AI agents work with their own agent tokens, issued by CoreFA; how a team works with them is set out in [AI coding agents and your team in one tracker](https://finray.tech/platforms/pync/ai-agents/).

Identity, permissions, approvals and the audit trail are among the things that stay outside the model in an agent-built system, as set out in [Building bank-grade software with AI agents](https://finray.tech/notes/bank-grade-software-with-ai-agents/).

Teams that choose an identity product for their agents also look at hosted identity providers. The questions on this page, which audience, which scope, what expiry, who approves and what is logged, apply to any of them.

The product, its dashboard and how an application trusts a CoreFA sign-in are on the [CoreFA](https://finray.tech/platforms/corefa/) platform page.

## Frequently asked questions

### What is agent identity?

Agent identity is the identity an AI agent uses when it signs in to an application or calls an API: a credential of its own, separate from any person's, with the access its task needs and no more. It is a kind of non-human identity.

### What is a non-human identity?

Any identity that is not a person: a service account, an API key or token, a workload, a script or an AI agent. Each needs an owner, a scope and an end date, as a person's account does.

### Why should an AI agent not use a person's password?

Because the agent could then do anything the person can, everything it did would look as if the person did it, and stopping it would mean changing the person's password. A token of its own can be scoped to one application, set to expire and revoked without locking the person out.

### How does MCP authentication work?

For HTTP-based transports, the MCP authorization specification (revision 2026-07-28) builds on OAuth 2.1. The MCP server is an OAuth resource server that publishes Protected Resource Metadata (RFC 9728); the client names the server in the resource parameter (RFC 8707) and uses PKCE; and the server accepts only tokens issued for it. Authorization is optional, and a local server over STDIO takes its credentials from the environment.

### Is OAuth 2.1 an RFC?

Not yet. OAuth 2.1 is an Internet-Draft of the IETF OAuth working group; the latest version is draft-ietf-oauth-v2-1-17, dated 31 October 2026. The MCP authorization specification, revision 2026-07-28, builds on draft 13.

### Can AI agents sign in through CoreFA?

Yes. CoreFA gives sign-in and access to any application, including your own and third-party ones, and to AI agents. Scripts and AI agents get their own API tokens, of the type Agent / automation, each with an audience, a scope and an expiry. CoreFA supports OAuth sign-in, including for MCP clients.

### Does CoreFA work with applications that are not Finray's?

Yes. CoreFA gives sign-in and access to any application, including your own and third-party ones, and to AI agents. CoreFA is sold on its own.

## Sources

Accessed 23 November 2026.

- [Model Context Protocol, specification revision 2026-07-28: Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization)
- [Model Context Protocol, specification revision 2026-07-28: Authorization security considerations](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/security-considerations)
- [Model Context Protocol: Versioning (current revision 2026-07-28)](https://modelcontextprotocol.io/specification/versioning)
- [IETF, The OAuth 2.1 Authorization Framework, draft-ietf-oauth-v2-1-17 (Internet-Draft, 31 October 2026; not an RFC)](https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/)
- [IETF, The OAuth 2.1 Authorization Framework, draft-ietf-oauth-v2-1-13 (the draft the MCP revision cites)](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13)
- [RFC 8707, Resource Indicators for OAuth 2.0 (February 2020)](https://www.rfc-editor.org/rfc/rfc8707.html)
- [RFC 9728, OAuth 2.0 Protected Resource Metadata (April 2025)](https://www.rfc-editor.org/rfc/rfc9728.html)
- [RFC 7519, JSON Web Token (JWT) (May 2015)](https://www.rfc-editor.org/rfc/rfc7519.html)
