Skip to content

Conversation

@bdesoky
Copy link
Contributor

@bdesoky bdesoky commented Oct 31, 2025

Ticket: ANT-1086

Description

In bitgo-ui, auth-service, and WP, the original url from x-original-uri is used for hmac calculation with no url parsing. The url parsing typically produces the same url except in some edge cases where there is a trailing ?. This has resulted in hmac mismatch when switching the hmac calculation to use sdk-hmac in these services.

To ensure existing client flows don't break, this PR adds a useOriginalPath parameter to calculateHMACSubject which will use the url passed to calculateHMACSubject with no parsing if it is true. The default value of this parameter is false, so as not to break existing sdk flows. In the above services, I will set it to true.

Issue Number

ANT-1086

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments
  • I have commented my code, particularly in hard-to-understand areas
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have made corresponding changes to the documentation and on any new/updated functions and/or methods - jsdoc
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@bdesoky bdesoky requested review from a team as code owners October 31, 2025 15:38
@bdesoky bdesoky merged commit 3c43f46 into master Oct 31, 2025
13 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.

5 participants