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

JSON-LD Contexts in Registry #202

Closed
jricher opened this issue Feb 21, 2020 · 14 comments · Fixed by #362
Closed

JSON-LD Contexts in Registry #202

jricher opened this issue Feb 21, 2020 · 14 comments · Fixed by #362
Assignees
Labels
extensibility related to extensibility, json-ld contexts, external properties, etc pr-exists There is an open PR to address this issue

Comments

@jricher
Copy link
Contributor

jricher commented Feb 21, 2020

One of the discussed features of the DID property registry is that it would contain JSON-LD contexts for all defined properties. When producing a JSON-LD representation of a DID document, is it then permissible to include a value for the context that is not in the registry?

Note that local agreements can always allow whatever contexts they want, but for a globally interoperable DID document, I think we need to limit it to the contexts that are defined in the registry.

@rhiaro rhiaro added extensibility related to extensibility, json-ld contexts, external properties, etc question Further information is requested labels Feb 25, 2020
@OR13
Copy link
Contributor

OR13 commented Feb 25, 2020

related: w3c/did-spec-registries#3

@OR13
Copy link
Contributor

OR13 commented Mar 24, 2020

It is not permissible to include a property in a did document that has an @context that is not defined in one of the contexts listed... if you are having trouble getting a property into the did core registries, you should self host a context definition that makes what you are doing valid.

We have CI Tests for this in the did core registries now. Im not sure what to do with this issue.

@kdenhartog
Copy link
Member

I felt like the statement "Unknown object member names MUST be ignored as unknown properties. " accurately addressed this concern in section 8.2.2.

My interpretation of this was that, yes it's acceptable to include the values, but from a global point of view they should be ignored. If two parties choose to support a private party, then I would consider it acceptable but discouraged. Essentially treating it like private headers in JOSE.

Looks like the spec expects that we'll have additional details provided based on the discussion in #205 as well

@OR13
Copy link
Contributor

OR13 commented May 26, 2020

We're waiting for some html / structure updates to: https://github.com/w3c/did-spec-registries

We need to update the consumer language for JSON-LD.

@jricher
Copy link
Contributor Author

jricher commented May 26, 2020

I believe we need to update the consumer language for JSONLD in the Representations section to represent the behavior of the did-spec-registry for JSONLD contexts.

@rhiaro
Copy link
Member

rhiaro commented Jun 23, 2020

What language needs to be updated for JSON-LD consumers? Currently it says the value of @context must be one or more URIs. Do we need more than that? There is no restriction on what these URIs should be, nor is there any special behaviour related to the Registries, as far as I know.

@OR13
Copy link
Contributor

OR13 commented Jun 23, 2020

I'd say it should be recommended that the @context if present be an array, and that the first element be the latest published context url, for example: https://www.w3.org/ns/did/v1.

While there are no restrictions (and I think thats probably best), we should make sain default recommendations, that if followed will enable general interoperability... see also:

#55 (comment)

@rhiaro
Copy link
Member

rhiaro commented Jun 24, 2020

I'd say it should be recommended that the @context if present be an array, and that the first element be the latest published context url, for example: https://www.w3.org/ns/did/v1.

yes, spec already says that too

@msporny msporny assigned dlongley and jricher and unassigned jricher Jul 21, 2020
@dlongley
Copy link
Contributor

@jricher,

One of the discussed features of the DID property registry is that it would contain JSON-LD contexts for all defined properties. When producing a JSON-LD representation of a DID document, is it then permissible to include a value for the context that is not in the registry?

Note that local agreements can always allow whatever contexts they want, but for a globally interoperable DID document, I think we need to limit it to the contexts that are defined in the registry.

The short answer to the above is "yes, what you said": that contexts that are not in the registry should be permitted, but for a globally interoperable DID document, you must only reference contexts that are defined in the DID spec registries. I will try to figure out where to add language of this sort. Would that be sufficient to close out this issue -- and, @OR13, does this sound problematic to you for any reason? This issue sounds like it's not about properties within a context, but rather, the actual contexts that are referenced. Within a context, we can refer to the JSON-LD spec for what is valid.

@jricher -- you mentioned that we "need to account for producer / consumer language on the call today". Is something along the lines of the above heading in the right direction or did you want more details? If you want to wait to respond to concrete language, that's fine, just trying to ensure we're not missing something else that you were looking for.

@dlongley
Copy link
Contributor

The current text in the spec is:

The value of the @context property MUST be one or more URIs, where the value of the first URI is https://www.w3.org/ns/did/v1. All members of the @context property MUST exist be in the DID properties extension registry.

I agree with the first sentence and think we have consensus on it. The second sentence is what may need nuance for global interoperability. Perhaps something like:

All members of the @context property SHOULD exist in the DID properties extension registry in order to achieve interoperability across different representations. If a member does not exist in the DID properties extension registry, then the DID Document will not be interoperable across representations.

@jricher
Copy link
Contributor Author

jricher commented Jul 21, 2020

I am good with @dlongley 's proposed language here, adapted to both the producer and consumer sections of 6.2.

@OR13
Copy link
Contributor

OR13 commented Jul 28, 2020

@dlongley please raise a PR for this!

@kdenhartog kdenhartog added ready-for-PR Issue is ready for a PR and removed question Further information is requested labels Jul 28, 2020
@dlongley
Copy link
Contributor

See PR #362.

@kdenhartog kdenhartog added pr-exists There is an open PR to address this issue and removed ready-for-PR Issue is ready for a PR labels Jul 28, 2020
@dlongley
Copy link
Contributor

dlongley commented Sep 1, 2020

I will look into resolving the conflicts and looking at the comments on #362.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility related to extensibility, json-ld contexts, external properties, etc pr-exists There is an open PR to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants