Trust Checks

How a Trust Check asks a connected trust registry about the calling or destination agent, where it sits on the surface canvas, and how its results reach OPA policy.

An agent that calls your surface can assert any DID, and the DID alone says nothing about whether an organisation you trust stands behind it. The same is true of the agents your managed agent calls. A Trust Check is a surface canvas element that asks a connected trust registry about the agent at one point of the request, and hands each answer to your OPA policies. Your policies can then accept only the agents that an Authority or Issuer you rely on has recorded, and every answer is available to the audit log. Check agents against a trust registry →

What a Trust Check asks

A trust registry holds records, each identified by four values: an Authority, an Entity, an Action, and a Resource. Each query in a Trust Check asks the registry one question about those values: does the Authority ID recognise or authorise the Entity ID, for the Action on the Resource? The Authority is the trust anchor you rely on, and the Entity is the agent being checked.

A query has one of two record types:

  • Recognition asks whether the Authority recognises the Entity as part of its trust network. When Action and Resource are left blank, the gateway sends is and ownedAgent, so the query asks whether the Authority owns the agent. That is the record a Trust Recorder writes.
  • Authorization asks whether the Entity is authorised to perform an action on a resource, for example register on agents. Both Action and Resource are required, because the gateway supplies no defaults for this type.

The registry answers each query with a yes or no verdict over Trust Registry Query Protocol (TRQP), sent over the gateway’s DIDComm connection to the registry. Each query names one trust registry, so a single Trust Check can ask several registries with one query for each.

From version 1.0.10, one query’s Authority ID can list several Authorities. The gateway asks every listed Authority at the same time and gives policy one answer for each, so a surface can accept an agent that any one of several organisations recognises. A Trust Check also has no limit on its number of queries, although each listed Authority adds a query to the registry on every request.

How a Trust Check runs

A Trust Check runs in three stages on the edge it sits on. It extracts the agent to check: the caller's DID on the caller leg, or the destination's agent card on a target leg. It queries a connected Trust Registry over TRQP, one query per Authority. The gateway writes each answer into the policy input, and the Policy element on the same edge, the focus of the diagram, decides whether the request proceeds. A Trust Check runs in three stages on the edge it sits on. It extracts the agent to check: the caller's DID on the caller leg, or the destination's agent card on a target leg. It queries a connected Trust Registry over TRQP, one query per Authority. The gateway writes each answer into the policy input, and the Policy element on the same edge, the focus of the diagram, decides whether the request proceeds.

When a request reaches an edge that carries a Trust Check, the gateway works through three stages.

Extract. The gateway builds the request context. On the caller leg, it reads the caller’s agent DID and any trust registry metadata the caller sent with the request. On a target leg, it fetches the destination’s agent card and verifies the agent identity credential the card carries.

Query. The gateway fills each query’s fields from that context and sends the queries to their trust registries. All queries in the Trust Check run in parallel, and a query that lists several Authorities sends one TRQP query to each.

Evaluate. The gateway writes each answer into the policy input at input.trust_check_results, together with the values it sent, and records a Trust Check audit event. Your OPA policy then decides whether the request proceeds.

A query can fail before it reaches the registry. When the caller’s request or the destination’s agent card lacks a value the query needs, the result carries TRUST_REGISTRY_METADATA_UNAVAILABLE in place of a verdict. From version 1.0.9, a query whose Authority has been deleted fails with AUTHORITY_NOT_FOUND, and the gateway sends nothing to the registry for it. A failed query counts as not passed. For every result code, see Trust elements reference.

Why a Trust Check needs a policy

A Trust Check reports results and refuses nothing by itself. A Policy element on the same edge reads input.trust_check_results and decides: for example, allow the request only when every check ran and passed. Without such a policy, a request from an agent the registry does not recognise still reaches your managed agent.

Keeping the check and the decision apart lets one policy combine several answers. A policy can require every query to pass, accept a pass from any one of several Authorities, or treat an unreachable registry differently from a clean “not recognised” answer. The answers of a query with several Authorities share the query’s id, so a policy can group them. See Accept any one Authority.

A policy that depends on target-leg results also requires that the checks ran, because a request through a Transit Point without a Trust Check carries no target-leg results at all. See Require target-leg checks in policy.

Which agent each Trust Check verifies

A Trust Check verifies a different agent depending on the edge it sits on. Each edge takes one Trust Check.

EdgeLegAgent checkedResults in
Access Point → Managed AgentCaller legThe agent calling your surface. Available for all protocols.input.trust_check_results.caller
Managed Agent → Transit PointTarget legFor requests the managed agent sends through that Transit Point, each query checks one of two agents. The Destination agent is the agent at the Transit Point’s destination, on A2A Transit Points. This surface’s managed agent is your own agent calling out, on every Transit Point.input.trust_check_results.target for the destination, input.trust_check_results.managed_agent for the managed agent
Managed Agent → External TargetTarget legThe managed agent’s own target, when the Managed Agent’s Endpoint Type is via A2A Proxy or via Gateway Connection.input.trust_check_results.target

Caller-leg verification checks the incoming agent. The gateway reads the caller’s identity and trust registry metadata from the request and queries the registry about that caller.

Target-leg verification checks the agent the request is going to. The gateway fetches that agent’s card, verifies the identity credential it carries, and queries the registry about that agent. Each Transit Point has its own Trust Check, which runs only for requests the managed agent sends through it. A Transit Point without a Trust Check runs no target-leg check.

Both target-leg placements write destination results to the same list, so a policy reads them the same way.

Managed-agent verification checks your own agent on its way out. From version 1.0.10, a query on a Transit Point’s Trust Check can ask whether the registry still recognises the managed agent, by the DID it calls out under, instead of asking about the destination. A Transit Point policy can then stop an agent’s outbound calls as soon as its recognition is turned off in the registry. This check works on every Transit Point, MCP included, because it needs no agent card from the destination. A Trust Recorder on the same edge can record the DID the check asks about.

On an MCP Transit Point, a Trust Check that holds a destination query, such as one the upgrade to version 1.0.2 copied there, is read-only. You can keep it or remove it.

How Authorities and Issuers anchor a check

The Authority ID names whose word the check relies on, and from version 1.0.10 it can name several. The choice depends on the leg.

  • Caller leg: by default, the verified issuer of the caller’s agent identity credential. You can pick the sending gateway’s DID instead, for requests that arrive from a connected gateway, or a fixed trust anchor: one of your own Issuers, or an Authority.
  • Target leg: an Issuer or an Authority configured on your gateway. The destination agent can’t name who vouches for it, so you choose.

An Issuer is a gateway entity with its own DID that stands for the part of your organisation that owns your agents, and registering it writes its records to the registry. An Authority is an outside organisation’s DID that your gateway trusts as a trust anchor, kept in your gateway’s own register. To accept a partner’s agents, you add their Issuer’s DID as an Authority and use it as the Authority ID. For which choice suits which case, see Which DID goes in which field.

From version 1.0.9, an Authority that a Trust Check uses can’t be deleted from the Authorities tab. A Trust Check that still names an Authority deleted earlier shows Authority deleted on the canvas. The surface can’t be saved until that query uses another Authority, an Authority with the same DID is added again, or the Trust Check is removed. See Deleted Authorities.

Where it appears in the dashboard

  • Surface canvas: Trust Check is in the Security & Policy section of the palette. You drop it on an edge, and its panel opens the queries with Configure Queries…. On a Transit Point, the panel notes Applies to this Transit Point only.
  • Policies: the policy that reads the results is a policy definition, attached with a Policy element on the same edge.
  • Audit: each check is recorded as Trust check passed or Trust check failed, with the leg and the result code, when VP auditing is on and the Trust Check event is selected.
  • Logs: the gateway logs each check with its result.

Relationship to the Trust Recorder

A Trust Check reads records, and the Trust Recorder writes them. Between two organisations, each one usually runs one side: the organisation whose agents make the calls records them with a Trust Recorder, and the organisation receiving the calls checks them with a Trust Check. A Recognition query with the default Action and Resource finds exactly the is ownedAgent record a Trust Recorder writes, when its Authority ID is the Authority that record names. For both sides set up end to end, see Verify agents across organisations with a trust registry.

Further reading

Trust Checks at work, and the steps for each kind of check: