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

Improve spec language around identity keys, resolution, gateways, and TLD #135

Merged
merged 8 commits into from
Mar 4, 2024

Conversation

decentralgabe
Copy link
Member

@decentralgabe decentralgabe commented Feb 27, 2024

A number of clarifying adjustments.

Also fix #130

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.26%. Comparing base (587d0b2) to head (141af54).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #135   +/-   ##
=======================================
  Coverage   73.26%   73.26%           
=======================================
  Files          17       17           
  Lines        1343     1343           
=======================================
  Hits          984      984           
  Misses        266      266           
  Partials       93       93           

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

spec/spec.md Outdated
relay or a [[ref:Gateway]].

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

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

a. Expand all identifiers to their fully-qualified form (e.g. `did:dht:uodqi99wuzxsz6yx445zxkp8ddwj9q54ocbcg8yifsqru45x63kj#0`
Copy link
Member Author

Choose a reason for hiding this comment

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

@frankhinek addressing #130 here

Choose a reason for hiding this comment

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

when this calls out "all identifiers", just so I understand, isn't only the Identity Key represented as "#0" or "0"? also this refers to verification methods, right? are there other parts of the did doc that could be represented as #xxx?

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean to say a DID Doc should always use fully qualified identifiers, regardless of the verification method id

it is confusing to handle #0 or #key-1 as opposed to did:dht:example#0 or did:dht:example#key-1

makes it tougher for implementations to handle some cases with fragments and others without

spec/spec.md Outdated

[[def:Identity Key]]
~ An [[ref:Ed25519]] public key encoded with [[ref:z-base-32]] used to uniquely identify a `did:dht` document.
~ An [Identity Key](#identity-key) is a [[ref:Ed25519]] public key encoded required to authenticate all records in

Choose a reason for hiding this comment

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

this reads weird. is a [[ref:Ed25519]] public key encoded required specifically. are you missing with [[ref:z-base-32]]`?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes good call out - thanks!

| _s1._did. | TXT | 7200 | id=dwn;t=DecentralizedWebNode;se=https://dwn.tbddev.org/dwn5 |
| Name | Type | TTL | Rdata |
| ------------ | ---- | ------ | ------------------------------------------------------------ |
| _did.`<ID>`. | TXT | 7200 | v=0;vm=k0,k1,k2;auth=k0;asm=k1;inv=k2;del=k2;srv=s0,s1,s2 |

Choose a reason for hiding this comment

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

yess. I was confused by this initially. seems obvious in hindsight, but it's good to have it be explicit

Entries to the [[ref:DHT]] require a signed record. As such, the keypair used for the [[ref:Pkarr]]
identifier is also used to sign the [[ref:DHT]] record. This keypair ****MUST**** always be present in a `did:dht` document
and is referred to as the [[ref:Identity Key]].
Entries to the [[ref:DHT]] require a signed record as per [[ref:BEP44]]. As such, the keypair used for the [[ref:Pkarr]]

Choose a reason for hiding this comment

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

really good to see this called out

spec/spec.md Outdated
relay or a [[ref:Gateway]].

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

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

a. Expand all identifiers to their fully-qualified form (e.g. `did:dht:uodqi99wuzxsz6yx445zxkp8ddwj9q54ocbcg8yifsqru45x63kj#0`

Choose a reason for hiding this comment

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

when this calls out "all identifiers", just so I understand, isn't only the Identity Key represented as "#0" or "0"? also this refers to verification methods, right? are there other parts of the did doc that could be represented as #xxx?

@decentralgabe decentralgabe merged commit 2241dd7 into main Mar 4, 2024
3 checks passed
@decentralgabe decentralgabe deleted the improve-spec-language branch March 4, 2024 18:37
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.

Add guidance for recommending fully qualified URIs for all properties, not just keys
4 participants