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

`versionId`/`versionTime` are not defined for DID resolution

Open letmaik opened this issue 4 years ago • 4 comments

https://w3c-ccg.github.io/did-resolution/#versioning says:

If a versionId or versionTime DID parameter is provided, the DID resolution algorithm returns a specific version of the DID document.

DID resolution is defined for a DID, not a DID URL, so the only place where such parameters could go is in the DID Resolution Input Metadata, but currently the only property defined there is accept.

Am I missing something?

letmaik avatar Jul 15 '21 08:07 letmaik

I think this specification implies that DID parameters can be used as DID Resolution Input Metadata properties (now called DID Resolution Options in DID Core), in https://w3c-ccg.github.io/did-resolution/#dereferencing-algorithm:

All DID parameters of the input DID URL MUST be passed as input metadata properties to the DID Resolution algorithm.

These properties/options are then passed to the DID method for a Read operation: https://w3c-ccg.github.io/did-resolution/#resolving-algorithm

3.1 Besides the input DID, all additional input metadata properties of this algorithm MUST be passed to the Read operation of the input DID method.

Maybe it would help to propose registering versionId and versionTime in https://www.w3.org/TR/did-spec-registries/ as DID Resolution Input Metadata properties (DID Resolution Options)?

clehner avatar Jul 23 '21 16:07 clehner

Hello, I agree with @clehner 's interpretation.. The intention is that versionId and versionTime can be passed as resolution options to the resolve() / resolveRepresentation() functions.

And yes the idea was also that if you dereference() a DID URL, then the DID parameters in the DID URL are passed as resolution options to the resolve() / resolveRepresentation() functions.

I just pushed some commits that harmonizes the language in this spec with DID Core (e.g. "input metadata properties" -> "resolution options").

peacekeeper avatar Aug 04 '21 13:08 peacekeeper

I wonder if we can address @clehner's proposal by adding a sentence to the DID Resolution Options - https://w3c.github.io/did-extensions/resolution/#did-resolution-options - that states something like.

Additionally, all DID URL Parameters are valid DID Resolution Options.

wip-abramson avatar Oct 08 '24 13:10 wip-abramson

I like this suggestion @wip-abramson

peacekeeper avatar Oct 08 '24 15:10 peacekeeper

Happy to submit a PR for this to DID extensions, if we are happy this is the direction to go in.

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

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

View the transcript

w3c/did-resolution#66

Wip: this is related to parameters as well
… things like version and time
… we might add this to extensions
… but there are questions about option use across all methods

markus_sabadello: I don't think this should be an extension
… this is already in use by a number of did methods
… there are use cases where you have `?version_id=` already
… there is already some text around version parameters and examples in the dereferencing algorithm section
… we just need to add a few things about what a dereferencer is supposed to do

Wip: I agree, but we don't list these properties in the did metadata section
… because they're listed in a different section

<Wip> https://w3c.github.io/did-extensions/resolution/#parameters

Wip: maybe I misread this
… some of those parameters are in the core spec, but we also list them in the extensions
… but in did resolution we list some, which are not in the extensions list

<Wip> https://w3c.github.io/did-extensions/resolution/#did-resolution-metadata

markus_sabadello: yeah, I think you're right
… we have some for URLs, but not for resolution

Wip: what I proposed was maybe not quite right
… I was proposing that they be equivalent spaces
… but some of these are only applicable for dereferencing

markus_sabadello: and the spec already says that
… but you could also just resolve the DID and pass the resolution options then

Wip: maybe that's the change?
… copying the version parameters across
… I'm happy to take on that change to DID extensions
… but markus_sabadello it seemed like there was more to explore here? and maybe we need other issues?

markus_sabadello: yes

Wip: I'll take the DID extensions bit on, but then we should come back to the TODOs in the specification


w3cbot avatar Jan 30 '25 17:01 w3cbot

I think a current summary of this issue is:

  • versionId and versionTime are already listed in the spec as DID Parameters, and there are multiple DID methods out there which use this feature: https://w3c.github.io/did-resolution/#did-parameters
  • There are placeholders in the DID URL Dereferencing algorithm that should be filled via Pull Requests to specify how a dereferencer handles these parameters: https://w3c.github.io/did-resolution/#dereferencing-algorithm
  • versionId and versionTime should also be added to DID Resolution Options here: https://w3c.github.io/did-resolution/#did-resolution-options

peacekeeper avatar Jan 30 '25 18:01 peacekeeper

  • There are placeholders in the DID URL Dereferencing algorithm that should be filled via Pull Requests to specify how a dereferencer handles these parameters: https://w3c.github.io/did-resolution/#dereferencing-algorithm

@peacekeeper not sure that dereferencing handles these parameters at all. Rather, these parameters are passed as resolution options to the resolve function and it is up to DID method specifications to define how these options are handled.

Not sure what we would put as the algorithm in the placeholders for these two parameters in the dereferencing algorithm.

wip-abramson avatar Feb 25 '25 16:02 wip-abramson

Closing, since PR https://github.com/w3c/did-resolution/pull/119 has been merged, which addresses this issue.

peacekeeper avatar Mar 14 '25 16:03 peacekeeper