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
contexts: Remove terms not in DID Core Spec #170
Conversation
…ed in the DID Core specification
@rhiaro we spent a very long time trying to get blockchainAccountId defined in did core context... there are many things in did core context which are not defined in did core... which you have left in here, including verification methods. I agree with the intention of this PR, but it will have serious usability implications if applied equally. I think this warrants a call, perhaps only with folks who want to ensure JSON-LD representations are easy to use. |
Do you mean the types? Yes, that was an oversight, I was only thinking about the properties at the time. The alternative PR to this one would be to add a definition for It's clear we haven't really defined where the line is about what does and does not get to go into the Core context. Agreed we should probably have a JSON-LD people call about this in general. |
To be clear, while I think the cleanest option is for non-Core terms to be pulled in into DID-method specific (or domain-specific and shared, or whatever) contexts, I am also fine with the idea of having a "special" list of terms that are included in the Core context but defined elsewhere (eg. in the security vocab docs), so long as we write down explicitly what these special terms are and explain clearly what the criteria are for you to get your term added to the "special" list or why you can't. |
@rhiaro this conversation is one that must be had, thanks for kicking it off. See also w3c/vc-data-model#759 IMO we will need the following:
since changing from w3id.org -> w3.org will break any signatures over IRIs.... its worth noting changing where To put a finer point on it... anything with a w3id.org IRI is "not in the did core spec" :) |
strike this - Pulled in from another context - whatever, this is non-normative so we can do whatever makes sense from a purely JSON-LD perspective without the main spec worrying about that.
Again, all of the other terms (minus the verification method types) are defined in DID Core, in that there is a description of the term, what it's for, and what abstract constraints ("it must be a string" etc) are on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the solution to this is to add a PR to add blockchainAccountId
to did core, and I worry that removing publicKey
will yield a mountain of broken JSON-LD.
"keyAgreement": { | ||
"@id": "sec:keyAgreementMethod", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"publicKey": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this term is removed, all examples will need to include the sec context right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All examples that use publicKey
would, yes.
Again, I'm totally fine to keep this in if it's included on the "special" list, and we can define what that "special" list is and how things get added to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change would come as a shock to most JSON developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do JSON developers care?? They don't need @context
at all!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to invite incompatibility any more than we already have. My point is that this term is valid in JSON, and you are making it invalid in JSON-LD... without extension... IMO, not a helpful change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think noting that its only defined in security-vocab and warning that its deprecated is as far as we can go, without needlessly breaking a bunch of JSON that was valid for both JSON-LD and JSON before, and wouldn't be after this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the case where a technically JSON-LD implementation just glues the did/v1 context to the top but otherwise treats it as plain JSON, and uses publicKey
, and is not at all motivated to correct their now-faulty JSON-LD use because what they really want is plain JSON and to not have to care about this stuff, and are just using the @context
as a courtesy but if we try to make them add another line they're going to throw the toys out the pram?
That's fair enough. Valid case I think :)
BUT if JSON-LD implementers are completely prevented from making breaking changes to unstable (and stated as such) v1 context because of plain JSON developers, that's kind of rubbish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhiaro I 100% agree.... and would advise us to never publish an "unstable context" with a URL like "https://example.com/v1" ever again, because people will treat it as immutable.
its why we created https://w3id.org/security/v3-unstable and I push breaking change to it daily :)
Yeah I think we're having a bit of a miscommunication on what "defined in" means. I'm not talking about pulling terms in from other contexts at all when I say that. As a JSON-LD mechanism for aligning between different vocabs we do that. But my main concern with "defining" is which normative document (not a namespace doc, not a json-ld context, not a CG note, etc.) a term originates in
I thought the WG had agreed on |
@rhiaro I noticed activitystreams handles this differently.... https://www.w3.org/ns/did (broken) https://www.w3.org/ns/activitystreams (works) I would suggest did core should behave as follows: https://www.w3.org/ns/did (html) I could also live with: https://www.w3.org/ns/did (404) ^ however I find this generally "less usable" / friendly for developers. |
Happy with either of those. Agreed they're more sensible than what we have now. This is an adjacent conversation really, but since we're here (and this PR has definitely died a death).. I'd like to see both html and jsonld documents at
|
@rhiaro I would prefer
This is also how github pages handles things... https://identity.foundation/.well-known/did-configuration/v1 if both index.html and index.json are present, html / markdown takes precedent. https://stackoverflow.com/questions/39199042/serve-json-data-from-github-pages |
yeah that looks good to me. Note we wouldn't need to do the |
So it would be:
|
Yep! What remains is: what is the html? |
I am assuming it can't be: So it must be some new html we have never seen before... hosted in a repo that does not exist :) Perhapse we are missing: https://github.com/w3c/did-core-ns which hosts html and json and offers urls like: https://www.w3.org/ns/did/v1 on merges to main. |
Well, not necessarily. I don't see why we can't point it at either the spec or the registries. It depends what you want out of it really. If it should just be a fast-as-possible to scan list of terms, then we need something new. But if we don't have time or energy to create that something new (don't worry, I'll do it) then I don't think there's a good reason we can't just point it at the spec or the registries. Perhaps we could do so in the meantime, and see if anyone complains. I don't think we necessarily need another repo for it though. If it was a super simple static HTML page, and it was up to me, I'd stick it in this repo, in the |
@rhiaro I suggest we do it in this repo, and we ensure it will have github and w3 urls.... I can't help with the w3.org urls, but I can help with the github ones. I propose we create a folder structure and how that it works in github as a first step, then setup redirects after. |
Sounds good! The hard part is agreeing what goes in the files, the easy part is asking Ivan to put the right files on w3c servers :) (I can get started on this tomorrow - getting late in UTC - if you don't get to it first) |
The issue was discussed in a meeting on 2020-12-15
View the transcript2. DID Core vocabSee github issue #404. Brent Zundel: this was raised by ivan, folks have commented. Manu Sporny: ivan this is mostly, the question to you - what are the expectations here?.
See github pull request did-spec-registries#170. Orie Steele: I linked a PR. I had a conversation with amy related to this on the did spec registries. Ivan Herman: I was probably not clear in what I wrote, but manu, unfortunately, this is not what I meant. Manu Sporny: that is helpful, thanks ivan.
Ivan Herman: as I said I am perfectly fine to use cddl for that. If that's the way we do it, that's fine.. Manu Sporny: no. Ivan Herman: it should be. Jonathan Holt: the cddl spec itself is normative and it extends the abnf rules, it is a normative description of the constraints and type definitions.
Jonathan Holt: I think cddl tries to not boil the ocean in that way, it really is a constraint satisfaction which is mathematically proven. Michael Jones: I push back on the idea that rdf is necessary or even useful. Brent Zundel: if we could have those comments occur in the issues I think that would be best. |
My understanding is the only terms that should be in the DID Core context are terms which are normatively defined in the DID Core Specification.
I've removed
publicKey
as it was deprecated, andblockchainAccountId
because I haven't seen any intention of that going in DID Core (and it's currently defined in the security vocab, as linked in #166).I left
publicKeyJwk
andpublicKeyBase58
as I believe the intention is to get these defined in DID Core imminently.