How mosip/esignet works
1. What this repo is
eSignet is an OpenID Connect / OAuth 2.0 authorization server with a companion web UI, built as a modular Java 11 / Maven monorepo. The system is designed around plugin-style integrations so the core protocol engine can be paired with different identity providers and identity databases.
2. Primary runtime boundary
The main deployable backend is esignet-service. It exposes the HTTP APIs and controllers for authorization, token issuance, client management, consent, key binding, discovery, and system info. This is the application you would place at the center of the architecture diagram.
3. Protocol engine vs. shared model layer
The backend delegates most protocol and domain logic to two shared libraries:
- esignet-core: common DTOs, validation annotations, SPI interfaces, cache/security/audit utilities, and protocol constants.
- esignet-integration-api: plugin-facing contracts and DTOs for identity exchange, key binding, OTP, VC-related legacy interfaces, and related validation helpers.
These are the architectural seam between the service and pluggable implementations.
4. Concrete implementation modules
The actual service logic is split into focused implementation jars:
- oidc-service-impl: OAuth/OIDC flow orchestration, authorization code, token, discovery, PAR, claims, consent helper logic.
- client-management-service-impl: create/update/read client registrations.
- binding-service-impl: public-key registry and individual-id binding validation.
- consent-service-impl: consent persistence and consent history.
These modules are the backend’s internal subsystems; the service layer wires them through the SPI interfaces from esignet-core.
5. Request flow through the backend
A typical authorization flow enters through esignet-service controllers, passes through security/header/DPoP filters, then into the OIDC or client/consent services. Those services coordinate state across cache, database, and external identity/plugin calls, and finally return redirects, codes, tokens, or discovery documents back to the browser or client.
6. External identity and partner integration
eSignet is not a standalone identity store. It depends on external identity ecosystems via plugins and supporting services:
- partner onboarding and policy management,
- identity-provider-specific authentication and KYC/binding steps,
- key binding and consent collection,
- optional linked / DPoP / PAR variants of the same protocol flow.
The architecture should show these as external service boundaries rather than internal modules.
7. Persistence layer
The repo includes SQL and upgrade scripts for a dedicated mosip_esignet database schema. The stored data is centered around client details, consent records, consent history, public key registry, key policies, and related operational metadata. The implementation modules each map to a portion of this shared database.
8. Cache, messaging, and security dependencies
The core code includes Redis cache configuration and Kafka helper utilities, indicating that session-like state, transaction state, or queued actions are offloaded from pure request/response handling. Security concerns include DPoP validation, JWT-based client authentication, CSRF-related handling, and cryptographic key management through SOFTHSM in deployment.
9. Web UI boundary
The oidc-ui module is a separate React application served independently and deployed alongside the backend. It handles end-user interactions such as login, consent, signup, OTP, biometrics, and authorization screens. It communicates with esignet-service over HTTP APIs and should be drawn as a distinct frontend client, not embedded in the backend.
10. Local development and test harnesses
The repo contains extensive testing artifacts:
- api-test: Java/TestNG-based API automation with many scenario templates for OIDC, linked auth, DPoP, PAR, consent, and partner flows.
- performance-test: JMeter load scripts and test data.
- postman-collection: manual/API exploration assets.
These are not part of production runtime but are important for understanding expected flow coverage.
11. Deployment topology
Production deployment is Kubernetes/Helm-based under deploy/ and helm/, with charts and scripts for the backend, UI, PostgreSQL, Redis, Kafka, Keycloak, SOFTHSM, and ingress/gateway setup. The architecture therefore spans multiple cluster components rather than a single service pod.
12. Supporting platform services
The deployment and scripts reveal the main platform services the system expects around it:
- PostgreSQL for persistent state,
- Redis for short-lived state/caching,
- Kafka for asynchronous/event-driven support,
- Keycloak for identity/auth infrastructure in the platform setup,
- Istio / gateway components for ingress and routing.
These are material dependencies for the system architecture diagram.
13. Important functional boundaries
The most important functional partitions are:
- protocol execution,
- client lifecycle management,
- consent lifecycle,
- key binding / registry,
- UI-based user interaction,
- test and deployment automation.
Keeping these boundaries separate will produce an accurate diagram of how eSignet is assembled and how requests move through it.
14. Notable scope note
The README states that Verifiable Credential Issuance endpoints were moved out to Inji Certify, so this repository should be diagrammed primarily around OIDC/OAuth, identity assurance, consent, binding, and client management rather than VC issuance.
Main entry points: esignet-service eSignet service · esignet Helm deploy · mosip_esignet PostgreSQL · oidc-service-impl OIDC impl
Components 20
Runtime
Primary deployable application and service modules
- eSignet service · Main HTTP runtime for OIDC/OAuth endpoints, security filters, and controllers.
esignet-service - OIDC impl · Orchestrates authorization, token, discovery, PAR, claims, and linked flows.
oidc-service-impl - Client mgmt · Handles create, update, and read of OIDC client registrations.
client-management-service-impl - Key binding · Maintains public-key registry and validates binding-related state.
binding-service-impl - Consent service · Persists consent records and consent history.
consent-service-impl
Shared libs
Common protocol models, SPIs, and integration contracts
- Core lib · Shared DTOs, SPI interfaces, validation, security, cache, audit, and protocol utilities.
esignet-core - Integration API · Plugin-facing DTOs, exceptions, SPI interfaces, and helper contracts for external identity integrations.
esignet-integration-api
Frontend
Browser UI deployed alongside the backend
- OIDC UI · Separate browser application for login, consent, signup, OTP, biometrics, and auth screens.
oidc-ui
Platform
Database, cache, messaging, identity, and ingress dependencies
- PostgreSQL · Persistent store for clients, consents, key registry, policy, and operational metadata.
db_scripts/mosip_esignet - Redis · Short-lived state and transaction/session caching.
deploy/redis - Kafka · Asynchronous/event-driven support for queued actions and helpers.
deploy/kafka - Keycloak · Platform identity/authentication dependency used in deployment topology.
deploy/keycloak - Gateway · Ingress and routing layer for public and internal traffic.
deploy/istio-gateway - SoftHSM · Deployment-time cryptographic key storage and signing support.
deploy/softhsm
Ops & quality
Deployment, test, and automation assets
- Helm deploy · Kubernetes packaging for backend, UI, and supporting platform services.
helm/esignet - DB scripts · SQL, seed data, and upgrade scripts for the mosip_esignet schema.
db_scripts/mosip_esignet - DB upgrades · Versioned upgrade and rollback scripts for schema evolution.
db_upgrade_script/mosip_esignet/sql - API tests · Java/TestNG scenario coverage for OIDC, linked auth, DPoP, PAR, consent, and partner flows.
api-test - Perf tests · JMeter scripts and datasets for performance validation.
performance-test - Postman · Manual API collection and environment assets.
postman-collection
Connections 27
- eSignet service → OIDC impl: delegates · Controllers hand protocol execution to the OIDC orchestration layer.
- eSignet service → Client mgmt: delegates · Client management endpoints are backed by the client registry service.
- eSignet service → Key binding: delegates · Binding-related endpoints flow into the key binding subsystem.
- eSignet service → Consent service: delegates · Consent endpoints read and write consent state through the consent service.
- eSignet service → Core lib: uses · Runtime wiring, DTOs, validators, and SPIs are shared from the core library.
- eSignet service → Integration API: uses · External authenticator and key-binder contracts come from the integration API.
- OIDC impl → Core lib: implements · OIDC implementation classes realize shared service interfaces and reuse protocol models.
- OIDC impl → Integration API: calls plugins · Authentication, captcha, and binding steps can be satisfied by external plugin implementations.
- OIDC impl → Redis: caches · Short-lived authorization and transaction state is cached externally.
- OIDC impl → Kafka: publishes · Helper utilities indicate queued or event-driven actions around link and auth flows.
- Client mgmt → PostgreSQL: persists · Client registrations are stored in the shared database schema.
- Key binding → PostgreSQL: persists · Public key registry and related binding metadata are stored in the database.
- Consent service → PostgreSQL: persists · Consent records and history are stored in the database.
- OIDC UI → eSignet service: calls HTTP · The separate browser UI exchanges auth, consent, and account-flow requests with the backend.
- Helm deploy → eSignet service: deploys · Helm charts package the backend runtime for Kubernetes.
- Helm deploy → OIDC UI: deploys · Helm charts package the React UI alongside the backend.
- Helm deploy → PostgreSQL: provisions · Cluster deployment includes the PostgreSQL dependency.
- Helm deploy → Redis: provisions · Cluster deployment includes Redis for shared state.
- Helm deploy → Kafka: provisions · Cluster deployment includes Kafka for asynchronous support.
- Helm deploy → Keycloak: provisions · Cluster deployment includes Keycloak for identity infrastructure.
- Helm deploy → Gateway: routes through · Ingress and gateway setup is part of the cluster topology.
- Helm deploy → SoftHSM: provisions · Deployment expects SoftHSM for cryptographic operations.
- DB scripts → PostgreSQL: defines schema · Initial DDL, DML, and role scripts shape the mosip_esignet database.
- DB upgrades → PostgreSQL: migrates · Versioned upgrade scripts evolve the same database schema.
- API tests → eSignet service: validates · Scenario automation exercises the backend flows end to end.
- Perf tests → eSignet service: loads · JMeter scripts target the backend runtime under load.
- Postman → eSignet service: explores · Collection assets support manual API inspection against the backend.