Authdog

Authorizing tool calls for Mastra

Last updated Oct 22, 2026
View as Markdown

A returned user is the subject. It is not an allow list. Tool and workflow routes still need a second check before they do privileged work.

After the subject is known

Check Where
Bearer accepted The hook on Mastra
Allowed tools Trust-store row, when your process enforces it
The action itself Authorization using the subject

Revoke in Agents stops new tokens when the subject is the OIDC client id. Tokens already issued last until expires_in unless a later check rejects them.

When the token is an RFC 8693 delegation, the person stays the subject and the agent stays the actor. Authorizing the agent as the user skips the delegation.

Read To learn how to
Custom channel auth for Mastra Admit the caller
Enriching instructions for Mastra What the model is allowed to see
Authorization Pick the check after the subject

Learn more