The ID Repository is the backbone of the MOSIP identity platform, responsible for the secure storage and lifecycle management of foundational identity data. It serves as the authoritative source for identity records, handling operations such as identity creation, updates, and retrieval.
This repository contains source code and design documents for MOSIP ID Repository, which is the server-side module to manage ID lifecycle. The module provides a comprehensive set of REST APIs to interact with identity services, ensuring secure and standardized access to identity information.
- Identity Data: Storage and retrieval of demographic and biometric data.
- Credentials: Management and issuance of verifiable credentials.
- Virtual IDs (VID): Generation and management of revocable virtual tokens for privacy protection.
- Salt & Keys: Security foundations for identity data encryption and hashing.
The ID Repository contains the following services. For detailed code setup instructions for each service, please refer to their individual README files:
- Credential Service - Service for handling credentials.
- Identity Service - Service for identity management.
- VID Service - Service for Virtual ID management.
- Key Generator - Utility for generating salt/keys.
- Credential Request Generator - Generator for credential requests.
- Core - Core library and shared components.
The credential feeder has been moved to the mosip-utilities repository.
See DB guide for database setup and migration details.
The project requires:
- JDK: 21.0.3
- Maven: 3.9.6
- kernel-auth-adapter.jar needs to be added to the build path to run the services
- Biometric SDK: To run the Identity Service, a Biometric SDK implementation jar or Mock SDK needs to be added to the build path
- Set KUBECONFIG variable to point to existing K8 cluster kubeconfig file:
export KUBECONFIG=~/.kube/<k8s-cluster.config>
-
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 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 https://github.com/mosip/id-repository.git cd id-repository -
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 -Dspring.profiles.active=<profile> \ -Dspring.cloud.config.uri=<config-url> \ -Dspring.cloud.config.label=<config-label> \ -jar <jar-name>.jarExample:
- profile:
env(extension used on configuration property files) - config-label:
master(git branch of config repo) - config-url:
http://localhost:51000(URL of the config server)
-
Verify Swagger is accessible at:
http://localhost:<port>/v1/<service>/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/id-repository-identity-service:<version>
docker pull mosipid/id-repository-vid-service:<version>
docker pull mosipid/credential-service:<version>
docker pull mosipid/credential-request-generator:<version>
docker pull mosipid/id-repository-salt-generator:<version>
Recommended for contributors or developers who want to modify or build the services from source.
-
Clone and build the project:
git clone https://github.com/mosip/id-repository.git cd id-repository mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true -
Navigate to each service directory and build the Docker image:
cd id-repository/<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 for each service.
To deploy ID Repository services on a Kubernetes cluster, refer to the Sandbox Deployment Guide.
- Set KUBECONFIG variable to point to existing K8 cluster kubeconfig file:
export KUBECONFIG=~/.kube/<k8s-cluster.config>
cd deploy
./install.sh
cd deploy
./delete.sh
cd deploy
./restart.sh
Refer to the configuration guide.
API documentation is available here.
Automated functional tests are available in the Functional Tests repo.
• 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.