Skip to content

Added CA Certificate validity [MOSIP-43922]#759

Merged
ase-101 merged 2 commits intomosip:developfrom
GOKULRAJ136:cert-dev
Feb 3, 2026
Merged

Added CA Certificate validity [MOSIP-43922]#759
ase-101 merged 2 commits intomosip:developfrom
GOKULRAJ136:cert-dev

Conversation

@GOKULRAJ136
Copy link

@GOKULRAJ136 GOKULRAJ136 commented Jan 30, 2026

Summary by CodeRabbit

  • Chores
    • Updated database cryptographic algorithm configuration and added a global parameter to control partner certificate upload validity.
    • Introduced a new column to store CA certificate type and added corresponding rollback scripts.
    • Cleaned up obsolete/duplicated database script entries.

Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

Added and adjusted SQL migration scripts: updated symmetric crypto algorithm, introduced a new global parameter for CA certificate upload minimum validity, added/removed a CA_CERT_TYPE column in variant versioned scripts, and added corresponding rollback statements.

Changes

Cohort / File(s) Summary
Root initial
registration/registration-services/src/main/resources/initial.sql
Appended new GLOBAL_PARAM insert for mosip.kernel.partner.cacertificate.upload.minimumvalidity.month.
1.3.0 migrations
registration/registration-services/src/main/resources/sql/1.3.0/initial_db_scripts.sql, registration/registration-services/src/main/resources/sql/1.3.0/rollback_scripts.sql
Updated mosip.kernel.crypto.symmetric-algorithm-name to AES/GCM/NoPadding and merged/inserted the CA cert minimum-validity parameter; rollback reverts algorithm to AES/GCM/PKCS5Padding and deletes the new parameter row.
1.2.1 cleanup
registration/registration-services/src/main/resources/sql/1.2.1/initial_db_scripts.sql
Removed previously added UPDATE on crypto algorithm and an ALTER TABLE adding CA_CERT_TYPE (deletes those statements from this versioned script).
1.3.0-B2 migrations
registration/registration-services/src/main/resources/sql/1.3.0-B2/initial_db_scripts.sql, registration/registration-services/src/main/resources/sql/1.3.0-B2/rollback_scripts.sql
Added CA_CERT_TYPE VARCHAR(25) to REG.CA_CERT_STORE in the upgrade script and a rollback script that drops the CA_CERT_TYPE column.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble at scripts with a curious twitch,
Adding a param and swapping a cipher stitch,
Columns appear, then vanish with care,
Rollbacks ready — hope floats in the air!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes in the PR, which add CA certificate validity configuration (mosip.kernel.partner.cacertificate.upload.minimumvalidity.month parameter) and related database schema updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@registration/registration-services/src/main/resources/sql/1.3.0/rollback_scripts.sql`:
- Around line 3-5: The WHERE clause uses inconsistent column identifier casing:
change the lowercase identifier in the delete statement to match the quoted
uppercase column name used elsewhere; update the delete from
"REG"."GLOBAL_PARAM" WHERE
code='mosip.kernel.partner.cacertificate.upload.minimumvalidity.month' to use
the same quoted identifier form as the UPDATE (i.e., "CODE") so both statements
consistently reference "CODE".

Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
@ase-101 ase-101 merged commit 75db17e into mosip:develop Feb 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments