Skip to content

Conversation

@Piyush7034
Copy link
Contributor

@Piyush7034 Piyush7034 commented Jan 29, 2026

  • [INJICERT-1277] Remove cache dependency from mdoc vc issuance

  • [INJICERT-1277] Remove unused injected dependencies

  • [INJICERT-1277] Fix nitpick comments


Summary by CodeRabbit

  • Refactor
    • Simplified internal architecture for mDOC issuance by streamlining credential generation flow.
    • Reduced infrastructure dependencies while maintaining existing functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

* [INJICERT-1277] Remove cache dependency from mdoc vc issuance

Signed-off-by: Piyush7034 <[email protected]>

* [INJICERT-1277] Remove unused injected dependencies

Signed-off-by: Piyush7034 <[email protected]>

* [INJICERT-1277] Fix nitpick comments

Signed-off-by: Piyush7034 <[email protected]>

---------

Signed-off-by: Piyush7034 <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Walkthrough

This PR removes key management and caching infrastructure from the MDocMockVCIssuancePlugin, simplifying credential issuance by deriving documentNumber directly from the identity claim's "sub" field instead of accessing external key stores and user info transactions.

Changes

Cohort / File(s) Summary
Service Implementation
mock-certify-plugin/src/main/java/io.mosip.certify.mock.integration/service/MDocMockVCIssuancePlugin.java
Removes CacheManager, KeyStore, KeymanagerDBHelper dependencies and related private constants. Refactors getVerifiableCredential to derive documentNumber from identityDetails.get("sub") with null validation, eliminating access token hash and getUserInfoTransaction flows.
Unit Tests
mock-certify-plugin/src/test/java/io/mosip/certify/mock/integration/service/MDocMockVCIssuancePluginTest.java
Removes mocks for CacheManager, KeyStore, KeymanagerDBHelper, Cache, and Key. Simplifies test setup and updates credential success test case to include "sub" in identityDetails; removes tests for private key management methods.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • digital-credential-plugins#139: Identical code-level changes to MDocMockVCIssuancePlugin.java, removing cache/key-management dependencies and replacing getUserInfoTransaction with identityDetails.get("sub").

Suggested reviewers

  • swatigoel

Poem

🐰 Hoppy times ahead, the keys we shed,
No more HSM locks to dread,
Just "sub" from claims, so simple and clean,
The simplest plugin we've ever seen!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: removing cache dependency from mdoc VC issuance, which aligns with the large refactoring that eliminates CacheManager, related caches, and dependencies.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@swatigoel swatigoel merged commit 5fede9b into inji:release-0.6.x Jan 29, 2026
14 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