Skip to content

#1937 Attribute name changed from individualbiometrics to photo, #1941 added missing grant on table pms.user_details, #1957 Added declaredAsDeceased attribute#1958

Open
chetankh239 wants to merge 9 commits into
mosip:developfrom
chetankh239:develop102
Open

#1937 Attribute name changed from individualbiometrics to photo, #1941 added missing grant on table pms.user_details, #1957 Added declaredAsDeceased attribute#1958
chetankh239 wants to merge 9 commits into
mosip:developfrom
chetankh239:develop102

Conversation

@chetankh239

@chetankh239 chetankh239 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

#1937 Attribute name changed from individualbiometrics to photo,
#1941 added missing grant on table pms.user_details,
#1957 Added declaredAsDeceased attribute

Summary by CodeRabbit

  • New Features
    • Added support for an additional CRVS shareable attribute in the default authentication policy.
    • Updated the related partner bioextract attribute configuration as part of the same policy change.
  • Bug Fixes
    • Improved database permissions for the user details table to ensure required access during upgrades.
  • Documentation
    • Updated rollback behavior to remove the attribute and revert the related bioextract configuration if needed.

…vidualbiometrics to photo, gave GRANT permission on table pms.user_details , Added declaredAsDeceased Attribute to Default Auth Policy for CRVS

Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chetankh239, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9887a96a-8837-4374-b839-8ef8a120e31b

📥 Commits

Reviewing files that changed from the base of the PR and between 280a843 and de6bca3.

📒 Files selected for processing (6)
  • db_scripts/mosip_pms/ddl/pms-partner_policy_bioextract_request.sql
  • db_scripts/mosip_pms/ddl/pms-partner_policy_credential_type_request.sql
  • db_upgrade_scripts/mosip_pms/sql/1.2.2.4_to_1.3.0-beta.1_upgrade.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.4_to_1.3.0-beta.5_upgrade.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql

Walkthrough

Three SQL scripts change: one adds table privileges on pms.user_details, one adds declaredAsDeceased to the mpolicy-default-auth policy JSON, and one rollback removes that attribute and restores the related policy row.

Changes

PMS DB SQL Patches

Layer / File(s) Summary
Privilege grants on pms.user_details
db_upgrade_scripts/mosip_pms/sql/1.2.1.0_to_1.2.2.0_upgrade.sql
Adds two GRANT statements: pmsuser receives SELECT, INSERT, TRUNCATE, REFERENCES, UPDATE, DELETE; postgres receives ALL on pms.user_details.
CRVS declaredAsDeceased attribute upgrade
db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql
Updates pms.auth_policy for mpolicy-default-auth to include declaredAsDeceased in policy_file_id JSON and refreshes audit fields.
CRVS declaredAsDeceased attribute rollback
db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql
Removes declaredAsDeceased from pms.auth_policy JSON, restores pms.partner_policy_bioextract.attribute_name, and refreshes audit fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ckm007

Poem

🐇 Hop, hop—SQL under the moon,
Grants and policies change in tune.
A decrypted paw? No, encrypted share,
Then rolled back neatly with bunny care.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: the attribute rename, missing grant, and added declaredAsDeceased policy update.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql`:
- Around line 36-40: The rollback update for pms.auth_policy is restoring an
incomplete policy document instead of the original pre-upgrade payload, so
mpolicy-default-auth remains altered after rollback. Update the SQL in the
rollback script’s UPDATE pms.auth_policy block to mirror the full canonical
policy_file_id exactly as it existed before the upgrade, including the missing
zone and preferredLang fields, while still removing only the declaredAsDeceased
change.

In `@db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql`:
- Around line 41-45: The UPDATE to pms.auth_policy is overwriting the canonical
mpolicy-default-auth payload instead of extending it, which drops existing
shareable attributes. In the auth policy upgrade block, rebuild the
policy_file_id value from the source payload used for mpolicy-default-auth and
include the missing zone and preferredLang fields along with the new
declaredAsDeceased attribute. Keep the change additive by updating only the
intended field set in the policy JSON and preserving the rest of the existing
structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95f064a2-b701-4c14-9edf-3c6d694c5cdb

📥 Commits

Reviewing files that changed from the base of the PR and between 8d9dc88 and f194176.

⛔ Files ignored due to path filters (3)
  • db_scripts/mosip_pms/dml/pms-auth_policy.csv is excluded by !**/*.csv
  • db_scripts/mosip_pms/dml/pms-auth_policy_h.csv is excluded by !**/*.csv
  • db_scripts/mosip_pms/dml/pms-partner_policy_bioextract.csv is excluded by !**/*.csv
📒 Files selected for processing (3)
  • db_upgrade_scripts/mosip_pms/sql/1.2.1.0_to_1.2.2.0_upgrade.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql

Comment thread db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql
Comment thread db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql`:
- Around line 47-51: The UPDATE in the upgrade script is targeting the
already-correct `partner_policy_bioextract` row for `id = '146098'`, so it does
not apply the intended contract change. Update the migration logic to modify the
row(s) whose `attribute_name` is still `individualBiometrics`, using the
`pms.partner_policy_bioextract` table and the existing `UPDATE` pattern with
`upd_by` and `upd_dtimes`, so the migration actually renames the persisted value
to `photo`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0c098ae3-0764-433f-9819-ef23ac6727bb

📥 Commits

Reviewing files that changed from the base of the PR and between f194176 and 280a843.

📒 Files selected for processing (2)
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql
🚧 Files skipped from review as they are similar to previous changes (1)
  • db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_rollback.sql

Comment thread db_upgrade_scripts/mosip_pms/sql/1.3.0-beta.5_to_1.3.0_upgrade.sql Outdated
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
@mayuradesh mayuradesh changed the title #1937, #1941, #1957 : Attribute name changed from individualbiometrics to photo, gave GRANT permission on table pms.user_details , Added declaredAsDeceased Attribute to Default Auth Policy for CRVS #1937 Attribute name changed from individualbiometrics to photo, #1941 added missing grant on table pms.user_details, #1957 Added declaredAsDeceased attribute Jul 1, 2026
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
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.

1 participant