Keycloak Adaptive Authentication Extension
Keycloak Adaptive Authentication Extension
OpenAI ChatGPT
Default model: gpt-4o-mini
Anthropic Claude
Default model: claude-haiku-4-5-20251001
Google Gemini (free tier available)
Default model: gemini-2.5-flash-lite
OpenRouter (extension)
Model: set via OPENROUTER_API_MODEL
IBM Granite (deprecated)
Default model: granite-8b-code-instruct-128kRisk is evaluated locally as much as possible. AI engines are only used for complex evaluations that require deeper contextual analysis. Since AI services are external dependencies, all user data (IP addresses, device info) is automatically anonymized before being sent to prevent information leakage. See Privacy and Anonymization Guide for details.
For more information and setup, see the AI Integration Guide.
| Keycloak Version | Supported |
|---|---|
| 26.7.x | Yes |
| 26.6.x | Yes |
| 26.5.x | Testing ended June 2026 |
| main (nightly) | Yes |
Build and try it out locally:
./mvnw clean install -DskipTests -Pbuild-distribution
./mvnw exec:exec@copy-extensions exec:exec@start-serverThe generated JAR (core/target/keycloak-adaptive-authn-*.jar) can be added to the /providers folder of your Keycloak distribution with additional JARs as extensions from the /extensions module. The core JAR is also available as a Maven package:
io.github.mabartos
keycloak-adaptive-authn
${version}
jar
For full build instructions, installation options, and configuration, see the Start Guide.
See EVALUATORS.md for a complete list of all built-in risk evaluators grouped by evaluation phase.
NOTE: Authentication policies that were part of this Adaptive authentication initiative were moved to repository mabartos/keycloak-authn-policies.
No open issues yet, or sync has not completed.