Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cdcdd21
fix test case fail
nagendra0721 May 12, 2026
a9b985b
Merge branch 'mosip:develop' into develop
nagendra0721 Jun 2, 2026
95b7d04
MOSIP-42630:cutting of new branch from develop (#516)
nagendra0721 Jan 30, 2026
92d0451
MOSIP-42630:pom version update (#518)
nagendra0721 Jan 30, 2026
019b917
MOSIP-42630: Add exceptions to catch block in KeymanagerServiceImpl (…
nagendra0721 Feb 5, 2026
511d3a4
MOSIP-42630: log (#521)
nagendra0721 Feb 5, 2026
6d97243
MOSIP-42630: logs (#522)
nagendra0721 Feb 6, 2026
c14b7a6
MOSIP-42630: null pointer exception fix for cwt payload (#524)
nagendra0721 Feb 24, 2026
330fa35
INJICERT-1316: fix test case (#526)
nagendra0721 Feb 26, 2026
f6b9968
Release 1.4.x injicer1316 (#527)
nagendra0721 Feb 27, 2026
de4f837
[MOSIP-42630] corrected dependent pom versions. (#529)
mahammedtaheer Mar 23, 2026
23ce10f
[DSD-9987] inji-certify 0.14.0 release (#531)
ckm007 Mar 24, 2026
4b7f64b
Updated Pom versions for release changes (#532)
ckm007 Mar 24, 2026
16a323a
INJICERT-1316: update the db_upgrade_script files naming convetion to…
nagendra0721 Mar 24, 2026
1876a02
Updated Pom version and Chart version for post-release changes (#534)
ckm007 Mar 25, 2026
3e8a77f
#544: merge release-1.3.x branch to release-1.4.x branch (#543)
nagendra0721 Apr 22, 2026
0a99b3c
#544: add script to download auth adaptor (#545)
nagendra0721 Apr 29, 2026
c60b61e
Github issue 548 corrected version (#549)
kameshsr May 13, 2026
aab3ac9
Github issue-550 corrected helm resource
kameshsr May 13, 2026
b0b9f9d
Github issue 550 corrected tag
kameshsr May 13, 2026
8229329
MOSIP-44825: Added HSM interaction DEBUG logger (#546)
dhanendra06 May 18, 2026
eda6c72
add empty db script (#553)
nagendra0721 May 19, 2026
7bcbcfc
[DSD-10347] 1.3.1 Packet Processing Performance Tuning release (#566)
ckm007 May 31, 2026
17e7fc4
Merge branch 'develop' of https://github.com/nagendra0721/keymanager …
nagendra0721 Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=develop)](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=develop&project=mosip_keymanager&metric=alert_status)](https://sonarcloud.io/dashboard?branch=develop&id=mosip_keymanager)
[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push-trigger.yml/badge.svg?branch=release-1.4.x)](https://github.com/mosip/keymanager/actions/workflows/push-trigger.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.4.x&project=mosip_keymanager&metric=alert_status)](https://sonarcloud.io/dashboard?branch=release-1.4.x&id=mosip_keymanager)

# Key Manager

Expand All @@ -17,7 +17,7 @@ Reference: [Key Manager](https://docs.mosip.io/1.2.0/id-lifecycle-management/sup
- **Key Hierarchy**: Manages Root, Module, and Encryption/Decryption keys.

## Services
- **kernel-keymanager-service**: Core microservice that exposes REST APIs.
- **kernel-keymanager-service**: Core microservice that exposes REST APIs.
- **keys-generator**: Utility job used to generate the initial set of cryptographic keys required by MOSIP.
- **keys-migrator**: Utility tool used to securely migrate cryptographic keys between HSMs.

Expand All @@ -32,11 +32,11 @@ There are two ways to set up the Key Manager service locally:
- JDK 21 or higher
- Maven 3.9.x
- PostgreSQL 10 or higher
- SoftHSM or a compatible HSM
- SoftHSM, HSM, PKCS12(.p12) file or JCE
- Docker (for Docker-based setup)

## Database Setup
The Key Manager service requires a PostgreSQL database to store its data.
The Key Manager service requires a PostgreSQL database to store its data.
Follow the steps below to set up the database:

**Clone the Repository**
Expand All @@ -54,13 +54,13 @@ Follow the steps below to set up the database:
```

**Option 2: Manual Setup**
1. Create a database
Log into postgresql and create a database for the Key Manager service.
1. Create a database
Log into postgresql and create a database for the Key Manager service.
```sql
CREATE DATABASE mosip_keymgr;
```
2. Create a schema
Log into postgresql and create a schema for the Key Manager service.
2. Create a schema
Log into postgresql and create a schema for the Key Manager service.
```sql
CREATE SCHEMA keymgr;
```
Expand Down Expand Up @@ -110,8 +110,8 @@ The service configuration can be found in `kernel/kernel-keymanager-service/src/

4. **Verify and Interact**
Once the service is up and running, you can explore the APIs:
- **Swagger UI**: Access the interactive API documentation at [http://localhost:8088/v1/keymanager/swagger-ui/index.html#/](http://localhost:8088/v1/keymanager/swagger-ui/index.html#/)
- **Postman**: You can also import the collection and test the APIs using [Postman](https://www.postman.com/).
- **Swagger UI**: Access the interactive API documentation at [http://localhost:8088/v1/keymanager/swagger-ui/index.html#/](http://localhost:8088/v1/keymanager/swagger-ui/index.html#/)
- **Postman**: You can also import the collection and test the APIs using [Postman](https://www.postman.com/).

> **Note**: Keymanager relies on standard OAuth2/OIDC bearer token authentication. You may use MOSIP Auth Adaptor or any compatible OAuth2/OIDC provider to secure the REST APIs.

Expand All @@ -138,10 +138,10 @@ The service configuration can be found in `kernel/kernel-keymanager-service/src/
Scripts for deployment are available in the `deploy` directory.
### Pre-requisites
* Set KUBECONFIG variable to point to existing K8 cluster kubeconfig file:
* ```
* ```
export KUBECONFIG=~/.kube/<my-cluster.config>
```

### Install
```
$ cd deploy
Expand Down
9 changes: 8 additions & 1 deletion db_scripts/mosip_keymgr/ddl/keymgr-ca_cert_store.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ COMMENT ON COLUMN keymgr.ca_cert_store.is_deleted IS 'IS_Deleted : Flag to mark
COMMENT ON COLUMN keymgr.ca_cert_store.del_dtimes IS 'Deleted DateTimestamp : Date and Timestamp when the record is soft deleted with is_deleted=TRUE';
-- ddl-end --
COMMENT ON COLUMN keymgr.ca_cert_store.ca_cert_type IS 'CA Certificate Type : Indicates if the certificate is a ROOT or INTERMEDIATE CA certificate';
-- ddl-end --
-- ddl-end --

--PERFORMANCE INDEXES--
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_cr_dtimes ON keymgr.ca_cert_store USING btree (cr_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_del_dtimes ON keymgr.ca_cert_store USING btree (del_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_upd_dtimes ON keymgr.ca_cert_store USING btree (upd_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_times ON keymgr.ca_cert_store USING btree (cr_dtimes, upd_dtimes, del_dtimes);
--END PERFORMANCE INDEXES--
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Upgrade Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Upgrade Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
15 changes: 15 additions & 0 deletions db_upgrade_scripts/mosip_keymgr/sql/1.2.1.0_to_1.3.0_rollback.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Below script required to rollback from 1.3.0 to 1.3.0-B4
\c mosip_keymgr

COMMENT ON COLUMN keymgr.ca_cert_store.ca_cert_type
IS NULL;

-- Drop the ca_cert_type column (if it exists)
ALTER TABLE IF EXISTS keymgr.ca_cert_store
DROP COLUMN IF EXISTS ca_cert_type;

-- ROLLBACK FOR PERFORMANCE OPTIMIZATION INDEXES
DROP INDEX IF EXISTS keymgr.idx_ca_cert_store_cr_dtimes;
DROP INDEX IF EXISTS keymgr.idx_ca_cert_store_del_dtimes;
DROP INDEX IF EXISTS keymgr.idx_ca_cert_store_upd_dtimes;
DROP INDEX IF EXISTS keymgr.idx_ca_cert_times;
16 changes: 16 additions & 0 deletions db_upgrade_scripts/mosip_keymgr/sql/1.2.1.0_to_1.3.0_upgrade.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Below script required to upgrade from 1.3.0-B4 to 1.3.0
\c mosip_keymgr

ALTER TABLE IF EXISTS keymgr.ca_cert_store
ADD COLUMN ca_cert_type character varying(25);
Comment thread
nagendra0721 marked this conversation as resolved.

COMMENT ON COLUMN keymgr.ca_cert_store.ca_cert_type
IS 'CA_Certificate Type: Specifies the type of CA_Certificate e.g., Root, Intermediate';


--PERFORMANCE INDEXES--
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_cr_dtimes ON keymgr.ca_cert_store USING btree (cr_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_del_dtimes ON keymgr.ca_cert_store USING btree (del_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_store_upd_dtimes ON keymgr.ca_cert_store USING btree (upd_dtimes);
CREATE INDEX IF NOT EXISTS idx_ca_cert_times ON keymgr.ca_cert_store USING btree (cr_dtimes, upd_dtimes, del_dtimes);
--END PERFORMANCE INDEXES--
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Upgrade Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
Comment thread
nagendra0721 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Upgrade Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Rollback Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\echo 'Upgrade Queries not required for transition from $CURRENT_VERSION to $UPGRADE_VERSION'
7 changes: 0 additions & 7 deletions db_upgrade_scripts/mosip_keymgr/sql/ca_cert_table_update.sql

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/key-migration-utility/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then
fi

NS=key-migration-utility
CHART_VERSION=0.0.1-develop
CHART_VERSION=1.4.1-rc.1

echo Creating $NS namespace
kubectl create ns $NS
Expand Down
2 changes: 1 addition & 1 deletion deploy/keymanager/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then
fi

NS=keymanager
CHART_VERSION=0.0.1-develop
CHART_VERSION=1.4.1-rc.1

echo Creating $NS namespace
kubectl create ns $NS
Expand Down
2 changes: 1 addition & 1 deletion deploy/softhsm/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ $# -ge 1 ] ; then
fi

NS=softhsm
CHART_VERSION=0.0.1-develop
CHART_VERSION=1.4.1-rc.1

echo Create $NS namespaces
kubectl create ns $NS
Expand Down
2 changes: 1 addition & 1 deletion helm/key-migration-utility/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: key-migration-utility
description: A Helm chart to migrate keys from any keystore type to any other supported format.
type: application
version: 0.0.1-develop
version: 1.4.1-rc.1
appVersion: ""
dependencies:
- name: common
Expand Down
Loading
Loading