Agent Authorization Integration
Two-layer security model — ZeroID verifies agent identity, Highflame Agent Authorization enforces runtime actions. Pattern for passing ZeroID JWT claims as Cedar context. Cedar policy examples.
ZeroID and Agent Authorisation (Shield) solve two distinct problems in agentic systems. ZeroID answers who the agent is. Shield answers what the agent is allowed to do at runtime. Using them together gives you a complete security model: cryptographically verified identity feeding policy-driven action enforcement.
The Two-Layer Model
These two systems operate at different points in the request lifecycle.
ZeroID — identity layer
ZeroID issues and verifies JWTs that describe the agent's identity, trust level, delegation chain, and authorized scopes. It answers questions about provenance: who is this principal, how far has authority traveled, and who originally granted it? This work happens before the request reaches your service.
Shield — runtime action layer
Shield evaluates the action being attempted against Cedar policies and detector signals. It decides whether the specific action — sending a prompt, executing a tool, writing a file — is allowed given the current context. It can incorporate ZeroID claims as Cedar context, which means identity attributes directly influence runtime decisions.
The split matters because ZeroID controls what tokens can be issued and to whom, while Shield controls what a holder of a valid token is permitted to do with it. Neither system alone gives you both.
Request Flow
The standard flow when both systems are in use:
The agent authenticates with ZeroID and receives a JWT access token.
The agent calls a downstream service, attaching the JWT as a bearer token.
The service verifies the JWT locally using ZeroID's JWKS.
The service extracts identity claims from the verified token.
The service passes those claims as context to Shield for guardrail evaluation.
Shield evaluates the action against Cedar policies and detector signals.
The service allows or denies the action based on Shield's decision.
ZeroID verification and Shield evaluation happen in sequence. If the JWT is invalid, the request is rejected before Shield is ever called. If the JWT is valid but Shield denies the action, the request is rejected at the guardrail layer.
What ZeroID Provides to Shield Decisions
The claims in a ZeroID JWT can be passed directly as context to Shield's Cedar policies. This is how identity characteristics influence runtime action decisions without rebuilding identity logic inside Shield.
trust_level
How much confidence the platform has in this identity (first_party, verified_third_party, unverified). Use it to gate sensitive operations.
sub_type
The operational role of the agent (orchestrator, tool_agent, code_agent, autonomous, etc.). Use it to apply different enforcement thresholds per agent type.
delegation_depth
How many hops the token has traveled from the original authority. Use it to reject deeply delegated tokens for high-risk operations.
scopes
What the token is authorized for. Use it to confirm the agent has the right scope for the action, independent of Cedar policy.
act.sub
The identity that delegated authority to the current principal. Use it for audit context and to require a known orchestrator be present in the chain.
Integration Pattern
The pattern has three steps: verify the token, extract claims, pass them to Shield.
Python
For async services:
Helper methods on ZeroIDIdentity that are useful before calling Shield:
TypeScript
Helper methods on the TypeScript ZeroIDIdentity:
Cedar Policy Examples
These policies show how to use ZeroID claims in Shield's Cedar enforcement layer. Cedar evaluates the context object your service passes to Shield alongside the detector signals Shield produces.
Block tool agents with delegation depth greater than one
This allows tool agents only when they are at most one hop from the original authority. Any tool agent token that has been delegated more than once is blocked.
Require first-party trust for sensitive operations
Write operations are blocked for any identity that is not explicitly marked first_party. Verified third-party and unverified agents cannot write.
Deny unverified identities from all write operations
This is a baseline deny rule. Unverified agents are blocked from any action with side effects regardless of other policies.
Require a known orchestrator in the delegation chain
Tool agents must have been delegated authority by a known orchestrator in the same project. Tool agents that arrived without a delegation chain or from an unexpected source are blocked.
Combine trust level and sub type for tiered access
First-party agents get full access. Verified third-party agents can only act if their sub type is chatbot or assistant. All other combinations are denied by default.
When to Use ZeroID Alone, Shield Alone, or Both
ZeroID alone is sufficient when:
you need to authenticate an agent and verify its delegation chain
your authorization requirements are fully expressed in scopes
you are building an internal service that trusts all identities issued by your ZeroID instance equally
latency is critical and you want to keep authorization in the token without an additional network call
Shield alone is sufficient when:
you are running guardrails on user-facing input or LLM output with no agent identity context
your service uses service keys or API keys that do not carry identity claims
you want runtime content safety and injection detection without modeling the identity layer
Both together when:
you want policy decisions that incorporate agent identity, trust level, delegation depth, or sub type
you are building multi-agent systems where different sub types face different runtime constraints
you need an audit trail that links guardrail decisions back to a specific registered agent identity
you are enforcing least-privilege at both the credential layer (what the token can do) and the runtime layer (what the action is allowed to attempt)
The typical production pattern for agentic platforms is to use both. ZeroID controls token issuance and delegation. Shield controls what happens at runtime. The claims ZeroID embeds in the JWT become the identity context that Cedar policies in Shield operate on.
What's Next?
Read Downstream Authorization for the full pattern of verifying ZeroID JWTs in your services before calling Shield.
Read Agent Delegation to understand how
delegation_depthandact.subare populated in delegated tokens.Read Credential Policies to control which grant types and delegation depths are allowed at issuance time, before runtime enforcement.
Read the Shield Python SDK or Shield TypeScript SDK for full guard evaluation API reference.
Read the ZeroID Python SDK or ZeroID TypeScript SDK for token verification API reference.
Last updated