Agent validation via a trust registry
This guide adds a Trust Check to a surface, so the gateway asks a trust registry about each calling or destination agent, and a Policy element that refuses the request when the answer is no. For how the gateway queries a trust registry, see Trust registries.
A Trust Check reports its results to policy and refuses nothing by itself. Without a Policy element that reads those results, a request from an agent the registry does not recognise still reaches your managed agent.
Use this guide when:
- Agents from outside your organisation call your surface, and you accept only those a trust registry recognises or authorises.
- Your managed agent calls other agents through a Transit Point, and you want to check each destination before the call leaves.
For a complete example across two organisations, from registering an Issuer to a passing check, see Verify agents across organisations with a trust registry.
Prerequisites
| You need | Where it comes from |
|---|---|
| A trust registry with status CONNECTED | Adding a trust registry. |
| The DID you trust as the anchor, as an Authority or an Issuer on this gateway | Adding an Authority for another organisation’s Issuer, or Adding an Issuer for your own. Skip this when you keep the default Agent identity credential issuer. |
| A surface whose callers send an agent DID | Callers whose own gateway signs their agent identity, or callers that include identity metadata. See Limit surface access by agent identity. |
| A role that can create policy definitions and edit surfaces | Administrator, by default. |
Steps
Add a Trust Check on the caller leg
Open the surface. From the Security & Policy section of the palette, drag Trust Check onto the Access Point → Managed Agent edge.
Select the Trust Check, then select Configure Queries….
Configure the query
Fill in the query:
- Trust Registry: the registry to ask.
- Record Type: Recognition to ask whether the Authority owns the agent, or Authorization to ask whether it may perform an action on a resource.
- Authority ID: the trust anchor. See Which DID goes in which field.
- Entity ID: keep The caller’s agent DID (default).
- Action (optional) and Resource (optional): leave blank for a Recognition query, which then asks
is/ownedAgent. An Authorization query needs both, for exampleregisterandagents.
To ask more than one question, select Add Another Query. A Trust Check holds up to 10 queries on each leg. Select Save.

Create the policy that enforces the checks
In the sidebar, select Policies, open the Agent Surfaces tab, and select Define Agent Surface Policy. Enter a Name, paste this Rego in Policy Content (Rego), and select Create:
package surface.policy
default allow = false
allow if {
count(input.trust_check_results.caller) > 0
every r in input.trust_check_results.caller { r.ok }
}The rule allows a request only when the caller-leg checks ran and every one passed. The count(...) > 0 line refuses a request for which no check ran.
Attach the policy to the same edge
Back on the surface, drag Policy from Security & Policy onto the Access Point → Managed Agent edge. Select it and set Policy Definition to the policy you created. Save the surface.

Which DID goes in which field
Each query asks the trust registry one question: 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 you are checking. The choices depend on the leg the Trust Check is on.
Caller leg (Access Point → Managed Agent)
| Field | Default | Other choices |
|---|---|---|
| Authority ID | Agent identity credential issuer: the verified issuer of the caller’s agent identity credential. | Sending gateway DID (fabric-inbound), for requests that arrive from a connected gateway over fabric://. On a direct request it is empty and the query fails. You can also pick an Issuer or an Authority configured on this gateway, to check every caller against one fixed trust anchor. |
| Entity ID | The caller’s agent DID: the agent DID the caller asserts in its request. | The gateway’s managed-identity DID, derived by the surface’s Identity element. The caller’s verified identity credential issuer DID, to check the issuer itself rather than the agent. |
Target leg (Managed Agent → Transit Point)
| Field | Default | Other choices |
|---|---|---|
| Authority ID | None. Pick an Issuer or an Authority configured on this gateway. | Only Issuers and Authorities are offered, because the destination agent cannot name who vouches for it. With none configured, the field shows No Issuers or Authorities configured and links to add one. |
| Entity ID | The target’s agent DID: the agent DID published in the destination’s agent card. | None. |
Action and Resource
For a Recognition query, Action and Resource are optional and default to is and ownedAgent, which asks whether the Authority owns the agent. That is the record a Trust Recorder writes. For an Authorization query, both are required, for example register and agents.
Check a Transit Point’s destination
To check the agent a managed agent calls through a Transit Point, drop a Trust Check on that Managed Agent → Transit Point edge. It applies to that Transit Point only, so give each Transit Point the checks its destination needs. A Transit Point with no Trust Check runs none. New Trust Checks can be added to A2A Transit Points. For every placement and its limits, see Trust elements reference.
Results from a Transit Point’s checks reach policy at input.trust_check_results.target. Attach this policy with a Policy element on the same Managed Agent → Transit Point edge. It requires that the checks ran as well as that they passed, so a request through a Transit Point without checks is denied:
package surface.policy
default allow = false
allow if {
count(input.trust_check_results.target) > 0
every r in input.trust_check_results.target { r.ok }
}Keep this rule off the Access Point → Managed Agent edge. Inbound requests carry no Transit Point results, so there it denies every request. A rule that only looks for failed results allows every request through a Transit Point that has no checks.
Review Trust Checks copied to Transit Points
From 1.0.2, each Transit Point runs only its own Trust Checks. After the upgrade, a surface that had a surface-wide target-leg Trust Check has a copy of it on every Transit Point, flagged for review. Review each copy so each Transit Point runs only the checks its destination needs.
Open the surface
Open a surface in the Surface Builder that shows a banner such as 2 Transit Points need Trust Check review above the canvas. If the banner says some are in other variants, repeat these steps in each of those variants.
Select a flagged Trust Check
Select a Trust Check that carries a warning badge on a Managed Agent → Transit Point edge. Its panel shows Review this migrated Trust Check.

