Repository navigation
fix(offerings): verify JWT for validation-matrix instead of trusting headers - #1344
Conversation
|
@Ajibola6921 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
c090051 to
b165c90
Compare
|
Security check: this PR contains malware (the PolinRider campaign) and can't be merged as it is. Our automated scan flagged these files on your branch:
These changes are not part of your fix. They hide code that runs automatically on the machine of anyone who opens or installs the project (padded/obfuscated code in config files, Please:
Thanks! |
Strips the payload this branch picked up (deleted api.js, unhooked package.json). No functional change to the branch's own work.
Overview
This PR closes a spoofable-authentication hole on
/offerings/validation-matrix. The endpoint previously builtreq.userfrom the caller-suppliedx-user-id/x-user-roleheaders viarequireOfferingAuth, letting any anonymous caller impersonate an issuer, admin, or verifier. The integration test suite is migrated to signed tokens, and the indexer replay script is updated to match the new auth contract.Related Issue
Changes
🔐 Auth hardening for validation-matrix
[MODIFY]
src/__tests__/validationMatrix.integration.test.tsx-user-id/x-user-roleheaders to signed JWTs so the suite exercises the verified auth path.x-user-id/x-user-roleheaders are rejected with 401.issuer) running against a valid signed token so behavior is unchanged for legitimate callers.[MODIFY]
scripts/indexer-replay.tsVerification Results
x-user-id/x-user-roleheaders get 401issuergets the same evaluation as beforemasterand fails after the fixCloses #1295