News

Agent Governance engineering

The token reached the right API. Did the agent still have authority?

OAuth resource indicators can restrict a token to an intended resource server. They do not prove that every action inside that API matches the person’s current mandate.

One token can pass the audience check and fail the authority check

Imagine a person asks an AI assistant to add one meeting. The assistant receives an access token intended for the calendar API. The resource server is correct. If the assistant instead requests “delete every event,” however, the token’s destination tells us nothing about whether that larger operation matches the person’s current instruction.

This is a fictional teaching example, not an observed incident. It isolates two controls that are easy to collapse into one: where a token should work, and what work the agent is currently allowed to do.

Two checks answer different questions
CheckQuestionCalendar example
Resource / audienceWhich resource server should accept the token?The calendar API, not the file API
Current mandateWhich operation may this agent perform now?Add one meeting, not delete every event

What RFC 8707 actually adds

RFC 8707, OAuth 2.0 Resource Indicators defines the resource parameter so a client can tell an authorization server which protected resource it intends to access. The authorization server can use that information when issuing a restricted token. The RFC says an access token should be audience restricted to a protected resource whenever the audience can be determined.

The parameter identifies the target resource with an absolute URI. It does not encode the complete semantics of a later API request, the user’s latest instruction, a transaction amount, or whether an agent silently broadened the task after authorization.

Audience restriction is important, but it is not a mandate

RFC 9700, OAuth 2.0 Security Best Current Practice recommends audience-restricted and sender-constrained access tokens to reduce token misuse. Those controls make token theft and cross-resource replay harder. They still do not convert a broad API capability into a record of the human’s current purpose.

An authorization server may also narrow scopes or return a different scope than requested. That is useful protocol state. A deployed agent system still needs an application-level decision that binds the principal, selected operation, object set, limits, expiry, and relevant context to execution.

Put both checks at the execution boundary

verifyToken({
  issuer: trustedIssuer,
  audience: calendarApi,
  expiry: now,
  sender: thisClient,
});

verifyMandate({
  principal: userId,
  operation: 'calendar.event.create',
  object: proposedEvent,
  maxWrites: 1,
  instructionRevision: currentRevision,
});

The first check belongs to OAuth validation. The second is an application policy example. Production details vary, but the two results should remain distinguishable in logs. A failure should say whether the token was unacceptable or the proposed action exceeded the current mandate.

Test the boundary, not just the happy path

  • Send a calendar token to a different resource server.
  • Replay a valid token from the wrong sender when proof is required.
  • Keep the audience correct but change create-one to delete-all.
  • Reuse an expired or superseded instruction revision.
  • Retry an uncertain write and reconcile before sending again.

This article reports no live-provider experiment, detection rate, latency benchmark, or safety guarantee. The code is illustrative pseudocode. RFC 8707 and RFC 9700 are the normative sources for the OAuth claims; the mandate check is our engineering implication for agent systems.

Related engineering

Sources checked November 6, 2026. Original explanation by AgentCollusion. Scanner is public beta; Guard is an offline prototype.