$ show dromara/MaxKey
MaxKey is an enterprise-grade Identity and Access Management (IAM) / Single Sign-On (SSO) platform written in Java (Spring Boot) with Angular frontends. It supports a comprehensive set of authentication protocols (OAuth 2.0/OpenID Connect, SAML 2.0, CAS, JWT, form-based, token-based) and identity federation standards (SCIM 2.0, LDAP, Active Directory). The codebase is organized as a multi-module Maven project with clear separation between authentication providers, protocol implementations, persistence layer, and web UIs. Architecturally, it follows a service-oriented model with a custom OAuth2 stack (derived from Spring Security OAuth), MyBatis JPA for persistence, and Redis/Caffeine for caching. The frontends are built on NG-ALAIN (Angular 17) and share a common base for user portal and admin console. While the system is functionally rich and actively maintained, it contains some duplicated code across modules and relies on a legacy OAuth2 implementation that has been superseded by Spring Security 5+. The crypto utilities, OTP infrastructure, and adapter patterns are well-structured and demonstrate non-obvious craftsmanship.
The LLM identified 2 files worth highlighting for reuse:
Provides a reversible password encoder that uses DESede for encryption and stores a BCrypt hash of the salt for validation. This is a non-trivial pattern for systems that need to recover plaintext passwords (e.g., legacy application integration) while maintaining security. The class is self-contained, depends only on standard Java crypto APIs, and can be extracted into any Java project requiring such an encoder.
Generates X.509 v3 certificates with configurable subject, issuer, validity, and extensions (e.g., subject alternative names). Uses BouncyCastle internally but wraps the complexity in a clean builder-like API. This is a reusable utility for any Java application that needs to create self-signed certificates (e.g., for SAML metadata, TLS testing). The class has no project-specific dependencies and can be extracted with minimal modification.