How nike-inc/cerberus works
Main components
• Core Business Logic: Modules like “cerberus-core” and “cerberus-domain” contain the business logic, domain objects, validations, and data models used by the application.
• API Testing Suite: The “cerberus-api-tests” module contains integration tests to verify the APIs.
• Authentication Connectors: Separate connectors for Okta (“cerberus-auth-connector-okta”) and OneLogin (“cerberus-auth-connector-onelogin”) indicate pluggable authentication support.
• Audit Logging: The “cerberus-audit-logger-athena” module handles audit logging (likely outputting logs to S3/Athena or similar AWS services).
• External Integrations: There are various AWS integrations – such as AWS Secrets Manager (for “first secrets”), KMS (for encryption), S3 (for storing secrets or files), and possibly STS – which should be clearly represented.
• Infrastructure & Configuration: Dockerfiles, Gradle files, configuration YAMLs (especially the cerberus.yaml) and scripts (run.sh, debug.sh) are used for deployment and runtime configuration.
Relationships and interactions
• Within the Cerberus Web module, illustrate layers such as controllers, service classes, domain/DAO layers, and error-handling components.
• AWS Secrets Manager & KMS for secure key management and decryption of configuration/credentials.
• S3 (and Athena in the case of audit logging) for storing audit logs and other binary artifacts.
• Authentication connectors (Okta and OneLogin) as separate components that provide authentication data to the backend.
• API test module as a verification layer that simulates external calls to the Web API.
Architectural patterns and design principles
• Separation of concerns: the front end (dashboard) is decoupled from the backend API service.
• Use the layered architecture pattern within the Web application to separate controllers, business services, domain models, data access (DAO) layers, and error handling.
• That Cerberus employs modularization – each concern (audit logging, authentication, core business logic) is split into its own submodule or service.
• Use of dependency injection and Spring Boot’s auto-configuration, which are common in such applications.
Relevant technologies
• Spring Boot (cerberus-web)
• Gradle as the build tool (build.gradle), indicating the build and deployment process.
• MySQL for persistent storage.
• AWS SDK integrations (AWS Secrets Manager, KMS, S3, STS) as external cloud services.
• Potential front-end libraries (based on the presence of package.json and Node modules in cerberus-dashboard).
• Testing frameworks (JUnit/Spock/Groovy, as indicated by “.groovy” tests in various modules).