Skip to content

1.0.0

Choose a tag to compare

@mabartos mabartos released this 10 Apr 09:29
· 46 commits to main since this release

πŸš€ Keycloak Adaptive Authentication β€” 1.0.0 πŸš€

The first major release of Keycloak Adaptive Authentication β€” a more production-ready approach, an extensible framework for risk-based and adaptive authentication in Keycloak.


✨ Highlights

  • 🎲 Log-Odds (Bayesian Evidence) risk scoring algorithm β€” a probabilistic algorithm that produces calibrated risk probabilities, replacing the previous point-based system
  • ⚑ Virtual Threads risk engine β€” concurrent risk evaluation using Java virtual threads
  • πŸ€– AI integrations β€” Anthropic Claude, Google Gemini, OpenAI ChatGPT, with automatic data anonymization before sending to any external service
  • πŸ”— Chained User contexts β€” declarative approach to get more information about the user/device - get the information, but do not care how
  • πŸ”’ Fallback risk levels β€” configurable fallback when the risk engine fails to evaluate, preventing users from bypassing additional authentication
  • πŸ§ͺ More comprehensive testing
  • πŸ“¦ Keycloak 26.5.x / 26.6.x support

βš™οΈ Risk Engine

  • Implement Log-Odds (Bayesian Evidence) algorithm as a new risk score computation method (LogOddsRiskAlgorithm)
  • Make risk score algorithm configurable at the realm level, with Log-Odds as the default
  • Implement Virtual Threads risk engine with concurrent evaluator execution (now the default)
  • Add OpenTelemetry tracing support for the Virtual Threads risk engine
  • Compute the overall risk score based on the selected algorithm
  • Introduce ResultRisk and ability to map Risk scores to a point system
  • Add configurable fallback risk levels (simple and advanced) for when the risk engine fails to evaluate
  • Rename weight to trust across the risk evaluation API

πŸ” Risk Evaluators

πŸ†• New Evaluators

  • LoginFailuresRiskEvaluator β€” comprehensive login failure pattern analysis using LOGIN_ERROR events from the event store (replaces dependency on the brute force detector)
  • KnownLocationRiskEvaluator β€” evaluates risk based on known vs. unknown login locations (country/city)
  • TimePatternRiskEvaluator β€” uses circular statistics + EWMA to track and evaluate typical login times
  • ConcurrentSessionRiskEvaluator β€” detects concurrent sessions and distinct IPs during continuous evaluation
  • ClientSensitivityRiskEvaluator β€” risk scoring based on client role and client sensitivity level
  • DefaultUserRoleEvaluator β€” extends realm roles checking
  • AiAccountTakeoverEvaluator β€” AI-powered detection of potential account takeover

πŸ—‘οΈ Removed Evaluators

  • Removed AiTimeAccessRiskEvaluator, AiLoginFailuresRiskEvaluator, AiDeviceRiskEvaluator β€” replaced by more accurate local evaluators that don't depend on external AI calls

πŸ‘€ User Contexts

  • KnownLocationContext β€” track last known login locations per user
  • TypicalAccessTimeContext β€” evaluate and store typical access time patterns
  • OnSuccessfulLoginCallback β€” callback mechanism applied to TypicalAccessTime context
  • Chained User Context β€” ability to compose and chain multiple user contexts
  • User context subtypes β€” specify subtype of user context for finer granularity
  • Location condition β€” conditional authenticator based on location check
  • Cache location in the authentication session and global cache using Caffeine
  • Remove the external IP address dependency, keep minimal version in the project

πŸ–₯️ Admin Console UI

  • Client risk-based policies tab β€” configurable additional risk sensitivity for clients - some clients are more critical than the others
  • Uses Keycloak's declarative UI (declarative-ui:v1 experimental feature)
  • Custom theme separated from classpath for easier deployment

πŸ€– AI Integration

  • OpenAI ChatGPT integration
  • Anthropic Claude integration (default model: claude-haiku-4-5-20251001)
  • Google Gemini integration (default model: gemini-2.5-flash-lite, free tier available)
  • Data anonymization β€” all user data (IP addresses, device info) is automatically anonymized before being sent to AI services
  • IBM Granite deprecated
  • AI prompts now return Risk.Score enum values instead of raw doubles

πŸ™ Contributors

Thank you to everyone who contributed to making this first major release possible! πŸŽ‰


Upgrading guide: https://github.com/mabartos/keycloak-adaptive-authn/wiki/Upgrading-guide-0.4.8-%E2%80%90--1.0.0
Full Changelog: 0.4.8...1.0.0