[ES-2889] [ES-2890] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table#1645
[ES-2889] [ES-2890] Added enc_public_key_cert column to CREATE query for CLIENT_DETAIL table#16453 commits merged intomosip:developfrom
Conversation
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a nullable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
db_scripts/mosip_esignet/ddl/esignet-client_detail.sql (2)
30-30: Consider whethervarchar(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 atextcolumn 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 aCOMMENT ON COLUMNentry for the newenc_public_key_certcolumn.All other columns have a corresponding commented-out
COMMENT ON COLUMNblock, butenc_public_key_certis 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>
There was a problem hiding this comment.
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.
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
…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>
…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>
Summary by CodeRabbit
Infrastructure
Chores