-
Notifications
You must be signed in to change notification settings - Fork 112
Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? #929
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
Comments
First attempt at getting things started... The core data model should be RDF, but serialized using a profile of JSON-LD that is idiomatic JSON. This should be a contextualized, compact form that could be easily checked against a JSON schema and then consumed by JSON developers that are otherwise unfamiliar with JSON-LD. |
What would be the requirement for RDF from a data model perspective, I don't see anything in the data model that would require RDF |
The data model today is essentially subject-property-value statements -- and containers / wrappers around those statements (aka "graphs"). This is essentially RDF so we should just reuse it, it's a standard (if this buys us having to write some text). |
A cut at some language that might provide some clarity around what "JSON-LD compatible JSON" means. The Verifiable Credentials Data Model is "JSON-LD compatible JSON", which means the following:
In order to make development easier for developers coming from a JSON background, we might consider:
The above makes the data model crystal clear, is compatible with all known JSON-LD processors, helps developers coming from a purely JSON background to get started quickly, and retains JSON-only processing modes that are compatible with JSON-LD. Some concrete proposals that we could put in front of the group are: PROPOSAL: Verifiable Credentials MUST utilize the PROPOSAL: Verifiable Credentials SHOULD NOT utilize inline JSON-LD Contexts (objects as values) for the PROPOSAL: Verifiable Credentials MUST be expressed in JSON-LD Compact form. PROPOSAL: The underlying data model for Verifiable Credentials is JSON-LD. And the proposals to help make development easier for developers coming from a JSON background: PROPOSAL: As an initial iteration on the idea, the Verifiable Credentials specification will define an "experimental" JSON-LD Context ( PROPOSAL: A conforming processor SHOULD raise an error if a VC utilizes the /cc @OR13 @tplooker @mprorock @peacekeeper @philarcher @mkhraisha @dlongley @brentzundel @Sakurann |
@msporny Thank you for taking the time to write this up!
-1 to this guidance... it also contradicts conversations with schema.org / google regarding usage of JSON-LD on web pages.
Suggest the working group NOT provide guidance of this form in a W3C TR.
+1 to this.
+1 to this.
-1 to this, counter offer: {
"@context": [
// "https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/ns/credentials/v2",
// "https://www.w3.org/2018/credentials/examples/v1"
{ "@vocab": "https://www.w3.org/ns/credentials#" }
],
"id": "http://example.edu/credentials/1872",
"type": ["VerifiableCredential", "NewCredentialType"],
"issuer": {
"id": "did:example:123",
"type": ["Organization", "OrganizationType"]
},
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:456",
"type": ["Person", "JobType"],
"claimName": "claimValue"
}
}
+1
-1 (with serious concerns about how this will cripple adoption in certain use cases). Suggest the working group NOT provide guidance of this form in a W3C TR.
+1
+1 (noting that we don't need to propose this,
-1 to "experimental"... but this proposal could probably be restructured in a way that I would accept... see my counter offer. Suggest the working group NOT provide guidance of this form in a W3C TR.
-1 to this. Suggest the working group NOT provide guidance of this form in a W3C TR. |
@OR13 (and anyone else that weighs in) could you please re-edit your comment above and 1) explain your -1s in more depth, and ideally, 2) provide counter-proposals for all -1s. It will help us figure out areas where it might be possible to reach consensus. Like the |
edited, mostly my counter proposals are "don't say this in a W3C TR."... leave the power in the hands of the developers / system builders and users. |
+1 to all the proposals in #929 (comment). |
It’s time to let JSON be JSON The Verifiable Credentials spec currently has conflicting guidance about the use of Yes, it’s clear what Now that we have experience with deployments of Verifiable Credentials, it’s clear that many developers don’t know how to use Proposal Modify Section 4.1 (Contexts) to say that
Answering the Issue Question The tracking issue asked the question “What does JSON-LD compatible JSON mean?”. Given the proposal above, the answer is crystal clear: JSON-LD compatible JSON means JSON-LD; JSON that is not compliant with JSON-LD is not JSON-LD compatible JSON. |
@selfissued -- It's time to let Also, please note that, in fact, JSON that uses URIs for all terms, thus requiring no mapping from "simple" term literals to URIs via |
There is absolutely no reason to have or process a “@ context” when dealing with JWTs, it requires extra work for parsers that ONLY process JSON to process the “@ context”, its time to remove this requirement and let JSON be JSON and not force these processing rules on deployments that don’t want to use JSOON-LD, lets make things simple.
From: Ted Thibodeau Jr ***@***.***>
Sent: Tuesday, October 4, 2022 5:22 PM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Comment ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@selfissued <https://github.com/selfissued> -- It's time to let @context be @context. Please edit your latest comment, and wrap all 13 occurrences of @context in code fences. That GitHub user is not part of any relevant groups, and does not need to be pinged every time a comment is made on this thread.
Also, please note that, in fact, JSON that uses URIs for all terms, thus requiring no mapping from "simple" term literals to URIs via @context, is also "JSON-LD compatible JSON". I think this "JSON-LD compatible JSON" would impose no "complexity burden of JSON-LD" (by which I think you actually mean a "complexity burden of @context") because there is no @context and no term mapping; each term URI should be interpreted and maintained exactly as written.
—
Reply to this email directly, view it on GitHub <#929 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4R4Y5OQE6E7VT3K4DPQ5DWBTC2VANCNFSM6AAAAAAQNWBJHE> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB4R4Y4B7IDYRWTUJKSOGJLWBTC2VA5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLSB2S4.gif> Message ID: ***@***.*** ***@***.***> >
|
-1 to this approach
From: Manu Sporny ***@***.***>
Sent: Tuesday, October 4, 2022 6:49 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Comment ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-compatible JSON-LD mean? (Issue #929)
A cut at some language that might provide some clarity around what "JSON-LD compatible JSON" means. The Verifiable Credentials Data Model is "JSON-LD compatible JSON", which means the following:
* All Verifiable Credentials expressed MUST utilize the <https://www.w3.org/TR/vc-data-model/#contexts> @context parameter where the values SHOULD be URLs. That is, in-line JSON-LD Contexts are strongly discouraged (we might even want to go as far as forbidding them).
* JSON-LD Compact Form <https://www.w3.org/TR/json-ld11/#compacted-document-form> is the only allowed form of JSON-LD. JSON-LD expanded form is disallowed to eliminate the requirement to always perform JSON-LD processing in processing pipelines where its not needed.
* The underlying data model is JSON-LD <https://www.w3.org/TR/json-ld11/#data-model> , which is a superset of (and round-trippable to/from) RDF.
In order to make development easier for developers coming from a JSON background, we might consider:
* The Verifiable Credentials specification will provide an "experimental" JSON-LD Context (https://www.w3.org/ns/credentials/experimental/v1, with an @vocab value set to https://www.w3.org/2018/credentials/undefined# such that developers need not define a JSON-LD Context or Vocabulary semantics as an initial step in the development process.
* Implementations SHOULD reject verification of any VC that utilizes the https://www.w3.org/ns/credentials/experimental/v1 JSON-LD Context in a production environment.
The above makes the data model crystal clear, is compatible with all known JSON-LD processors, helps developers coming from a purely JSON background to get started quickly, and retains JSON-only processing modes that are compatible with JSON-LD. Some concrete proposals that we could put in front of the group are:
PROPOSAL: Verifiable Credentials MUST utilize the @context parameter where the values SHOULD be URLs.
PROPOSAL: Verifiable Credentials SHOULD NOT utilize inline JSON-LD Contexts (objects as values) for the @context.
PROPOSAL: Verifiable Credentials MUST be expressed in JSON-LD Compact form.
PROPOSAL: The underlying data model for Verifiable Credentials is JSON-LD.
And the proposals to help make development easier for developers coming from a JSON background:
PROPOSAL: As an initial iteration on the idea, the Verifiable Credentials specification will define an "experimental" JSON-LD Context (https://www.w3.org/2018/credentials/experimental/v1, with an @vocab value set to https://www.w3.org/2018/credentials/undefined# such that developers need not define a JSON-LD Context or Vocabulary semantics as an initial step in the development process.
PROPOSAL: A conforming processor SHOULD raise an error if a VC utilizes the https://www.w3.org/ns/credentials/experimental/v1 JSON-LD Context in a production environment. The definition of "production environment" is left as an exercise to the implementer.
—
Reply to this email directly, view it on GitHub <#929 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4R4Y42AMW43ADTSYEBWUDWBQYT7ANCNFSM6AAAAAAQNWBJHE> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB4R4Y6PS7DGDK2A6CNMY4TWBQYT7A5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLQVNUK.gif> Message ID: ***@***.*** ***@***.***> >
|
@selfissued wrote:
@nadalin wrote:
Could either of your please explain what the extensibility model is for your proposal? How are global semantics achieved? In the past, the answer has been some variation of:
Is something new being offered this time around? |
Yes we can do this if JSON implementations conform to the current
W3C DM recommendation and use URIs everywhere where URIs are
required. But if you want to use simple alias strings instead of
URIs then you have to have an @context that specifies the
mappings. What you appear to want is simple aliases with no
mappings to URIs so that there is ambiguity over what the alias
property is - as we introduced 30 years ago when we moved from
X.500 to LDAP. One would have thought we could have learned the
lesson from that bad move and stand on the shoulders of giants.
|
This sounds like a broken proposal to me. Since we have issuers,
holders/wallets and verifiers, each of which may implement either
JSON or JSON-LD processing rules (and have no requirement to
implement both) then your proposal is a guarantee of
non-interworking. The current spec has several ambiguities in it,
this is already acknowledged (e.g. whether to duplicate or replace
vc claims in JWT proofed VCs). The solution is to clarify the
ambiguities in order to ensure interworking when passing a VC
between JSON and JSON-LD implementations. It is not to guarantee
to break implementations when doing this.
|
The lesson learned is to keep simple things simple. Don't complicate things if I have a JWT I should be able to process it as it is including SD JWTs without the use of at context being there. Keeping "@ context" optional gives you the extensibility and does not break any existing implementations.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: David Chadwick ***@***.***>
Sent: Wednesday, October 5, 2022 4:02:52 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
Yes we can do this if JSON implementations conform to the current
W3C DM recommendation and use URIs everywhere where URIs are
required. But if you want to use simple alias strings instead of
URIs then you have to have an @context that specifies the
mappings. What you appear to want is simple aliases with no
mappings to URIs so that there is ambiguity over what the alias
property is - as we introduced 30 years ago when we moved from
X.500 to LDAP. One would have thought we could have learned the
lesson from that bad move and stand on the shoulders of giants.
Kind regards
David
On 05/10/2022 02:24, Anthony Nadalin wrote:
There is absolutely no reason to have or process a “@ context”
when dealing with JWTs, it requires extra work for parsers that
ONLY process JSON to process the “@ context”, its time to remove
this requirement and let JSON be JSON and not force these
processing rules on deployments that don’t want to use JSOON-LD,
lets make things simple.
From: Ted Thibodeau Jr ***@***.***>
Sent: Tuesday, October 4, 2022 5:22 PM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Comment ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What
does JSON-LD compatible JSON mean? (Issue #929)
@selfissued <https://github.com/selfissued> -- It's time to
let @context be @context. Please edit your latest comment, and
wrap all 13 occurrences of @context in code fences. That GitHub
user is not part of any relevant groups, and does not need to be
pinged every time a comment is made on this thread.
Also, please note that, in fact, JSON that uses URIs for all
terms, thus requiring no mapping from "simple" term literals to
URIs via @context, is also "JSON-LD compatible JSON". I think this
"JSON-LD compatible JSON" would impose no "complexity burden of
JSON-LD" (by which I think you actually mean a "complexity burden
of @context") because there is no @context and no term mapping;
each term URI should be interpreted and maintained exactly as
written.
—
Reply to this email directly, view it on GitHub
<#929 (comment)>
, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4R4Y5OQE6E7VT3K4DPQ5DWBTC2VANCNFSM6AAAAAAQNWBJHE>
.
You are receiving this because you commented.
<https://github.com/notifications/beacon/AB4R4Y4B7IDYRWTUJKSOGJLWBTC2VA5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLSB2S4.gif>
Message ID: ***@***.*** ***@***.***> >
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this
thread.Message
ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#929 (comment)",
"url": "#929 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
—
Reply to this email directly, view it on GitHub<#929 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4R4Y2C4745TIA37MKQ5DTWBVN5ZANCNFSM6AAAAAAQNWBJHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
"@context" cannot be optional unless you replace all the existing
properties (type, id, issuanceDate etc) with their full URIs.
Otherwise you have a non-conformant VC.
|
There would be no claim transformations required if there is no "@ context" . Something else to keep simple.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: David Chadwick ***@***.***>
Sent: Wednesday, October 5, 2022 5:41:38 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@context cannot be optional unless you replace all the existing
properties (type, id, issuanceDate etc) with their full URIs.
Otherwise you have a non-conformant VC.
Kind regards
David
On 05/10/2022 13:18, Anthony Nadalin
wrote:
The lesson learned is to keep simple things simple. Don't
complicate things if I have a JWT I should be able to process it
as it is including SD JWTs without the use of at context being
there. Keeping "@ context" optional gives you the extensibility
and does not break any existing implementations.
Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: David Chadwick ***@***.***>
Sent: Wednesday, October 5, 2022 4:02:52 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What
does JSON-LD compatible JSON mean? (Issue #929)
Yes we can do this if JSON implementations conform to the current
W3C DM recommendation and use URIs everywhere where URIs are
required. But if you want to use simple alias strings instead of
URIs then you have to have an @context that specifies the
mappings. What you appear to want is simple aliases with no
mappings to URIs so that there is ambiguity over what the alias
property is - as we introduced 30 years ago when we moved from
X.500 to LDAP. One would have thought we could have learned the
lesson from that bad move and stand on the shoulders of giants.
Kind regards
David
On 05/10/2022 02:24, Anthony Nadalin wrote:
There is absolutely no reason to have or process a “@ context”
when dealing with JWTs, it requires extra work for parsers that
ONLY process JSON to process the “@ context”, its time to remove
this requirement and let JSON be JSON and not force these
processing rules on deployments that don’t want to use JSOON-LD,
lets make things simple.
From: Ted Thibodeau Jr ***@***.***>
Sent: Tuesday, October 4, 2022 5:22 PM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Comment ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What
does JSON-LD compatible JSON mean? (Issue #929)
@selfissued <https://github.com/selfissued> -- It's time to
let @context be @context. Please edit your latest comment, and
wrap all 13 occurrences of @context in code fences. That GitHub
user is not part of any relevant groups, and does not need to be
pinged every time a comment is made on this thread.
Also, please note that, in fact, JSON that uses URIs for all
terms, thus requiring no mapping from "simple" term literals to
URIs via @context, is also "JSON-LD compatible JSON". I think this
"JSON-LD compatible JSON" would impose no "complexity burden of
JSON-LD" (by which I think you actually mean a "complexity burden
of @context") because there is no @context and no term mapping;
each term URI should be interpreted and maintained exactly as
written.
—
Reply to this email directly, view it on GitHub
<#929 (comment)>
, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4R4Y5OQE6E7VT3K4DPQ5DWBTC2VANCNFSM6AAAAAAQNWBJHE>
.
You are receiving this because you commented.
<https://github.com/notifications/beacon/AB4R4Y4B7IDYRWTUJKSOGJLWBTC2VA5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLSB2S4.gif>
Message ID: ***@***.*** ***@***.***> >
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this
thread.Message
ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target":
"#929 (comment)",
"url":
"#929 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
—
Reply to this email directly, view it on
GitHub<#929 (comment)>,
or
unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4R4Y2C4745TIA37MKQ5DTWBVN5ZANCNFSM6AAAAAAQNWBJHE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message
ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#929 (comment)",
"url": "#929 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
—
Reply to this email directly, view it on GitHub<#929 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4R4Y35DY7GGZ5I4XIMXOTWBVZQFANCNFSM6AAAAAAQNWBJHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@David-Chadwick wrote:
Yes, agreed. Removing a feature that provides global interoperability and then replacing it with nothing will lead to non-interoperability; thus, it seems a non-solution is being proposed. "let JSON be JSON" and "keep things simple" are sound bites. Being generous, they could be construed as design guidelines; it is not a workable technical architecture. Please answer the question being asked instead of stating that we do not need a feature that has achieved consensus (multiple times) over many years. To re-state the question: Could either of your please explain what the extensibility model is for your proposal? How are global semantics (and thus, interop) achieved? |
I agree with "let's keep simple things simple". They should be as simple as they can be -- but not simpler. Here's my perspective on that: If all you want to do is share a couple of very common fields of information between a closed or mostly closed system of well-known data providers, use a standard that doesn't place constraints on data modeling. If you don't care about data providers tracking your users behavior or want this property so that you can monetize it, or if you generally don't care about the "phone home problem", use a standard that doesn't have the extra features designed to work against this. If you don't mind using a centralized registry for achieving interop with how you modeled your data or your data is simple enough so that this solution meets your scaling needs, don't use a standard that introduces a decentralized mechanism. If you don't need to be able to atomize your data into simple statements, no matter how they are nested, so that they can be merged and linked with other data to build powerful knowledge graphs, or selectively disclosed, don't use a standard that requires you to apply constraints to how you model your data. If your use cases fit into the above -- use a JWT. JWTs aren't opinionated on the data model, just the data format: JSON. They don't impose any extra constraints to achieve additional use cases -- because they aren't designed for those and you, in particular, don't need them. Now, what about everyone else? If you have more than a few common fields of information (perhaps you even have rich and well-connected data) and you want it to be easily shareable and usable across an open ecosystem where you do not even know who might consume it, use a standard that places a simple, minimum set of constraints on data modeling to enable this to happen. If you care about privacy issues with data providers tracking your users behavior and want to stop the "phone home problem", use a standard designed to help achieve this. If you don't want to use a centralized registry for defining your data or if that solution doesn't scale to meet your needs, use a standard that defines a decentralized mechanism. If you want your data to be mergeable and linkable with other data to build powerful knowledge graphs via interoperable, common tooling, or selectively disclosed, use a standard that requires all data to be modeled in a common way, using the simplest constraints to achieve this goal. If your use cases fit into this section here, use a VC. VCs specify a data model, not just a data format. The data model, when expressed in JSON, says that each object is a "thing" with properties. The properties are expressed as JSON keys and link to other values or other things -- where the same rules then repeat. It is true that you cannot just "do whatever you want" when modeling your data, because then there is no common structure for interoperable tools to work with; instead, all the data is bespoke and looks different, which fails to meet the requirements. This data model is the simplest set of constraints to understand and apply when modeling your data -- to achieve the above requirements. And that's why we should do it: it keeps things as simple as they can be, but not simpler. VCs provide a decentralized registry mechanism called So, yes, let's keep simple things simple, but not simpler. That includes making sure we understand that we have a common data model and a decentralized registry mechanism in order to meet requirements that these use cases have. For those use cases that don't have any of these requirements, you don't need to use VCs. Use something like a JWT -- that's a technology that's been around for over a decade. If your use case can be solved with it -- do it. If not, and you've been waiting for over a decade for a standard that provides the additional features you need to solve your use case, VCs may be for you. But it is not simpler to try to change VCs to look like another standard that already exists but is too simple to meet the requirements. That only creates two standards that address the same use cases -- and that both fail to specify what people need to achieve interoperability on other ones. |
I have answered your question so please don't be hostel
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Manu Sporny ***@***.***>
Sent: Wednesday, October 5, 2022 7:32:24 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@David-Chadwick<https://github.com/David-Chadwick> wrote:
This sounds like a broken proposal to me.
Yes, agreed. Removing a feature that provides global interoperability and then replacing it with nothing will lead to non-interoperability; thus, it seems a non-solution is being proposed.
"let JSON be JSON" and "keep things simple" are sound bites. Being generous, they could be construed as design guidelines; it is not a workable technical architecture.
Please answer the question being asked instead of stating that we do not need a feature that has achieved consensus (multiple times) over many years. To re-state the question:
Could either of your please explain what the extensibility model is for your proposal? How are global semantics (and thus, interop) achieved?
—
Reply to this email directly, view it on GitHub<#929 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4R4Y5KJKBBYAJAB5UZEIDWBWGPRANCNFSM6AAAAAAQNWBJHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@David-Chadwick, @nadalin — Please revisit your comments, above, and
|
@msporny wrote:
The extensibility model is the normal JSON one: Add fields as you need them. If you want them to be globally interoperable use collision-resistant names or register the names in the appropriate claims registry. This model is described at https://datatracker.ietf.org/doc/html/rfc7519#section-4 and implemented in the registry https://www.iana.org/assignments/jwt/jwt.xhtml#claims. We can and likely will have a similar registry for interoperable VC claims. This is all normal JSON interop stuff. |
See also:
I'm firmly against, any changes that causes interoperability issues for regulators verifying credentials in VC-JWT or Data Integrity form... some of the proposals in this thread are heading that direction, and I don't believe the W3C is the right place for that work. At IETF, we have the ability to sign arbitrary data as JSON or CBOR... We don't need another way to do this at W3C. |
The issue was discussed in a meeting on 2022-10-05
View the transcript3. Concrete Proposals for Core Data Model.See github issue vc-data-model#929. Manu Sporny: attempt at a number of proposals - some discussion over those proposals with a couple of +1's, some back-and-forth with Orie, wondering if the best approach is to put proposals forward to see if there's agreement.
Manu Sporny: there are a number of things which make JSON-LD processing mandatory, one idea here would be to not allow JSON-LD expanded form - only bald JSON-LD is one in compacted form.
Manu Sporny: another, have
Manu Sporny: finally, a discussion about
Michael Jones: after discussions with a lot of people including at TPAC, there is ample evidence that there are developers who get it wrong if they use
Michael Jones: it is a little unfortunate if we have two representations, but that is what we are seeing. We should restrict the usage of
Orie Steele: appreciate comment about developers, various skillsets mean that some struggle with certain technologies while others find it easier. We should strive to make it easier to implement for unskilled developers..
Orie Steele: COSE/JOSE work in IETF, have their place in signing unstructured data. To the original point on implementation complexity, should be trivial to implement but should have value in implementing. Combining things together means that they lose the value of their specificity. My value in Verifiable credentials is that they provide semantic data..
Orie Steele: example of a mill test report signed by a steel company in Mexico - want them to choose between using VC-JWT or Data Integrity - but regulators consuming the document should have the same semantic data at the end.
Joe Andrieu: comment on selfissued's comment - if the extensibility model is to just add whatever terms to the JSON to extend it, why not allow
Michael Prorock: applause to Orie on comments, a reasonable proposal is that
Michael Jones: not trying to change JSON extensibility model, as it is a claim with specific meaning that could conflict. We should register it as a claim in the IANA JWT claim registry. You need to use claims in the way they are registered. If you use
Michael Jones: Orie made a point that signing things should be a distinct activity from the type of data which is signed - we are defining what is signed, whether with JOSE, COSE, Data Integrity. The value we are adding is in defining the additional claims which are in a typical VC, and what they mean.
Manu Sporny: the problem here is that we are discussing splitting the ecosystem into two communities with different extensibility models. JSON-LD uses identifiers which do not require a central registry, while JSON would defines claims in a centralized registry..
Manu Sporny: if you just look at the traceability work, the amount of claims necessary would be massive. Argument is to go register claims in a centralized registry at IANA, use reverse domain names, etc..
Manu Sporny: that approach has been discussed time and time again and that approach just does not scale.
Manu Sporny: the ramifications of splitting the data model into two things with different extensibility will split the ecosystem, and is one of the greatest things we could do to damage the ecosystem today. Today, some people are doing it wrong but things like @vocab could be used to help.
Antony Nadalin: not proposing to get rid of
Kevin Dean: if we have an envelope model, where we use
David Waite: One of the issues I have with
David Waite: If you have multiple ways of expressing things and people understand that in different ways, someone might thing an object property means something specific vs. someone processing
Michael Jones: We already have a split ecosystem, there are two camps, we should support both well than to be halfway inbetween that serves no one..
|
My problem with including inline contexts is that from a predictability perspective, JSON tools would need to evaluate We can define things to be stricter, in that an implementation could compare a list of URI strings for an exact ordered match. To compare against an effective JSON-LD context is not something which I know of a current algorithm for - and for which I doubt there is a simple algorithm to accomplish. This is also why some (including me) have advocated against such data isomorphism at the proof layer - once I know that I'm evaluating unmodified and integrity-protected data from the issuer it becomes a lot easier for optional consumption of JSON-LD data as RDF or JSON - because you know that the context and data haven't been modified by another party. If there is any manipulation going on for how different verifiers would interpret a credential, you as a verifier know (and can show via non-repudiation) that manipulation was by the issuer themselves. |
Note that this is all that is needed if the approved contexts use |
Yes, but let's not commit a Nirvana Fallacy here. There are trade offs here that many would agree are well worth the canonicalization approach. I gave a presentation on this at TPAC. With the trade offs, we can either prioritize people writing security libraries (few) or application developers (orders of magnitude more). |
Unfortunately I do not agree that the trade offs of canonicalisation are worth it. I don't think it is a hassle for application developers to store a copy of the signed data if they need it later. If they do not they can discard it. If they change the data then canonicalisation does not help them validate the signature later on the modified data. The downside of canonicalisation is that it is a) hard to get right b)introduces potential security vulnerabilities and c) swapping storage for processing. So I prefer the benefits of a fast signing mechanism that does not require canonicalisation, and storing the signed data. Since VCs are essentially a security data structure, it is prudent to err on the side of security rather than application developers |
This comment was marked as resolved.
This comment was marked as resolved.
This is what trade off decisions are about: you can choose based on your own needs. |
+1 The effect of setting
So, even if there is an As a general comment on the above discussion points, the JSON-LD data model really is RDF with the main exception being that JSON-LD allows (but strongly discourages) the use of a blank node as a property. The semantics of VC, as supported by JSON-LD, imply that if the value of a property is a named graph, that that implies a direct relationship, while RDF makes no such assertion; this was a point of contention in the RDF 1.1 working group as named graphs are used for different purposes by different implementations. It's up to a given application to describe these semantics, which VC (and really JSON-LD) do here. Also, JSON-LD was specifically designed to allow virtually any JSON to be interpreted as JSON-LD, and thus have unambiguous semantics, while JSON as use in the wild typically relies upon API documentation for the silo in which it is used to describe the meaning of property names and values. I recently discussed this on Twitter. |
The concept is that the issuer would issue the linked example with a RDF canonicalization based signature, while another party would modify the message before handing it to the verifier. At the verifier the security layer, needing to understand RDF canonicalization to give a pass/fail on the integrity check, would not see these as meaningful changes. The application layer, using JSON processing logic on the received document, would be operating under false assumptions on document structure and what data is actually integrity protected. In the context of the issue at hand, this means that the problem of having data which is securely interpretable with both a JSON data model and a graph data model is especially challenging, moreso when you have transformations like canonicalization or selective disclosure in play. |
The issuer can just use |
@dwaite -- Please edit your #929 (comment) and put code fences ( |
Just going to point out that RDF is a Set and JSON is a Tree/Object. So that means that duplicate triples get merged into one thing. That makes merges cheaper, but some other operations more expensive Also, arrays are treated slightly differently, seem to me, to be some of the main differences, between JSON and JSON-LD JSON-LD, among other things, also standardizes a way to include hyperlinks in your JSON. That's useful as JSON doesnt have this natively IMHO it would be nice if JSON-LD parsers could largely parse plain old JSON. Perhaps one day, they will. |
@dwaite wrote:
Your response seems to indicate that you are not grokking the points that multiple people in this thread have been making regarding your proposed attack. It has been demonstrated to be invalid. It does not work if you use the protection mechanisms that exist in the VC spec today: https://www.w3.org/TR/vc-data-model/#semantic-interoperability https://www.w3.org/TR/vc-data-model/#syntactic-sugar (read the last bullet item) Can we do better? Yes, we can and we should expand on the multiple ways to prevent the attack that you're outlining. That said, the fundamental premise of your argument has been dismantled and shown to be invalid. Use static contexts, use Your response seems to either assert that these things do not exist (even though we're linking to them above), or to assert "Yes, but if you take the safeties off, you can do bad things." -- and that's true of any technology, just like Why do you still believe that a MiTM injection or redefinition of a |
I've been thinking about this issue over the past couple of days and it seems like we're all conflating a number of things in this issue and perhaps reframing the threads of discussion as separate issues will help us make progress. Here are the two main paths that seem to be emerging:
I propose we break the discussions happening in this one issue into two separate issues (that can reference this issue as the starting point). PROPOSAL: Create a new issue titled "Make the usage of Thoughts? |
@dwaite wrote:
There are multiple confounding factors there which are related to the topic at hand (JSON-LD compatible JSON). @OR13 mentioned earlier that he would be against limiting
Is there a proposal on how one would verify an inline context object is as expected? There is also a goal to allow credentials to be extensible. If a university wanted to include additional information in a transcript, for example, that should be allowed. However, how does a verifier or holder recognize that as an "expected value appearing in the expected order"? What I don't want to see is a desire for isomorphic data formats and flexible security algorithms to then limit the expressiveness and extensibility of credentials. I will say if you take the current text as a limit to
There were several additional things proposed to allow for JSON-LD compatible JSON securely above, including:
I apologize to the group about elaborating with an example here and sidetracking this topic, and would propose that further conversation happen in another venue. It would probably also be more useful if that discussion was framed by a more stable set of assumptions, such as any additional proposed guidance/restrictions for implementers. |
IMO, it's JSON compatible JSON-LD when it verifies as a JWS payload. How it's processed after that is up the issuer and verifier. I can provide examples of this working with and without the need to cache contexts by URI, and produce the same information. As a verifier, I want to process structured data from issuers I trust. As an issuer, I want to produce structured data that meets the requirements of many verifiers. To me, the VCDM is just a tool to accomplish this objective with some well established standards, JSON-LD and JOSE. If we add additional restrictions, beyond these, there should be really good reasoning provided, because complexity and optionality on top of these 2 building blocks are the greatest risk to the success of Verifiable Credentials, and we need them desperately. https://twitter.com/ylecun/status/1579138435398279170?t=qhYsHGueuPHd7QdE7suKhQ&s=19 There are a lot of context related conversation we need to be having, especially around It would be nice to get to those conversations. I suggest we use "discussions" for discussions, and "issues" for working towards pull requests. |
@msporny +1 to this It seems valuable on every level We're close to plain old JSON then, with How to deal with extensibility would be a great topic. For example, you can guess what "controller" means, but it might be harder to guess what "timestamp" means. Software should be able to handle this without a fatal error, imho. There will be some trade offs around parsing, canonicalization and signing, perhaps Worth it's own issue, imho, and I'm sure @msporny has much valuable experience that we can all learn from |
+1 thank you @msporny -- we need this kind of distillations, and I agree with what you have written. both proposals make sense to me. |
The base model should be JSON, the extensibility is that you may use JSON-LD and the “@ context” is the trigger point for usage of JSON-LD, I’m in favor of a data model that only requires JSON but can be extensible to support JSON-LD if needed
@manu Can you explain why you would want to enforce the usage of “@ context” for a JSON only VC
From: Manu Sporny ***@***.***>
Sent: Tuesday, October 4, 2022 6:45 PM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@selfissued <https://github.com/selfissued> wrote:
@context <https://github.com/context> MUST NOT be present when the VC is JSON
@nadalin <https://github.com/nadalin> wrote:
There is absolutely no reason to have or process a “@ context”
Could either of your please explain what the extensibility model is for your proposal? How are global semantics achieved?
—
Reply to this email directly, view it on GitHub <#929 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4R4Y4VY22KAYTDGXUTAO3WBTMQLANCNFSM6AAAAAAQNWBJHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AB4R4Y6PAHKPQWNSY45UDS3WBTMQLA5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSLSE3VK.gif> Message ID: ***@***.*** ***@***.***> >
|
@nadalin we came to a similar conclusion some time ago, leading to the creation of some notes, for something with the code name "Linked Objects" Just a one-pager with some notes, not an implementation or production system (yet) It's basically a JSON base, with extensibility to full JSON-LD. This is not a proposal or suggestion, but hopefully on-topic, and some "food for thought". It also has some references to the history. A way for developers to get started with regular JSON and guide those that want it to full JSON-LD, including all the benefits |
Given that there will (hopefully) be thousands of issuers and millions of holders and verifiers, in which a verifier does not necessarily have a-priori knowledge about a VC issuer, it is important to me that we do not split the eco-system into two halves, the |
@nadalin wrote:
The base data model does not specify any market-specific properties. That is, if you're issuing a University Degree, there are no types/terms for a university degree in the base VC data model (by design). You have to extend the base data model to use market-specific properties and
For at least the reason above. If you don't use
To be clear, just because you add |
@dwaite wrote:
No, there is not, which is why the following proposal was made:
This would ensure that we don't hit a case where a JSON-only encoding would hit an inline context object. It's a compromise that we are suggesting though there are others that want to keep inline contexts. Doing the above proposal would enable us to further be able to rely on NOT requiring JSON-LD processors for JSON-only folks... we can probably get the pro-
It depends if the Verifier wants to process that additional information. If |
@nadalin @melvincarvalho @msporny Please edit your comments (detailed below), and —
@nadalin —
@msporny — |
Your reply assumes that IANA is not used, you do not need the context when you have a JWT as a VC and using a SD-JTW or JWT Proof. So your 3 points below are not valid at all.
From: Manu Sporny ***@***.***>
Sent: Tuesday, October 11, 2022 10:21 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@nadalin <https://github.com/nadalin> wrote:
The base model should be JSON, the extensibility is that you may use JSON-LD and the “@ context” is the trigger point for usage of JSON-LD, I’m in favor of a data model that only requires JSON but can be extensible to support JSON-LD if needed
The base data model does not specify any market-specific properties. That is, if you're issuing a University Degree, there are no types/terms for a university degree in the base VC data model (by design). You have to extend the base data model to use market-specific properties and @context has been the mechanism used to do that since the very beginning.
@msporny <https://github.com/msporny> Can you explain why you would want to enforce the usage of @context for a JSON only VC
For at least the reason above. If you don't use @context it means:
* The meaning of the properties in your credential are undefined.
* It is not possible to discover the meaning of the properties in your credential.
* It is not possible for a Verifier to know what the property means without some sort of out-of-band communication mechanism.
To be clear, just because you add @context to a JSON payload DOES NOT mean you need to use JSON-LD to process the credential. If you follow the rules in the spec today, it is possible to just see if the @contextcontains a set of URLs that you are expecting and then implement processing for that specific type of credential... that's the compromise the group came to the last time this topic was discussed that enabled VC-JWTs to include @context but not require JSON-LD processing.
—
Reply to this email directly, view it on GitHub <#929 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4R4YYKT4YPWDU7TOHN7C3WCWOYLANCNFSM6AAAAAAQNWBJHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AB4R4Y2VGJUZAZ5MPNJAZSTWCWOYLA5CNFSM6AAAAAAQNWBJHGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSL75SFA.gif> Message ID: ***@***.*** ***@***.***> >
|
@nadalin "Your reply assumes that IANA is not used" |
Since JWT already uses IANA we don't need to burden the implementations that use JWT to have to implement context as it adds zero value other than complexity
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: David Chadwick ***@***.***>
Sent: Wednesday, October 19, 2022 11:33:18 AM
To: w3c/vc-data-model ***@***.***>
Cc: Anthony Nadalin ***@***.***>; Mention ***@***.***>
Subject: Re: [w3c/vc-data-model] Tracking Issue from TPAC: What does JSON-LD compatible JSON mean? (Issue #929)
@nadalin<https://github.com/nadalin> "Your reply assumes that IANA is not used"
This is correct. @context is there precisely so that IANA is not needed.
—
Reply to this email directly, view it on GitHub<#929 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4R4YZV4P44PGVU247EYZ3WD6555ANCNFSM6AAAAAAQNWBJHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This issue is closed, take up the discussion in the issues listed here: #929 (comment) |
Tracking Issue from TPAC: What does JSON-LD compatible JSON mean?
Please use comments to make concrete proposals.
The text was updated successfully, but these errors were encountered: