Skip to content

[ES-2889] [ES-2890] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table#1645

Merged
3 commits merged intomosip:developfrom
Infosys:ES-2889
Mar 20, 2026
Merged

[ES-2889] [ES-2890] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table#1645
3 commits merged intomosip:developfrom
Infosys:ES-2889

Conversation

@Md-Humair-KK
Copy link
Copy Markdown
Contributor

@Md-Humair-KK Md-Humair-KK commented Feb 19, 2026

Summary by CodeRabbit

  • Infrastructure

    • Database schema updated to add a nullable field to store client encryption public key certificates, enabling support for crypto-manager certificate usage; migration required.
  • Chores

    • Minor repository metadata formatting fix (trailing newline) to ensure clean file formatting.

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 312c2141-4eb1-44e6-8580-4542de96f25c

📥 Commits

Reviewing files that changed from the base of the PR and between fd17f02 and 14de5a6.

📒 Files selected for processing (1)
  • db_scripts/mosip_esignet/ddl/esignet-client_detail.sql
🚧 Files skipped from review as they are similar to previous changes (1)
  • db_scripts/mosip_esignet/ddl/esignet-client_detail.sql

Walkthrough

Adds a nullable enc_public_key_cert (varchar(4000)) column to the client_detail table and appends a trailing newline to db_upgrade_script/mosip_esignet/upgrade.properties; no other functional changes.

Changes

Cohort / File(s) Summary
Database Schema
db_scripts/mosip_esignet/ddl/esignet-client_detail.sql
Added nullable column enc_public_key_cert varchar(4000) after enc_public_key_hash; added/updated column comments for enc_public_key, enc_public_key_hash, and enc_public_key_cert.
Upgrade Properties
db_upgrade_script/mosip_esignet/upgrade.properties
Appended a trailing newline at end-of-file; no key/value changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • zesu22
  • ase-101

Poem

🐰 I hopped a tiny column in,

a cert to rest where hashes spin,
a newline tucked, all tidy, trim,
now keys and certs can sit with vim. 🥕

🚥 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 and specifically describes the main change: adding an enc_public_key_cert column to the CLIENT_DETAIL table's CREATE query.
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
📝 Coding Plan
  • Generate coding plan for human review comments

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
Copy Markdown

@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.

🧹 Nitpick comments (2)
db_scripts/mosip_esignet/ddl/esignet-client_detail.sql (2)

30-30: Consider whether varchar(4000) is sufficient for all supported certificate types.

A PEM-encoded RSA-4096 certificate can reach ~3,400–3,600 characters; 4000 may be uncomfortably close to the limit, and certificates with long Subject/SAN fields or additional extensions can exceed it. If RSA-4096 or similar large-key certs are in scope, bumping to varchar(8192) (or using a text column if the DBMS allows it for this table) would provide safe headroom without meaningful storage cost.

🔧 Proposed adjustment
-	enc_public_key_cert varchar(4000),
+	enc_public_key_cert varchar(8192),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@db_scripts/mosip_esignet/ddl/esignet-client_detail.sql` at line 30, The
column enc_public_key_cert currently defined as enc_public_key_cert
varchar(4000) may be too small for large PEM certificates; update its type to a
larger capacity (e.g., varchar(8192) or TEXT depending on DBMS) in the table DDL
so it can safely store RSA-4096 and certificates with long fields/extensions,
and run/confirm any migration scripts for the table and related DB clients to
handle the new size; ensure constraints/indexes referencing enc_public_key_cert
(if any) are reviewed and adjusted accordingly.

41-55: Add a COMMENT ON COLUMN entry for the new enc_public_key_cert column.

All other columns have a corresponding commented-out COMMENT ON COLUMN block, but enc_public_key_cert is missing one. Keeping the comments consistent aids future maintainers.

📝 Proposed addition
 -- COMMENT ON COLUMN client_detail.public_key_hash IS 'Public key hash: SHA-256 hash of some fields of the public key for unique public key check.';
+-- COMMENT ON COLUMN client_detail.enc_public_key_cert IS 'Encryption Public Key Certificate: PEM-encoded X.509 certificate containing the encryption public key.';
 -- COMMENT ON COLUMN client_detail.grant_types IS 'Grant Types: Allowed grant types for the client, comma separated string.';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@db_scripts/mosip_esignet/ddl/esignet-client_detail.sql` around lines 41 - 55,
The file is missing a COMMENT ON COLUMN entry for the new enc_public_key_cert
column in the client_detail table; add a commented-out line similar to the
others: include "COMMENT ON COLUMN client_detail.enc_public_key_cert IS '<short
description>'." Use a concise description matching the style of other comments
(e.g., "Encrypted public key certificate: Base64 or PEM encoded client
certificate used for encryption.") so the enc_public_key_cert column has a
corresponding comment block alongside the rest of client_detail's columns.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@db_scripts/mosip_esignet/ddl/esignet-client_detail.sql`:
- Line 30: The column enc_public_key_cert currently defined as
enc_public_key_cert varchar(4000) may be too small for large PEM certificates;
update its type to a larger capacity (e.g., varchar(8192) or TEXT depending on
DBMS) in the table DDL so it can safely store RSA-4096 and certificates with
long fields/extensions, and run/confirm any migration scripts for the table and
related DB clients to handle the new size; ensure constraints/indexes
referencing enc_public_key_cert (if any) are reviewed and adjusted accordingly.
- Around line 41-55: The file is missing a COMMENT ON COLUMN entry for the new
enc_public_key_cert column in the client_detail table; add a commented-out line
similar to the others: include "COMMENT ON COLUMN
client_detail.enc_public_key_cert IS '<short description>'." Use a concise
description matching the style of other comments (e.g., "Encrypted public key
certificate: Base64 or PEM encoded client certificate used for encryption.") so
the enc_public_key_cert column has a corresponding comment block alongside the
rest of client_detail's columns.

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@db_upgrade_script/mosip_esignet/upgrade.properties`:
- Line 12: The UPGRADE_VERSION property is empty but must be set to a new
migration identifier because this PR adds a schema change (enc_public_key_cert
column); update the UPGRADE_VERSION key in upgrade.properties to the appropriate
next version/migration id used by your upgrade runner (e.g., follow the
project's semantic versioning or migration sequence) so the upgrade will be
detected and recorded, and ensure this matches any migration metadata or
changelog entries referencing the enc_public_key_cert column.

Comment thread db_upgrade_script/mosip_esignet/upgrade.properties
@Md-Humair-KK Md-Humair-KK changed the title [ES-2889] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table [ES-2889] [ES-2890] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table Feb 20, 2026
Copy link
Copy Markdown
Contributor

@zesu22 zesu22 left a comment

Choose a reason for hiding this comment

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

ok

Signed-off-by: Sachin Rana <sacrana324@gmail.com>
@ghost ghost merged commit b4169d9 into mosip:develop Mar 20, 2026
27 of 28 checks passed
sacrana0 added a commit to Infosys/esignet that referenced this pull request Mar 20, 2026
…for CLIENT_DETAIL table (mosip#1645)

* Added enc_public_key_cert

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>

* added one extra line at the EOF

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>

* added comments for the new columns

Signed-off-by: Sachin Rana <sacrana324@gmail.com>

---------

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Co-authored-by: Sachin Rana <sacrana324@gmail.com>
zesu22 pushed a commit that referenced this pull request Mar 20, 2026
…for CLIENT_DETAIL table (#1645) (#1679)

* Added enc_public_key_cert



* added one extra line at the EOF



* added comments for the new columns



---------

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Co-authored-by: Md Humair Kankudti <mdhumair.kankudti@gmail.com>
This pull request was closed.
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.

3 participants