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

Should "id" be mandatory for "service" and "publicKey"? #47

Closed
brentzundel opened this issue Sep 23, 2019 · 7 comments · Fixed by #66
Closed

Should "id" be mandatory for "service" and "publicKey"? #47

brentzundel opened this issue Sep 23, 2019 · 7 comments · Fixed by #66
Assignees
Labels
discuss Needs further discussion before a pull request can be created

Comments

@brentzundel
Copy link
Member

@peacekeeper moved from CCG (w3c-ccg/did-spec#247)

@msporny msporny added the discuss Needs further discussion before a pull request can be created label Oct 1, 2019
@dlongley
Copy link
Contributor

dlongley commented Oct 8, 2019

We should be careful not to bias expressing services based on whether or not people are using DID URLs to refer to them. Just because some services may benefit from being referenced via a DID URL, others may not -- and for those services, IDs may be an unnecessary burden.

@selfissued
Copy link
Contributor

The key ID should be expressed using the JWK "kid" field and not duplicated elsewhere.

@peacekeeper
Copy link
Contributor

My rationale for raising this PR were considerations around how DID methods work internally. There are some good opinions and usage patterns on the use of IDs (e.g. about fragment immutability - see w3c-ccg/did-spec#238), but ultimately it's up to the DID method how IDs work.

  • In some DID methods, the controller may be able to arbitrarily assign IDs inside the DID Document.
  • In some DID methods, the IDs may be deterministically set by the DID method (e.g. sequential numbers, content addresses, etc.)
  • And I believe there may also be DID methods that don't support IDs for services and public keys at all.

I think all of the above should be supported by the spec.

@dlongley
Copy link
Contributor

dlongley commented Oct 8, 2019

I agree with @peacekeeper and we should keep things as they are now (I believe IDs are presently optional) and just make sure the spec is clear on this matter. If it turns out that we have consensus from the group on this, then we should also close issue #46 once this issue is closed.

peacekeeper added a commit that referenced this issue Oct 9, 2019
@peacekeeper
Copy link
Contributor

(I believe IDs are presently optional)

No the spec says each public key and service endpoint MUST include id. I propose to change this, but I also think we should get some more input first (e.g. @dhh1128 probably has opinions on this).

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 10, 2019

I don't have a strong opinion about the issue in the broader context of all DID methods. However, id is required for updatable DID docs in the did:peer method, as it interacts with CRDT semantics to provide important guarantees.

@peacekeeper
Copy link
Contributor

The key ID should be expressed using the JWK "kid" field and not duplicated elsewhere.

@selfissued with regard to using JWK as a public key format (which may be a longer discussion, see #67), I believe making id in the current spec optional is a step towards alignment with JWK, since kid in JWK is also optional. Furthermore, it may be worth exploring adding a JSON-LD term called kid that maps to JSON-LD's @id, for even more alignment.

In any case, I think if we agree in principle that id/kid should be optional, then I think making this change now would also support the other discussion about public key formats?

msporny pushed a commit that referenced this issue Oct 19, 2019
* Make "id" optional for services and public keys.
* Change MAY to SHOULD for public keys.
* Change MAY to SHOULD for service endpoints.
* Say "multiple" instead of "duplicate" entries.
* Apply suggestion from @msporny.
* Add comment about producing an error.
* Address feedback at #66 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Needs further discussion before a pull request can be created
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants