Downstream Authorization
ZeroID answers identity and delegation questions at token issuance time. Your downstream service still needs to decide whether the current principal is allowed to perform the requested action.
This guide covers the standard pattern for consuming ZeroID tokens in APIs, services, MCP servers, and internal tools.
What A Downstream Service Should Verify
At minimum:
verify the JWT signature using ZeroID's JWKS
verify issuer and expiry
inspect
sub,scopes, and any application-specific claimsinspect
act.subwhen delegation context mattersenforce authorization locally
Fetch the JWKS
ZeroID publishes public keys at:
GET /.well-known/jwks.jsonA downstream service can cache the JWKS and select the right key using the JWT kid header.
Claims That Usually Matter Most
sub
The currently authenticated principal
scopes
Scope-based authorization
act.sub
Audit and delegation-aware authorization
trust_level
Risk-sensitive decisions or routing
identity_type
Differentiate agents, services, applications, and MCP servers
sub_type
Differentiate orchestrators from tool agents or code agents
delegation_depth
Reject deeper chains if your service only supports shallow delegation
owner_user_id
Operational attribution, not direct runtime auth
Typical Authorization Patterns
Scope-Based Checks
Example:
require
data:readto fetch a recordrequire
tickets:writeto update a ticket
Identity-Type Checks
Example:
allow only
serviceoragentprincipals to call an internal APIreject
applicationidentities from low-level infrastructure routes
Delegation-Aware Checks
Example:
allow
tool_agentidentities only ifact.subbelongs to an approved orchestratorreject delegated chains deeper than
1
Trust-Level Checks
Example:
allow
first_partyidentities to call privileged internal toolsrequire
verified_third_partyor better for external integrations
Example Decision Logic
A downstream invoice service might enforce:
scopemust includeinvoice:writeidentity_typemust beagentorserviceif
sub_typeistool_agent,act.submust be presenttrust_levelmust befirst_party
That is enough to distinguish:
direct autonomous agents
orchestrators delegating to tool agents
background services
Introspection vs Local Verification
You have two broad options:
Local Verification
Use this when:
you want low latency
your service can trust cached JWKS
you are comfortable enforcing auth from token contents alone
Introspection
Use this when:
you need a stronger online check of token activity
you want the latest revocation state
your authorization model already depends on live identity state
Introspection endpoint:
In practice, many systems do local verification for hot paths and reserve introspection for sensitive operations or high-risk environments.
Highflame Integration Pattern
If you are already using the Highflame platform, ZeroID complements it cleanly:
ZeroID establishes who the agent is
Highflame guardrails and policy systems decide what the agent can do
That means ZeroID JWT claims can feed downstream authorization, policy evaluation, guardrails, and observability with a consistent identity model.
What's Next?
Read SDK Overview if you want to integrate token issuance and admin workflows from code.
Revisit Identity Model if you need to design claim-driven authorization rules.
Last updated