Skip to content

fix(IT Wallet): [SIW-2981] Request mDL credentials sequentially to bypass async issuance problems#7366

Merged
gispada merged 4 commits into
masterfrom
SIW-2981-fix-mdl-issuance
Sep 17, 2025
Merged

fix(IT Wallet): [SIW-2981] Request mDL credentials sequentially to bypass async issuance problems#7366
gispada merged 4 commits into
masterfrom
SIW-2981-fix-mdl-issuance

Conversation

@gispada

@gispada gispada commented Sep 17, 2025

Copy link
Copy Markdown
Collaborator

Short description

This PR refactors the issuance flow for the mDL specifically to fix a problem introduced by an attempt to bypass failures when requesting both the SD-JWT and mDoc formats in the async flow.

The proposed changes request the mDL sequentially: first the SD-JWT without the reissuance header, then—if successfull—the mDoc with the reissuance header.

List of changes proposed in this pull request

  • Removed reissuing header from the issuance flow
  • Extracted the code to obtain and parse a credential into requestAndParseCredential for better reuse
  • Added a temporary conditional block in obtainCredential with a custom logic for mDL issuance

How to test

With L3:

  • Request the mDL
    • Ensure you first get a 201
    • Ensure the next issuance requests the SD-JWT first without reissuing, then the mDoc with reissuing
  • Request another credential and check for regressions

Without L3:

  • Request the mDL
    • Ensure you first get a 201
    • Ensure the next issuance only requests the SD-JWT first without reissuing
  • Request another credential and check for regressions
  • Upgrade to L3 and ensure the mDL is requested with reissuing

@github-actions

Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions

github-actions Bot commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov

codecov Bot commented Sep 17, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.82353% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.89%. Comparing base (6cb0af6) to head (b269bfd).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...twallet/common/utils/itwCredentialIssuanceUtils.ts 6.06% 31 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7366      +/-   ##
==========================================
- Coverage   58.93%   58.89%   -0.04%     
==========================================
  Files        1799     1799              
  Lines       38775    38799      +24     
  Branches     8789     8862      +73     
==========================================
+ Hits        22851    22852       +1     
- Misses      15852    15863      +11     
- Partials       72       84      +12     
Files with missing lines Coverage Δ
ts/features/itwallet/machine/credential/machine.ts 94.11% <100.00%> (+4.64%) ⬆️
...twallet/common/utils/itwCredentialIssuanceUtils.ts 8.62% <6.06%> (-0.76%) ⬇️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cb0af6...b269bfd. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gispada gispada changed the title fix(IT Wallet): Request mDL credentials sequentially to bypass async issuance problems fix(IT Wallet): [SIW-2981] Request mDL credentials sequentially to bypass async issuance problems Sep 17, 2025

@ale-mazz ale-mazz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested as requested and LGTM.
However, given the sensitivity of the code involved, I strongly recommend waiting for additional approval before merging.

@RiccardoMolinari95 RiccardoMolinari95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gispada gispada enabled auto-merge September 17, 2025 15:26
@gispada gispada added this pull request to the merge queue Sep 17, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 17, 2025
@gispada gispada added this pull request to the merge queue Sep 17, 2025
Merged via the queue into master with commit 4c410b4 Sep 17, 2025
27 checks passed
@gispada gispada deleted the SIW-2981-fix-mdl-issuance branch September 17, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants