The Admin module provides a secure and configurable system for:
- Managing master data including zones, registration centers, devices, and machines.
- Resource creation.
- Bulk upload of packets.
- Packet status tracking.
- RID recovery.
- Resuming paused registrations.
It exposes a set of APIs that enable administrators to manage operational data efficiently. A reference front-end implementation is available in the Admin UI repository.
For a complete functional overview and capabilities, refer to the official documentation.
The Admin module contains the following services:
- Admin Service - Core administrative functionality
- Masterdata Service - Master data management
- Sync Data Service - Data synchronization
- Hotlist Service - Hotlist management
Before starting the local setup, execute the required SQL scripts to initialize the database.
All database SQL scripts are available in the db_scripts directory.
The project can be set up in two ways:
Before you begin, ensure you have the following installed:
- JDK: 21.0.3
- Maven: 3.9.6
- Docker: Latest stable version
- PostgreSQL: 10.2
- Keycloak: Check here
- Add
kernel-auth-adapter.jarto the classpath, or include it as a Maven dependency — Download
- Admin module uses the following configuration files that are accessible in this repository. Please refer to the required released tagged version for configuration. Configuration-Admin and Configuration-Application are defined here. You need to run the config-server along with the files mentioned above.
- For generating clients, refer to MOSIP’s documentation here: Client Generation Guide
- To authenticate a client, use the Auth Manager API as described here: Auth API Documentation
The following properties must be configured with your environment-specific values before deployment:
Database Configuration:
mosip.kernel.database.hostname- Database hostname (default: postgres-postgresql.postgres)mosip.kernel.database.port- Database port (default: 5432)db.dbuser.password- Database user password (passed as environment variable)
IAM/Keycloak Configuration:
keycloak.internal.url- Internal Keycloak URL (passed as environment variable)keycloak.external.url- External Keycloak URL (passed as environment variable)mosip.admin.client.secret- Admin client secret for Keycloak (passed as environment variable)mosip.regproc.client.secret- Registration processor client secret (passed as environment variable)
Service URLs:
mosip.kernel.authmanager.url- Auth manager service URLmosip.kernel.keymanager.url- Key manager service URLmosip.kernel.masterdata.url- Masterdata service URLmosip.kernel.notification.url- Notification service URLmosip.regproc.status.service.url- Registration processor status service URLmosip.idrepo.identity.url- ID repository identity service URLmosip.api.internal.url- Internal API base URL
Security Configuration:
mosip.security.origins- Allowed CORS origins (default: localhost:8080)mosip.security.secure-cookie- Enable secure cookies (default: false)mosip.admin-services.cookie.security- Cookie security flag (default: true)
Note:
- If using config-server: Properties marked as environment variables (e.g.,
db.dbuser.password,keycloak.internal.url,keycloak.external.url,mosip.admin.client.secret,mosip.regproc.client.secret) must be passed through the config-server's 'overrides' environment variables and should NOT be defined in property files. Refer to the config-server helm chart for more details. - If using application properties directly: Update these properties directly in your
application.propertiesoradmin-default.propertiesfile with your environment-specific values.
- Make sure the config server is running. For detailed instructions on setting up and running the config server, refer to the MOSIP Config Server Setup Guide.
Note: Refer to the MOSIP Config Server Setup Guide for setup, and ensure the properties mentioned above in the configuration section are taken care of. Replace the properties with your own configurations (e.g., DB credentials, IAM credentials, URL).
- Clone the repository:
git clone <repo-url>
cd admin-services
- Build the project:
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
-
Start the application:
- Click the Run button in your IDE, or
- Run via command:
java -jar target/specific-service:<$version>.jar
-
Verify Swagger is accessible at:
http://localhost:8080/v1/admin/swagger-ui/index.html
Recommended for users who want a quick, ready-to-use setup — testers, students, and external users.
Pull the latest pre-built images from Docker Hub using the following commands:
docker pull mosipid/admin-service:1.2.1.2
docker pull mosipid/kernel-masterdata-service:1.2.1.2
docker pull mosipid/kernel-syncdata-service:1.2.1.2
docker pull mosipid/hotlist-service:1.2.1.2
Recommended for contributors or developers who want to modify or build the services from source.
- Clone and build the project:
git clone <repo-url>
cd admin-services
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
- Navigate to each service directory and build the Docker image:
cd admin/<service-directory>
docker build -t <service-name> .
Start each service using Docker:
docker run -d -p <port>:<port> --name <service-name> <service-name>
Check that all containers are running:
docker ps
Access the services at http://localhost:<port> using the port mappings listed above.
To deploy Admin services on a Kubernetes cluster, refer to the Sandbox Deployment Guide.
For the complete Admin UI implementation and usage instructions, refer to the Admin UI GitHub repository.
For more detailed documents for repositories, you can check here.
API endpoints, base URL, and mock server details are available via Stoplight and Swagger documentation: MOSIP Admin Service API Documentation.
To learn more about admin services from a functional perspective and use case scenarios, refer to our main documentation: Click here.
Automated functional tests are available in the Functional Tests repository.
• To learn how you can contribute code to this application, click here.
• If you have questions or encounter issues, visit the MOSIP Community for support.
• For any GitHub issues: Report here
This project is licensed under the Mozilla Public License 2.0.