Skip to main content
Version: Latest (main)

Authz Signal

Overview​

authz turns identity and policy bindings into reusable routing inputs under recipes[].signals.role_bindings.

This family is heuristic: it matches request identity against explicit roles and subjects instead of classifier output.

Key Advantages​

  • Routes premium, internal, or tenant-scoped traffic without extra model inference.
  • Keeps access policy visible inside recipes[].decisions.
  • Reuses the same identity rule across multiple routes.
  • Makes RBAC-driven routing auditable in YAML.

What Problem Does It Solve?​

Without an authz signal, routing decisions cannot see user tier or role membership directly. That pushes access-sensitive routing into scattered middleware and makes policy harder to review.

authz solves that by exposing role membership as a named signal that decisions can compose with domain, safety, or plugin logic.

When to Use​

Use authz when:

  • admin traffic must route differently from end-user traffic
  • premium tiers unlock stronger models or plugins
  • tenant or group membership changes route eligibility
  • route policy should stay in the same graph as the rest of routing logic

Configuration​

recipes:
- name: default
signals:
role_bindings:
- name: platform-admins-binding
description: Requests from platform administrators.
role: admin
subjects:
- kind: Group
name: platform-admins
- name: premium-tier-binding
description: Requests from paid end users.
role: premium_user
subjects:
- kind: Group
name: premium-tier

A binding matches a request when the caller's user ID or one of its groups is among its subjects, and then emits its role as the authz signal. The binding's name only identifies the binding in logs; several bindings can grant the same role.

Use role_bindings when the signal should fire from authenticated identity and policy metadata instead of prompt content.

Example Decision​

A decision references the role, never the binding's name:

recipes:
- name: default
decisions:
- name: route_admins
description: Route platform administrators to the strongest model.
priority: 200
rules:
type: authz
name: admin
modelRefs:
- model: strong-model

Dependencies and Limitations​

Identity comes from global.services.authz; the signal does not authenticate a request by itself. Trust only headers set or sanitized by your authentication layer. See a complete example: config/fragments/signal/authz/rbac.yaml.