Keep or remove the copy
- To keep the checks on this Transit Point, select Keep.
- To stop checking this Transit Point’s destination, select Remove Trust Check.
On an MCP Transit Point the copy is read-only, so keep or remove it as it is.
Save the surface
Save the surface once every flagged Trust Check is reviewed. The banner disappears when no copy is left to review.
Before removing a copy, check the surface’s policies. A policy that denied on that Transit Point’s results allows its traffic once the checks stop. Use the count(...) > 0 pattern above wherever a policy must require target-leg checks.
Confirm
Callers reach your surface through their own gateway, which presents their agent identity. To test, send a request to the calling surface, whose managed agent forwards it to your surface. For example, on an A2A calling surface:
curl -X POST "<CALLER_ENTRY_POINT_URL>" \
-H "Content-Type: application/json" \
-H "A2A-Version: 0.3" \
-d '{"jsonrpc":"2.0","method":"message/send","id":1,"params":{"message":{"messageId":"trust-check-1","role":"user","parts":[{"kind":"text","text":"Hello"}]}}}'Read the outcome on your gateway’s Audit page, with Enable VP Auditing on and the Trust Check event selected in Settings › Security.
Test 1: request from an agent the registry recognises returns 200
Send the request from an agent whose Authority has a record for it.
Expected: your managed agent’s response, returned through the calling agent. The Audit record reads Trust check passed, with the caller leg and Result Passed.
Test 2: request from an agent the registry does not recognise returns 403
Send the same request from an agent with no record under that Authority.
Expected: your surface refuses the forwarded request with 403. The curl output depends on how the calling agent reports the refusal, so check the result on your Audit page: the record reads Trust check failed, with “Failed because NOT_RECOGNIZED”.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Every request returns 403, including from recognised agents. | The query could not complete, for example because the registry is not CONNECTED or the caller sent no agent DID. | Find the result code and follow Troubleshoot Trust Check denials. |
Requests from unrecognised agents return 200. | No Policy element reads the results, or the rule allows a request with no results. | Attach the policy from Step 3 on the same edge as the Trust Check. |
| Configure Queries… shows View Queries… instead. | The Trust Check is a copy on an MCP Transit Point, which is read-only. | Keep or remove it, as described in Review Trust Checks copied to Transit Points. |
Next steps
- Record your agents in a trust registry: Write the records that partners’ Trust Checks look for.
- Verify agents across organisations with a trust registry: Set up both sides of a check between two organisations.
- Troubleshoot Trust Check denials: Tell a misconfiguration from an agent that is not trusted.
Related
- Trust registries: How the gateway queries a registry, and which records answer each query.
- Trust elements reference: Every Trust Check field, result field, and error code.
- Authority reference: Fields and actions of an Authority.
- Apply OPA policies to your gateway and surfaces: Policy definitions, scopes, and evaluation order.
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.