hyperledger / indy-did-method

Indy DID Method Specification
https://hyperledger.github.io/indy-did-method/
Creative Commons Attribution 4.0 International
18 stars 14 forks source link

Prefix AnonCred object identifiers for cross-ledger compat #32

Closed dbluhm closed 2 years ago

dbluhm commented 2 years ago

On a recent Indy Contributors call, it was briefly discussed that instead of <did>/<object-type>/<object-type-identifier>, something like <did>/anoncreds/v1/<object-type>/<object-type-identifier> would be more compatible with anchoring AnonCreds objects on ledgers not based on Indy. I agree that this format would indeed be helpful as we look forward to AnonCreds as an independent standard.

From what I recall, there were not any dissenting views expressed on the call on this but figured it would be appropriate to open an issue to allow anyone who wasn't on the call to share their thoughts.

swcurran commented 2 years ago

For homework between now and this Tuesday's Indy Contributors call (8AM Pacific, 5PM CET), it would be good to look into the more general question from three angles:

@peacekeeper, @talltree and other DID gurus -- it would be great to get your perspectives on this.

peacekeeper commented 2 years ago

<did>/anoncreds/v1/<object-type>/<object-type-identifier> looks good to me!

should it be a DIDDoc with the object embedded?

While you could do that, I don't think it's a good idea. You should just return the object itself, with an appropriate media type. What you're doing is strictly speaking not DID Resolution, but DID URL Dereferencing, which can return anything you want: https://www.w3.org/TR/did-core/#did-url-dereferencing

Would common DID Methods be able to support this?

Each DID Method would have to define separately how they can support dereferencing of such DID URLs. For some DID methods it would probably be easy to define that (e.g. for did:web), while for others it would be harder (e.g. for did:btcr).

talltree commented 2 years ago

I agree with @peacekeeper that if the DID URL uses a path in order to reference a digital object, then it should just return the native digital object with an appropriate media type.

If you want 100% interoperability across DID methods, i.e., the same behavior across all of them, I'd recommend using the resource parameter as defined by the DID URL Resource Parameter Specification. If you specify that, each DID method that wants to support the functionality of returning a native digital object directly can internally implement that functionality its own way, and the result will always be the same (direct return of a file with the requested media type) just as the resolution of a plain DID will always return a DID doc.

swcurran commented 2 years ago

This was discussed at the Indy Contributors call on 2022.02.01. Agreements: