Repository navigation
fix(did): accept legacy did:web documents without assertionMethod, temporarily - #50
Merged
Merged
Conversation
sumitvekariya
temporarily deployed
to
standalone-preview
October 24, 2026 05:58 — with
GitHub Actions
Inactive
sumitvekariya
temporarily deployed
to
standalone-preview
October 24, 2026 05:58 — with
GitHub Actions
Inactive
…mporarily Until 2026-06-30 the GAMI portal generated did:web documents without assertionMethod, with Ed25519VerificationKey2020 keys as bare publicKeyHex listed under authentication. Institutions still hosting such a document fail institutional_identity here, while the hosted verifier passes them under its legacy rule. Mirror that rule for did:web documents of exactly that shape: no assertionMethod at all, the record's key id listed under authentication, and a verificationMethod with that id holding exactly the record's embedded key as bare publicKeyHex. An assertionMethod that is present, even empty, keeps the strict rule. The result says the legacy rule was used. Remove it once the remaining institutions re-publish.
sumitvekariya
force-pushed
the
fix/legacy-did-web-documents
branch
from
October 24, 2026 06:02
f54b910 to
2f21241
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records signed by institutions that still host an older
did.jsonfail here:Until 2026-06-30 the GAMI portal generated
did:webdocuments withoutassertionMethod, withEd25519VerificationKey2020keys as barepublicKeyHexlisted underauthentication. The hosted verifier passes these records under its legacy rule (gami-appsrc/lib/did-resolve.ts,isAuthorizedForAssertion), so the CLI and the hosted verifier disagree on the same record.This PR copies that rule into the CLI as a temporary measure:
did:webdocuments that declare noassertionMethodat all. A presentassertionMethod, even an empty one, keeps the strict rule.authentication, and theverificationMethodwith that id must be anEd25519VerificationKey2020given as barepublicKeyHexholding exactly the record's embedded key. A matching id alone is not enough, any other key encoding fails, and the rule refuses to run without an embedded key.Removal: once the remaining institutions re-publish their DID documents from the portal, delete
isLegacyDocument,decodeLegacyKey,findLegacyMethodand thetemporary legacy ruletests.Checked:
pnpm compile,pnpm lint,pnpm formatandpnpm test(64/64, eight new). With live DID resolution, a record signed under such a document now passes all five checks; records from documents withassertionMethodare unchanged.Release note:
package.jsononmainsays 0.4.0, while npm has 0.4.1 and thev0.5.0tag points at a commit whosepackage.jsonsays 0.4.0. The release workflow's tag check would refuse that tag, which may be why 0.5.0 never reached npm. Releasing this needs a version bump onmainfirst.