Skip to content

This repository contains services related to admin configurations, device registrations, etc. for MOSIP

License

Notifications You must be signed in to change notification settings

mosip/admin-services

Repository files navigation

MOSIP Admin Services

Maven Package upon a push Quality Gate Status

Overview

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.

Services

The Admin module contains the following services:

  1. Admin Service - Core administrative functionality
  2. Masterdata Service - Master data management
  3. Sync Data Service - Data synchronization
  4. Hotlist Service - Hotlist management

Database

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.

Local Setup

The project can be set up in two ways:

  1. Local Setup (for Development or Contribution)
  2. Local Setup with Docker (Easy Setup for Demos)

Prerequisites

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

Runtime Dependencies

  • Add kernel-auth-adapter.jar to the classpath, or include it as a Maven dependency — Download

Configuration

Required Configuration Properties

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 URL
  • mosip.kernel.keymanager.url - Key manager service URL
  • mosip.kernel.masterdata.url - Masterdata service URL
  • mosip.kernel.notification.url - Notification service URL
  • mosip.regproc.status.service.url - Registration processor status service URL
  • mosip.idrepo.identity.url - ID repository identity service URL
  • mosip.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.properties or admin-default.properties file with your environment-specific values.

Installation

Local Setup (for Development or Contribution)

  1. 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).

  1. Clone the repository:
git clone <repo-url>
cd admin-services
  1. Build the project:
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
  1. Start the application:

    • Click the Run button in your IDE, or
    • Run via command: java -jar target/specific-service:<$version>.jar
  2. Verify Swagger is accessible at: http://localhost:8080/v1/admin/swagger-ui/index.html

Local Setup with Docker (Easy Setup for Demos)

Option 1: Pull from Docker Hub

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

Option 2: Build Docker Images Locally

Recommended for contributors or developers who want to modify or build the services from source.

  1. Clone and build the project:
git clone <repo-url>
cd admin-services
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
  1. Navigate to each service directory and build the Docker image:
cd admin/<service-directory>
docker build -t <service-name> .

Running the Services

Start each service using Docker:

docker run -d -p <port>:<port> --name <service-name> <service-name>

Verify Installation

Check that all containers are running:

docker ps

Access the services at http://localhost:<port> using the port mappings listed above.

Deployment

Kubernetes

To deploy Admin services on a Kubernetes cluster, refer to the Sandbox Deployment Guide.

Usage

Admin UI

For the complete Admin UI implementation and usage instructions, refer to the Admin UI GitHub repository.

Documentation

For more detailed documents for repositories, you can check here.

API Documentation

API endpoints, base URL, and mock server details are available via Stoplight and Swagger documentation: MOSIP Admin Service API Documentation.

Product Documentation

To learn more about admin services from a functional perspective and use case scenarios, refer to our main documentation: Click here.

Testing

Automated functional tests are available in the Functional Tests repository.

Contribution & Community

• 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

License

This project is licensed under the Mozilla Public License 2.0.

About

This repository contains services related to admin configurations, device registrations, etc. for MOSIP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 70