Organizational Context Inside Every Token
Keymate enriches identity tokens with deep organizational context—like department, unit, title, and session role—enabling scoped, policy-aware decisions for every request. No hacks, no guesswork.
Context-Rich Tokens for Scoped and Precise Authorization Decisions
How Org-Aware Tokens Power Scoped Authorization
With Keymate, each session token carries rich metadata about the users organizational context: Assigned organization and department, Session-specific role (or delegated "hat"), Position, clearance level, and more. This context is stored in Keycloak session notes and injected into the token at login. Authorization decisions can then evaluate org-unit-based scopes, enabling policies like "Allow if user is from the same department", "Only supervisors from this unit may approve", or "Grant access if user holds delegated role within org X". Scoped access control becomes precise, traceable, and centrally managed—across APIs, services, and meshes.
Token Enrichment Flow
Policies can evaluate org-unit scopes, such as department, role, or unit, for precise and traceable access control.
What Makes It Unique
Org-Unit Enriched Tokens
Tokens carry department, org ID, position, clearance, and delegated role info.
Runtime Scoped Policies
Authorizations can use real-time org context for more accurate decisions.
Delegated Role Binding
Temporarily act on behalf of another role within your org unit—securely scoped.
Session-Aware Impersonation
Admins can impersonate with org-bound restrictions to avoid privilege escalation.
Keycloak Session Note Sync
Leverages native Keycloak session notes without custom token injection hacks.
OpenFGA-Ready Context
All org-unit data is mapped to OpenFGA model for high-performance checks.
Frequently Asked Questions
How to Use This Feature
Follow these simple steps to enrich your tokens with organizational context.