Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for setting custom Verification Method IDs #226

Merged
merged 4 commits into from
May 24, 2024
Merged

Conversation

decentralgabe
Copy link
Member

@decentralgabe decentralgabe commented May 23, 2024

Fix #224

  • Allow for setting custom VM IDs (though recommended not to)
  • Enforce VM ID (unqualified) always == JWK KID

Also:

  • Improve language around encoding keys (thanks @diehuxx)
  • Improve language around custom properties in services (thanks @diehuxx)
  • Update test vector 2 to support a custom VM ID
  • Fixed a bug in test vector 3 around the previous record (thanks @thehenrytsai)
  • Minor formatting / consistency and language adjustments
  • Updated corresponding implementation code

@decentralgabe decentralgabe changed the title tmp Allow for setting custom Verification Method IDs May 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

Attention: Patch coverage is 75.67568% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 51.91%. Comparing base (d75d672) to head (3dea591).

Files Patch % Lines
impl/internal/did/did.go 75.67% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
+ Coverage   51.59%   51.91%   +0.32%     
==========================================
  Files          32       32              
  Lines        2791     2816      +25     
==========================================
+ Hits         1440     1462      +22     
- Misses       1205     1207       +2     
- Partials      146      147       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@decentralgabe decentralgabe marked this pull request as ready for review May 23, 2024 05:03
@@ -337,18 +338,25 @@ as a `_kN._did.` record where `N` is the zero-indexed positional index of a give
indicating a Text record.

- Each [Verification Method](https://www.w3.org/TR/did-core/#verification-methods) record's **rdata** is represented by the form
Copy link
Member Author

Choose a reason for hiding this comment

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

interesting bits here

@@ -538,14 +548,19 @@ To read a `did:dht` document, the process is as follows:

2. Decode the resulting [[ref:BEP44]] response's `v` value using [[ref:bencode]].

3. Uncompress the DNS packet according to [[spec:RFC1035]] section 4.1.4.
3. Uncompress the DNS packet according to [[spec:RFC1035]] [section 4.1.4](https://datatracker.ietf.org/doc/html/rfc1035#section-4.1.4).

4. Reverse the DNS [property mapping](#property-mapping) process and re-construct a conformant [[ref:DID Document]].

a. Identify the [[ref:Identity Key]] using the [[ref:suffix]] of the `did:dht` identifier, with record name `_k0._did`,
Copy link
Member Author

Choose a reason for hiding this comment

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

and here

@decentralgabe decentralgabe merged commit e120703 into main May 24, 2024
11 of 12 checks passed
@decentralgabe decentralgabe deleted the spec-fixes branch May 24, 2024 15:28
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.

Handling key references within the DID Document
2 participants