Context-Aware Risk Scoring Inside Every Token
Enrich Keycloak tokens with dynamic, real-time risk scores—powered by behavior, location, and device intelligence—to enable adaptive security policies and risk-aware access control.
Adaptive Token Enrichment with Contextual Risk Intelligence
Why It Matters
In a zero-trust world, static roles are no longer enough. Access decisions must adapt to real-time context:
- Is the login coming from an unusual location?
- Is the device unfamiliar or flagged?
- Has the user exhibited suspicious behavior?
Keymate\'s Risk Score Enricher SPI injects this context directly into Keycloak tokens, enabling risk-adaptive policies across APIs, services, and apps.
Adaptive Security Starts with the Token
The Risk Score Enricher SPI plugs into Keycloak's token issuance flow and evaluates contextual factors:
Risk Score Enrichment Flow
The result? Each token contains a risk_score or risk_level—ready to drive policy enforcement.
Example: Contextual factors are evaluated to generate a risk score, which is then injected into the access token.
Key Components:
Extension Highlights — What Makes It Unique
Behavioral Risk Signals
Real-time scoring based on IP, time, location, device patterns
Token-Level Intelligence
Inject risk_score, risk_level, or custom risk fields into tokens
External Engine Integration
Connects to in-house or 3rd-party risk engines via REST/gRPC
Dynamic Threshold Support
Enable just-in-time MFA or access restrictions based on risk level
Audit and OTEL Integration
Risk scoring logic is traced and logged for auditing and forensics
Policy-Ready Output
DSL or OpenFGA policies can directly evaluate risk claims in tokens