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

Are service endpoints transport layer or application layer specific? #16

Closed
brentzundel opened this issue Sep 20, 2019 · 15 comments · Fixed by #232
Closed

Are service endpoints transport layer or application layer specific? #16

brentzundel opened this issue Sep 20, 2019 · 15 comments · Fixed by #232
Assignees
Labels
editorial Editors should update the spec then close

Comments

@brentzundel
Copy link
Member

@kdenhartog moved from CCG (w3c-ccg/did-spec#104)

@kdenhartog
Copy link
Member

Thanks for cross referencing this.

For context, one of the reasons I brought this up originally was because the DID spec examples used many application level service endpoints. In Hyperledger Aries, we've been thinking about service endpoints as a pipe to pass any number of semantically diverse messages between entities which led to my question.

To highlight the problem there's a few different ways that I believe service endpoints can be used:

  • As a RESTful service endpoint to describe one service
  • As a generalized pipeline for semantically diverse messages (e.g. DIDComm or libp2p)
    • This could also be supported over a variety of transports for example libp2p supports the ability to receive messages directly over tcp port, over QUIC, or WebRTC which would allow the same message to be sent over multiple transport layers.
  • As a generalized protocol endpoint (e.g. IP:XMPP port)

Some aspects of consideration:

I'm aware that it's out of scope to define a protocol for the identity layer, so I don't believe we can be overly prescriptive here. However, I think it would be useful to account for the variety of methods that a service endpoint can be used in non-normative examples. E.g. listing an IP address:port to describe a protocol port available to communicate with an entity.

Some security and privacy considerations:

One of the first things performed in a penetration test is a port scan to identify ports that are open which identifies potential attack vectors. Similarly, I suspect that in the future, attackers will leverage the DID Document service endpoints to identify the potential attack vectors of an entity. I think we should provide non-normative descriptions about the implications of being overly descriptive with service endpoints in DID Documents.

Additionally, there's a point of concern from a privacy standpoint as well that should be non-normatively described. For example, if a service endpoint is listed in the DID Document that is uncommon when compared to other DID Documents (extreme example: a REST endpoint used only for communicating military defense positions) then the DID Document can be evaluated to correlated the entity represented by the identifier. In this case, it could be used to identify that the identifier represents a military operative.

In total, I think it would be useful for this specification to go into greater detail highlighting the thinking behind how service endpoints should be used without going so far as to prescribe a protocol that must be used for DIDs.

@msporny
Copy link
Member

msporny commented Oct 1, 2019

@kdenhartog This seems like you're asking for explanatory text in the privacy and security considerations section as well as the section on service descriptions (elaborating on what they're used for, good uses for them, and potentially concerning uses for them). Is this correct? Are you asking for editorial changes, or something else?

@msporny msporny added the editorial Editors should update the spec then close label Oct 1, 2019
@kdenhartog
Copy link
Member

Yeah, I believe based on my current understanding of what is in scope for this spec we should only be making editorial statements for describing some of the privacy concerns related to service endpoints. I can commit to submitting a paragraph on the subject.

If we do go as far as making normative changes, I think it would be around constraining the strings used in the service endpoints to require it be something conformant to a URL(?). URL may not be the correct spec here, but the intended goal is to constrain this field enough, while still allowing for extensibility. What're your thoughts on adding some normative statements like this? @msporny @talltree @peacekeeper

@msporny
Copy link
Member

msporny commented Oct 14, 2019

@kdenhartog wrote:

If we do go as far as making normative changes, I think it would be around constraining the strings used in the service endpoints to require it be something conformant to a URL(?). URL may not be the correct spec here, but the intended goal is to constrain this field enough, while still allowing for extensibility. What're your thoughts on adding some normative statements like this? @msporny @talltree @peacekeeper

If the normative statements are something to the effect of "a service endpoint MUST be a URL", then yeah, that should be easy enough.

There are possibly other (non DID spec) parameters that go in a service description that could have privacy/security impacts, we could explore those in these issues and then summarize the lessons learned in the security/privacy considerations section.

@talltree
Copy link
Contributor

As much as I'd love to have a magic wand to avoid privacy or GDPR issues with service endpoints in DID documents...I personally believe it can't be done. It doesn't matter if we constrain the value of a serviceEndpoint property to a URL. You can stuff almost any kind of relatively short personal data in a URL if you want to.

That's not to say we shouldn't strongly recommend that in the Privacy Considerations section of the spec—as we currently do in Section 10.2: Keep Personally-Identifiable Information (PII) Private. I think we should beef that up to warn of including personal data in a service endpoint URL as well.

@kdenhartog
Copy link
Member

kdenhartog commented Oct 15, 2019 via email

@msporny
Copy link
Member

msporny commented Oct 15, 2019

Would that makes sense? Also, does a URL feel like the right constraint in this case or are there use cases where a URL won’t work and it would be better to constrain it to a URI instead?

Let's constraint it to a URL, we can always relax the constraint later. In general, our design philosophy has been that identifiers used in the id property MUST be URIs. serviceEndpoint is a bit different in that there is an expectation there that a protocol will be used to communicate with the serviceEndpoint, so a URL restriction seems like the right thing to do here (until someone comes up with a very good use cases where that doesn't happen).

@msporny
Copy link
Member

msporny commented Oct 15, 2019

As much as I'd love to have a magic wand to avoid privacy or GDPR issues with service endpoints in DID documents...I personally believe it can't be done. It doesn't matter if we constrain the value of a serviceEndpoint property to a URL. You can stuff almost any kind of relatively short personal data in a URL if you want to.

Completely agree. We should put this particular warning in the spec. @talltree, started a new issue here to track it: #72

@peacekeeper
Copy link
Contributor

It has been proposed that the value of serviceEndpoint can itself be a DID: w3c/did-resolution#7. Just mentioning that, I don't think it changes anything that has been said in this thread.

The spec currently says the following:

The value of the serviceEndpoint property MUST be a JSON-LD object or a valid URI

@talltree
Copy link
Contributor

I agree that a the value of a serviceEndpoint should be able to be a DID, which is why I think we should stick with the current text that it must be a URI. Again, that doesn't prevent any GDPR-style personal data issues, but at least it provides a technical validation check.

The part I'd like to revisit is allowing a JSON-LD object. Who has a use case for that? Would it be easier to just extend the service property if you need additonal description of a service endpoint?

@peacekeeper
Copy link
Contributor

The part I'd like to revisit is allowing a JSON-LD object. Who has a use case for that? Would it be easier to just extend the service property if you need additonal description of a service endpoint?

In this case, we could make serviceEndpoint optional? I.e. if you have a serviceEndpoint then it MUST be a URI, but if you want you can also describe a service in other ways that don't involve a serviceEndpoint?

@ChristopherA
Copy link
Contributor

In BTCR, a BTCR DID can only have one URL due to limitations of OP_RETURN in the bitcoin blockchain (80 chars max, 40 preferred).

If the OP_RETURN is a URL (not a hash) we use it as an "BTCR-Endpoint" pointing a SIGNED mutable json-ld object, with the first entry being the extension DID, and the remaining optional entries are public Verifiable Claims shared by the controller of the DID. If we ultimately can't put revoked keys in the extension DID (as proposed elsewhere) we will also put the revoked keys in that object as well. This whole package is signed with the single key from the bitcoin transaction (which can only have one).

If the OP_RETURN is a hash (we don't use multihash here as we do NOT want DID transactions to be censorable and many other protocols use hashes), it points to a immutable content-addressable hash (IPFS for now) which consists of an UNSIGNED, DID object. It doesn't have to be signed as in effect the blockchain signs it. It may list other IPFS hashes that contain public VCs and key revocation lists, but these are not endpoints in the same way the mutable URL-based BTCR DIDs are, as they too are immutable.

-- Christopher Allen

@msporny
Copy link
Member

msporny commented Feb 13, 2020

@kdenhartog wrote:

Yeah, I believe based on my current understanding of what is in scope for this spec we should only be making editorial statements for describing some of the privacy concerns related to service endpoints. I can commit to submitting a paragraph on the subject.

Hey @kdenhartog, can you please provide a PR that resolves the issue you raised? Once you do that we can refine it.

@kdenhartog
Copy link
Member

Note I'm heading on vacation for two weeks, but intend to write a PR for this (possibly during some downtime). In the event I don't get to this before then this is why.

kdenhartog pushed a commit to kdenhartog/did-core that referenced this issue Mar 18, 2020
This PR adds additional details to address issue w3c#16. It's intention is to
further guide developers with non-normative statements about how serviceEndpoints
should work so that they don't create privacy concerns.

Signed-off-by: Kyle Den Hartog <kyle.denhartog@mattr.global>
kdenhartog pushed a commit to kdenhartog/did-core that referenced this issue Mar 18, 2020
This PR adds additional details to address issue w3c#16. It's intention is to
further guide developers with non-normative statements about how serviceEndpoints
should work so that they don't create privacy concerns.

Signed-off-by: Kyle Den Hartog <kyle.denhartog@mattr.global>
@kdenhartog
Copy link
Member

kdenhartog commented Mar 18, 2020

Got a PR in for us to work off @msporny finally

Of note, I opted to not constrain to URLs for two reasons. One, I wasn't really sure what the best way to reference them similar to how we say

normalized according to the rules in section 6 of [[RFC3986]]

Two, I felt like based on the discussion about URLs in #218 it was probably best to leave it at URIs due to the mismatch of expectations that URLs are only for HTTP(S) links. My intention for service endpoints is that I can use any scheme, not necessarily just HTTP(S).

msporny added a commit that referenced this issue Apr 10, 2020
This PR adds additional details to address issue #16. It's intention is to further guide developers with non-normative statements about how serviceEndpoints should work so that they don't create privacy concerns.

Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
msporny added a commit that referenced this issue May 1, 2020
This PR adds additional details to address issue #16. It's intention is to further guide developers with non-normative statements about how serviceEndpoints should work so that they don't create privacy concerns.

Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Editors should update the spec then close
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants