did-resolution icon indicating copy to clipboard operation
did-resolution copied to clipboard

Select top-level properties from Resolver

Open BernhardFuchs opened this issue 5 years ago • 1 comments

Did resolvers can return a number of properties in addition to the didDocument. The Universal Resolver hosted by DIF returns e.g.:

  • didDocument
  • resolverMetadata
  • methodMetadata
  • content
  • contentType

Atm there is no standardized way to selectively include/exclude those top-level properties. Depending on the use case or available resources this could be a useful feature.

It could be implemented by introducing a query parameter e.g.

# include for whitelisting properties
?include=didDocument,resolverMetadata,contentType

# exclude for blacklisting properties
?exclude=didDocument,methodMetadata

The reasoning of making the didDocument also configurable are use cases where the interest are details about e.g. the used resolver or method.

BernhardFuchs avatar Nov 26 '20 10:11 BernhardFuchs

Coming back to this issue.. In the section on HTTP(S) Binding, it is possible to either retrieve just the DID document, or the full DID resolution result (DID document + metadata), by using the HTTP "Accept" header to request a certain media type: https://w3c.github.io/did-resolution/#bindings-https

It would definitely also be possible to introduce one or more DID resolution options that allow more fine-grained selection of what should be returned. Not sure though if there is enough demand for such a feature though.

peacekeeper avatar Aug 29 '24 14:08 peacekeeper

I agree with @peacekeeper.

There is nothing to stop specific DID resolver implementations/services providing these sorts of capabilities in a custom manner if they are desired. I don't know if it is worth standardising them in this specification.

wip-abramson avatar Dec 12 '24 15:12 wip-abramson

@BernhardFuchs do you think it makes sense to standardize this, or can we close this issue here (but potentially still support such a feature in specific implementations)?

peacekeeper avatar Dec 12 '24 18:12 peacekeeper

This was discussed during the #did meeting on 30 January 2025.

View the transcript

w3c/did-resolution#59

Wip: k. we have 2 more

Wip: I believe this issue is around asking that one only wants certain things back
… do you want all or some of the metadata, etc.

markus_sabadello: this is about getting a result
… do you want the document and the metadata or just the document?
… to some extent this is possible already
… you can do this with Accept headers and content negotiation
… you could get just the DID document or also include the metadata
… I had a conversation earlier around linked resources
… situations where you can reference images, etc.
… is there a way to just return the content? or just the metadata? or both?
… and what would be the mechanisms for doing that?
… the way it is right now with media types seems straightforward
… I asked a coworker to post about this if it was still needed

<Zakim> JoeAndrieu, you wanted to say this is dereferencing, not resolution

markus_sabadello: so maybe we wait for that comment

Wip: and we can mark it pending closed

JoeAndrieu: it seems to me that resolution would always be the whole document
… and in dereferencing you could use a subset

Wip: I think this is slightly different because of the metadata

JoeAndrieu: yes, but you never get back a subset of the did document

Wip: right. I don't think that is what this issue is asking for
… either way JoeAndrieu you sound aligned with this pending closed plan

JoeAndrieu: yeah. I was imagining this was something else

Wip: markus_sabadello maybe you can talk to the other person about providing more detail?

markus_sabadello: yes


w3cbot avatar Jan 30 '25 17:01 w3cbot

@BernhardFuchs Could you comment here if you still think this should be part of the DID Resolution spec? If not, we'll mark this as pending-close.

peacekeeper avatar Jan 30 '25 17:01 peacekeeper

After checking back with @peacekeeper I agree that this doesn't have to be in the specification itself. The feature can be supported in a future extension, if needed.

BernhardFuchs avatar Jan 31 '25 08:01 BernhardFuchs