How mosip/id-authentication works
Main Components
• API Exposure & Gateway: The system exposes various APIs to external clients (see the “APIs” section in the README and several modules with “controller” directories). These endpoints are grouped by functionality – some are part of the core authentication service, others provide OTP, KYC, or even esignet integration.
• Core Authentication Engine: The “authentication-core” and “authentication-common” directories hold the core logic and common libraries (managers, builders, filters, exception handlers, helper utilities, etc.) that are used by other parts of the system.
• Service & Filter Modules: Multiple modules target specialized functionality:
– authentication-filter-api: Contains interfaces and SPI for authentication filters.
– authentication-authtypelockfilter-impl, authentication-hotlistfilter-impl: Provide implementations for specific security or hotlist checking.
– authentication-internal-service: Provides internal-facing endpoints (and batch scripts for scheduled tasks like cleanup) and special configurations for internal authentication flows.
– authentication-otp-service: Dedicated to handling OTP requests and validations.
– authentication-service: Contains business logic controlling external authentication and KYC services, with controllers and facade implementations.
– esignet-integration-impl: Provides integration with esignet services (including DTOs and helper modules).
• Database: SQL scripts and upgrade scripts (under db_scripts and db_upgrade_scripts) indicate that the system relies on a relational database, with multiple tables (for API keys, transactions, hotlist caches, etc.). Represent the database as an external component that these modules interact with.
• Infrastructure/Docker: The Dockerfiles and deployment scripts indicate containerized deployments, as well as configuration files for Kubernetes deployment. Include a containerization element that wraps the microservices if needed.
• Messaging/Integration: Several modules reference Kafka configurations (e.g., within authentication-common) and websub components for event-driven interactions. Represent an integration/communication layer (e.g., message queues or event topics) connecting components that publish authentication events.
Relationships and Data Flow
• That the core libraries (authentication-core and authentication-common) are shared utilities used by multiple services.
• If applicable, indicate external integrations (such as esignet integration) that interface with third-party services.
Deployment & Build Elements
• Although not every Jenkins/CI/CD detail must be shown, you might note that build automation (Travis, GitHub workflows) is in place.
– External Clients/API Consumers (label with “REST API”)
– An API Gateway (or the exposed controllers)
– A centralized Database (or multiple DB components if needed, as suggested by the db_scripts)
– Event/Message Brokers for event-driven integration (Kafka/websub)