Skip to content
Try Hanzo
Language: English (United States)

Hanzo Authz

Fine-grained authorization

hanzoai/authz

Apache-2.0 · a library, not a service
hanzoai/authz
hanzo authz check

caller

location

can

workspace memberacme/prod/web

true

  1. verifies the JWT that IAM signed
  2. does a grant this caller holds cover this path
  3. does its role admit this verb

acme/prod prefixes acme/prod/web

Hanzo Authz reads a token and answers whether the caller may do the thing.

It verifies the JWT that IAM signed, then asks one question: does a grant this caller holds cover this path, and does its role admit this verb. It is a library, not a service — no store, no configuration, no network call on any path — so every Hanzo service asks that question the same way and gets the same answer.

  1. 01 / 06

    Where a thing is, and who may touch it

    A location is a path — acme, acme/prod, acme/prod/web, and the app or site under that. Access is a grant at a prefix of one. Keeping them apart is the whole design: containment names a resource, it does not hand every ancestor's members the child.

    acme/prod→acme/prod/webtrue

  2. 02 / 06

    Nothing on the decision path does I/O

    No store, no config, no init, no network call. Authz is a leaf package a service imports, so the check is a function call and a request that reaches your handler has already been decided.

    request→authz→your handler

  3. 03 / 06

    One rule covers every arrangement

    Can is true when some grant the caller holds prefixes the target and its role admits the verb. An org-wide member holds a grant at the org; a workspace member holds one a level down; an invite-only project is a grant with no ancestor above it. There is no second mechanism.

    org-wide memberworkspace memberinvite-only projectno second mechanism

  4. 04 / 06

    Delegation is a narrower grant

    Handing an agent or a short-lived credential part of your authority means writing a grant deeper in the path than your own, with an expiry if you want one. Nothing can be delegated that the delegator does not already hold.

    acme/prod→acme/prod/webexpiry

  5. 05 / 06

    The decision travels, the grant set stays

    The edge resolves the requested scope once and writes the resolved path and role into the token, so the token stays the same size no matter how many grants a person has, and no service behind the edge asks IAM anything.

    grants→edge→token

  6. 06 / 06

    Only what IAM signs

    Verification accepts the algorithms IAM's signer actually produces — RSA, EC, and ML-DSA-65 for a post-quantum certificate. HMAC and alg none are rejected. Key material is an argument, so the leaf never fetches a JWKS and a caller that supplies no keys verifies nothing.

    RSAECML-DSA-65HMACalg none

Tech specs

Hanzo Authz

The question

1rule

Does a grant this caller holds cover this path, and does its role admit this verb.

On the path

No store, no config, no init, no network call. A leaf package a service imports; the check is a function call.

Delegation

A grant deeper in the path than your own, with an expiry if you want one.

Token

The resolved path and role, the same size no matter how many grants a person has.

Verification

3RSA, EC, ML-DSA-65

HMAC and alg none are rejected. Key material is an argument.

License

Apache-2.0

Delegate it yourself

Delegation is a narrower grant

your grant

the agent's grant

true

grant at acme/prod/webexpiry

Delegation is a narrower grant, with an expiry if you want one.

  • gatewayReady
  • payments-apiReady
  • checkout-webBuilding
  • docs-siteReady

The service the session above is changing.

api.hanzo.ai/v1/authzOpen in the console ↗

Example project. Every name in it is one you would give your own.

Get Authz

hanzoai/authz

Fine-grained authorization

License: Apache-2.0hanzoai/authz4 stars

Paste and ship

Paste this into any agent. It reads the skill manifest and calls Authz from there.

api /v1/authz

Agent prompt
Read https://hanzo.ai/skill.md and use Hanzo Authz in my project. Start with: hanzo authz check