← Go back

How do external gateways and policy engines use TrustGate approved digests?

Published 2026-11-14 · Reviewed 2026-11-14 · By the Ingenious AI team

The short answer

Through one small endpoint with one exact question. TrustGate's API answers ‘yes’ only when the digest a caller presents for a given server and tool matches the digest pinned in the approved baseline; anything else — unknown tool, changed digest, missing baseline — is a no. External gateways, policy engines and CI checks consume that answer as a definition-approval gate inside their own enforcement, complementing (never replacing) the Interdiction Gateway's in-path proxy. The consuming system decides its own posture on ‘no’ and on outage, and the only safe default for tool execution is fail-closed.

Run the free MCP scan  See pricing  Watch the live demo diff

What is the approved-digest API?

TrustGate's approved-digest endpoint (GET /api/approved-digest?server=&tool=) returns whether the tool definition digest presented by the caller matches the digest in the currently approved baseline for that server and tool — alongside the baseline identity and its approval record, so consumers can log the basis of an allow decision. A digest is the SHA-256 of a tool definition's canonical form (name, description, input schema), making the check content-exact: the same tool name with a single altered word in its description produces a different digest and a different answer. Consumers typically call it in an authorisation step before permitting a call, or continuously to detect divergence between what is deployed and what is approved.

One question, exactly answered

The endpoint's design discipline is its narrowness: it does not opine on whether a tool is safe, whether a call's arguments are wise, or whether a server is trustworthy in general — judgements that belong to the repository record and the human queue. It answers the single question that can be answered exactly — ‘is this definition, byte for byte, the one a named human approved, in the baseline that is current now?’ — and returns the provenance (which baseline, approved when, by whom) that lets the consumer's logs tell the same story as TrustGate's records. Narrow questions compose; vague ones merely sound reassuring while meaning different things to each consumer, which is how integration estates quietly fork their own ground truth.

Consumers should treat ‘no’ as a genus with species worth distinguishing in logs: unknown server (configuration error), unknown tool (definition added without approval, or a typo with the same shape), digest mismatch (the change case), and no active baseline (governance not yet established). The responses distinguish them so runbooks can route each to its fix instead of to a generic shrug.

Pattern one: the API gateway authorisation step

Organisations already running an API gateway or service mesh in front of internal tooling can add the digest check as an authorisation policy: the gateway computes (or receives) the definition digest for the tool being invoked and consults TrustGate before forwarding. Deployments vary — some gateways hold the definitions themselves (making digest computation local), others pass the digest their MCP client computed — and both work, because the trust anchor is the same: the baseline. The pattern shines where the Interdiction Gateway's proxy is not the deployed topology (existing mesh, partner-operated runtime) yet definition governance should still bind execution.

Two implementation disciplines decide whether the pattern is strong or theatrical. First, the digest must be computed over the definition that will actually execute — a registry copy that can drift from the runtime's is a new sync problem wearing a check's clothes; wherever the consumer cannot guarantee identity between checked and executed definitions, the in-path proxy remains the stronger control and the API check demotes to detection. Second, caching: approval state changes rarely but consequentially, so cache windows must be short and revocation-aware — a baseline revoked in a rug-pull response must stop answering ‘yes’ within the consumer's tolerance, which belongs in the integration's written contract, not its defaults.

Pattern two: CI and deployment gates

Agent platforms that ship definitions as code can check them at build time: the pipeline computes digests for the definitions in the release and asks TrustGate whether each is the approved one for its target environment, failing the build for unapproved definitions exactly as it would for unsigned artefacts. This moves the approval conversation earlier — a definition change meets the queue at pull-request time rather than in production — and pairs naturally with the staging-first discipline: the staging baseline is where new definitions get approved, and promotion carries the approval with it rather than re-litigating per environment.

The build-time pattern also catches the sedimentary drift class: definitions edited directly in a runtime console, hot-fixed during an incident and never brought home to the repository. The next honest build fails its own check — noisily, in daylight, with the diff visible — which is the drift confessing itself to the cheapest possible audience. Teams adopting the pattern should expect that first month of confessions and budget the cleanup: the check is not creating the drift, it is ending its invisibility.

Pattern three: continuous divergence detection

A lighter consumption mode suits estates where enforcement lives elsewhere: a periodic job walks the runtime's live definitions, computes digests, and compares them against TrustGate's approved answers, alerting on divergence — detection rather than prevention, covering topologies where neither proxy nor gateway can sit in path (some SaaS-hosted agent runtimes, partner systems). Divergence windows exist between checks, so the pattern fits servers whose tier tolerates detection latency, exactly as the cadence tiers reason about re-scans.

Whichever pattern the estate chooses, the division of labour stays constant: TrustGate is the system of record for what is approved; the consumer is the enforcement or detection point; the queue and its humans remain the only place approvals are born. Integrations that let a consumer cache ‘approved’ forever, or auto-approve on a vendor's version bump ‘for continuity’, have rebuilt the silent-update world inside a more expensive diagram.

Failure posture: what happens when the answer does not come

Every consumer must decide, in advance and in writing, what it does when the endpoint is unreachable or slow: fail closed (tool execution pauses — the safe default for consequential tools, with the availability cost accepted and monitored), fail open with loud alerting (defensible only for low-tier tools whose misuse ceiling is trivial), or serve the last known answer within a short, explicit staleness budget (the middle path, whose budget is a risk decision owned by a named human). ‘Whatever the library does by default’ is the fourth option and the only unacceptable one — outage posture is a security decision and defaults are not decision-makers.

TrustGate's side of the outage contract matters too: the endpoint's availability and latency belong in the integration's monitoring (an approval oracle that is down is a production dependency that is down), and the rug-pull runbook should include the consumer-side check that revocations have propagated within tolerance. Drills again: the launch review's blocked-call drill, replayed through the integrated path, proves the whole chain — baseline change, oracle answer, consumer behaviour — rather than each link's local optimism.

What the digest check is not

Precision about limits keeps integrations honest. The digest check says nothing about a definition's quality — an approved-but-unwise tool passes it forever, which is why adoption review remains a human art. It does not see arguments or results and cannot detect behaviour-level abuse of an unchanged definition, which belongs to composition and sinks. And it certifies approval, not provenance: a match proves the definition is the approved one, not that the executing server is the genuine vendor's — endpoint identity is the transport layer's problem, kept separate so each control's failure is legible.

Stated positively: the endpoint lets an estate ask, from anywhere, ‘are we running what we approved?’ and get an answer with provenance, in one call. Estates that ask continuously — and act on ‘no’ automatically — have converted governance from a periodic audit into a property of the running system, deliberately available to machinery TrustGate did not build.

The 5-action checklist

  1. Decide the consumer pattern per topology (gateway authorisation, CI gate, divergence detection) and write its contract: cache window, revocation tolerance, outage posture.
  2. Guarantee the checked digest is computed over the definition that will actually execute — otherwise demote the check to detection and say so.
  3. Distinguish the species of ‘no’ in consumer logs and route each (unknown server, unknown tool, mismatch, no baseline) to its own runbook.
  4. Set the outage posture explicitly per tier — fail closed by default for consequential tools — and monitor the endpoint as a production dependency.
  5. Drill the integrated path end-to-end (baseline change → oracle answer → consumer behaviour) and keep auto-approval out of the integration contract entirely.

Worked example: a mesh that learned to ask

A fictional platform team ran its agents behind an existing service mesh that leadership would not displace for a new proxy. Their integration: the mesh's authorisation plugin computed definition digests at session setup and consulted TrustGate's endpoint, caching answers for sixty seconds with fail-closed behaviour on the two consequential servers and alert-and-allow on the low tier — each posture written into the integration contract and reviewed at the launch gate. The rug-pull drill passed through the mesh path in the rehearsal week: a revoked baseline stopped answering ‘yes’ inside the cache window, and the drill's report noted the fifty-eight seconds as the estate's true revocation latency, a number nobody had previously been able to state.

Three months later the same machinery caught a mundane miracle: a vendor's silent schema widening (a new optional field on a write tool) diverged from the approved digest at 02:14, the mesh refused the tool, the on-call cleared the resulting case at stand-up with the vendor's answer already in the thread — the definition, restored pending their announcement discipline, was re-approved by noon. The team's retrospective line, now in their onboarding: ‘the integration did not make us secure; it made our approvals load-bearing, which is the part security was missing’.

Frequently asked questions

How is this different from the Interdiction Gateway?

Topology and trust anchor. The Gateway is TrustGate's own proxy in the call path, enforcing with full session context and case management built in. The digest API lets other enforcement points — your mesh, your CI, your own middleware — ask TrustGate the approval question inside architectures TrustGate does not operate. Same system of record, different enforcement furniture; estates commonly use the Gateway for direct agent stacks and the API for mesh- or pipeline-governed ones.

Who computes the digest — us or TrustGate?

The caller presents the digest of the definition it is about to run (TrustGate's canonicalisation — name, description and input schema as a canonical JSON form, SHA-256 — is the same one the scan and baselines use, and the API response also returns the approved digest for comparison and logging). If your side computes a different digest for the same visible definition, treat that as a canonicalisation bug to fix against the documented form, not as a mismatch to route around.

Can we auto-approve when only the version label changes?

The endpoint's contract has no such concept: approvals bind to digests, and any definition byte difference is a different digest requiring the queue's judgement. Version-label-only changes that alter no definition bytes keep the same digests and pass unchanged — which is the correct mechanics. Anything more permissive re-opens the silent-update door with the integration's own hands.

What latency should consumers budget?

The check is a single indexed lookup; consumers typically cache per session or for a short window (the worked example uses sixty seconds) rather than calling per tool invocation, and enforcement designs should state their cache and staleness budgets explicitly. Per-call checking is available for the most sensitive paths where the consumer accepts the dependency, with the outage posture decided accordingly.

Does the API expose our baseline contents publicly?

No. The endpoint is an authenticated product API: it answers yes/no plus approval provenance for the caller's own estate. Digests themselves are one-way hashes of definitions — useful for equality checks, not a channel for reading your baselines — and access follows your TrustGate plan's API terms like the rest of the product surface.

Keep exploring

Start with the free TrustGate scan of your own MCP setup, compare Free vs Pro vs Team, try the live rug-pull demo and the MCP change impact simulator, or browse the full guides index.