hyperledger / identus-edge-agent-sdk-ts

Apache License 2.0
20 stars 10 forks source link

fix(Castor): createPrismDID and resolveDID key id conflicts #243

Closed curtis-h closed 3 months ago

curtis-h commented 3 months ago

Description:

Multiple fixes around did resolution:

Bug1: Resolving a PrismDID was overwriting the key ids with our own value fix: src/castor/resolver/LongFormPrismDIDResolver.ts line 124 use the key.id instead of generating our own with getUsageId

Bug2: Creating a PrismDID with multiple issuing keys only encodes one, as the key ids conflict. fix: src/castor/Castor.ts line 146 create the id from both the usage and the index

Bug3: JWT verify required the encoded verification methods to be in order with the signing key first, otherwise would fail fix: attempt verification with all verification methods, as no way of determining which was used

Checklist:

github-actions[bot] commented 3 months ago
Lines Statements Branches Functions
Coverage: 75%
75.37% (2788/3699) 65.09% (1356/2083) 80.55% (721/895)

JUnit

Tests Skipped Failures Errors Time
504 6 :zzz: 0 :x: 0 :fire: 1m 20s :stopwatch: