w3c / vc-data-integrity

W3C Data Integrity Specification
https://w3c.github.io/vc-data-integrity/
Other
42 stars 19 forks source link

Describe how JSON-LD framing is used with Selective Disclosure #107

Closed OR13 closed 9 months ago

OR13 commented 1 year ago

We should provide some examples of how JSON-LD Frame operation works, relative to the examples in the spec.

Especially in the context of BBS / selective disclosure... see https://w3c-ccg.github.io/ldp-bbs2020/

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/security/suites/bls12381-2020/v1"
  ],
  "type": ["VerifiableCredential"],
  "credentialSubject": {
    "alsoKnownAs": { "id": {} }
  }
}

Even without BBS, I think some examples of how Framing is supposed to work, would be helpful.

Update:

https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0164.html

https://github.com/digitalbazaar/ecdsa-sd-2023-cryptosuite/blob/62c76663f81cb6f836efd5f28109ae3ede113e5d/lib/disclose.js#L141

Sakurann commented 1 year ago

Why? I think referencing the framing document is sufficient and providing examples goes a bit too far in terms of the scope of the specification

OR13 commented 1 year ago

@Sakurann See this thread: https://github.com/w3c/vc-data-model/issues/831#issuecomment-1284188359

OR13 commented 1 year ago

In the context of the core data model, framing allows for a representation of a view on a verifiable credential, for example:

If JSON-LD is assumed in the base media type, then APIs that operate on JSON-LD are also assumed, and yet, we don't provide any meaningful guidance on this front.

iherman commented 1 year ago

The issue was discussed in a meeting on 2023-04-11

View the transcript #### 1.10. Add examples of JSON-LD Framing (issue vc-data-model#1029) _See github issue [vc-data-model#1029](https://github.com/w3c/vc-data-integrity/issues/107)._ **Kristina Yasuda:** "Add examples of JSON-LD Framing". **Orie Steele:** when the JSON-LD context is applied, and then removed all that remains is n-quads - and the n-quads is the canonical representation. … mostly applies to data integrity, but also applies when working with more general RDF / JSON-LD tooling and the data model as RDF. … you will eventually find term definitions in the graph depending on how far and deep you process the graph. … seems like defining JSON-LD behavior is not really a focus of this group, but bc we have defined as JSON-LD we should touch on some of these items in the right place. … perhaps in an implementation guide, perhaps in the data integrity. … thinks it is odd that we spend a lot of time on the RDF mode, but then don't demonstrate. **Manu Sporny:** agree with orie's statement around moving this to a better place - sure let's talk about framing, but in the right place. … don't think we can talk about framing in the core data model in a general way. … requires concrete examples. … most people hopefully don't need to touch this stuff. > *Orie Steele:* Framing generally speaking is a way to ask for specific claims, in an existing credential.. > *Orie Steele:* it seems very relevant to the confusion over "claim", "credential" and "proof".. > *Orie Steele:* For example, you might use a "frame" to obtain a "proof".. > *Dave Longley:* +1 to talk about framing VCs in BBS or VPs (to, e.g., merge claims across VCs about a single subject into one object) in the implementation guide. **Michael Prorock:** I agree with the right place for this thing not being in core data model, and if you want to go down the JSON-LD thing, there's a lot of documentation around JSON-LD and RDF and those sorts of things. It might be beneficial to add good examples to an implementation guide -- someone has to do that work? Let's close this in favor, it belongs elsewhere.. > *Manu Sporny:* +1 to mprorock ^. **Kristina Yasuda:** would you be ok with closing if addressed elsewhere?. **Orie Steele:** thinks we will have to address this in BBS. … do not think that we can do BBS without this. … thinks it is crazy that we spend all this time on JSON-LD and don't understand how it works.
iherman commented 1 year ago

The issue was discussed in a meeting on 2023-04-11

View the transcript #### 1.10. Add examples of JSON-LD Framing (issue vc-data-model#1029) _See github issue [vc-data-model#1029](https://github.com/w3c/vc-data-integrity/issues/107)._ **Kristina Yasuda:** "Add examples of JSON-LD Framing". **Orie Steele:** when the JSON-LD context is applied, and then removed all that remains is n-quads - and the n-quads is the canonical representation. … mostly applies to data integrity, but also applies when working with more general RDF / JSON-LD tooling and the data model as RDF. … you will eventually find term definitions in the graph depending on how far and deep you process the graph. … seems like defining JSON-LD behavior is not really a focus of this group, but bc we have defined as JSON-LD we should touch on some of these items in the right place. … perhaps in an implementation guide, perhaps in the data integrity. … thinks it is odd that we spend a lot of time on the RDF mode, but then don't demonstrate. **Manu Sporny:** agree with orie's statement around moving this to a better place - sure let's talk about framing, but in the right place. … don't think we can talk about framing in the core data model in a general way. … requires concrete examples. … most people hopefully don't need to touch this stuff. > *Orie Steele:* Framing generally speaking is a way to ask for specific claims, in an existing credential.. > *Orie Steele:* it seems very relevant to the confusion over "claim", "credential" and "proof".. > *Orie Steele:* For example, you might use a "frame" to obtain a "proof".. > *Dave Longley:* +1 to talk about framing VCs in BBS or VPs (to, e.g., merge claims across VCs about a single subject into one object) in the implementation guide. **Michael Prorock:** I agree with the right place for this thing not being in core data model, and if you want to go down the JSON-LD thing, there's a lot of documentation around JSON-LD and RDF and those sorts of things. It might be beneficial to add good examples to an implementation guide -- someone has to do that work? Let's close this in favor, it belongs elsewhere.. > *Manu Sporny:* +1 to mprorock ^. **Kristina Yasuda:** would you be ok with closing if addressed elsewhere?. **Orie Steele:** thinks we will have to address this in BBS. … do not think that we can do BBS without this. … thinks it is crazy that we spend all this time on JSON-LD and don't understand how it works.
OR13 commented 1 year ago

The is related to the discussions regarding mappings, since application/n-quads are frequently MAPPED to vc+ld+json by applying a JSON-LD frame.

OR13 commented 1 year ago

Frames and JSON Pointers should be commented on, people use them for selective disclosure, but that's not defined well anywhere.

OR13 commented 1 year ago

See this request to use framing with selective disclosure of application n quads:

https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0164.html

OR13 commented 1 year ago

There was a request to change the title on todays call, I will attempt to revise the title and description based on recent announcements in the credentials community group.

OR13 commented 1 year ago

@msporny @dlongley I am assigned this issue, but you seem better prepared to address it, would either of you be willing to take it?

iherman commented 1 year ago

The issue was discussed in a meeting on 2023-06-28

View the transcript #### 2.11. Describe how JSON-LD framing is used with Selective Disclosure (issue vc-data-model#1029) _See github issue [vc-data-model#1029](https://github.com/w3c/vc-data-integrity/issues/107)._ **Brent Zundel:** w3c/vc-data-integrity#107 - Orie? **Orie Steele:** Get mailing list comments into the minutes: [https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0165.html.](https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0165.html.) Request for support for data integrity selective disclosure that heavily uses JSON-LD framing. … We could consider some of what is happening in that docs. Seems like it might be related to competitive framing with ISO mDOc. **Manu Sporny:** this isn't core data model work, and not needed in the core spec. If we need to we can point people to the W3C JSON-LD framing. **Brent Zundel:** what is the disposition of this issue? **Manu Sporny:** can move it to data integrity. > *Orie Steele:* Here is the the announcement regarding framing [https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0164.html](https://lists.w3.org/Archives/Public/public-credentials/2023Jun/0164.html). **Ivan Herman:** probably post-CR. **Manu Sporny:** no. the algorithms Orie is talking about need to be in pre-CR. **Orie Steele:** WG may adopt EDDCSA-SD so it should be in the core data model repo? … EDDSA-SD currently only works on VCs not other JSON-LD objects. If this is what is intended it should stay in core data model. **Brent Zundel:** leave as pre-PR. … leave as pre-CR. > *Orie Steele:* This the part of ecdsa-sd that only works for W3C JSON-LD VCs. [https://github.com/digitalbazaar/ecdsa-sd-2023-cryptosuite/blob/62c76663f81cb6f836efd5f28109ae3ede113e5d/lib/disclose.js#L141](https://github.com/digitalbazaar/ecdsa-sd-2023-cryptosuite/blob/62c76663f81cb6f836efd5f28109ae3ede113e5d/lib/disclose.js#L141).
OR13 commented 1 year ago

Possible text, you don't need to use JSON-LD frame to support selective disclosure, you can simply process and disclose claims as is done in SD-JWT?

dlongley commented 1 year ago

@OR13,

I am assigned this issue, but you seem better prepared to address it, would either of you be willing to take it?

Yes, please assign both of us to it so we can drive it forward as we have time. I think we should move this to the data integrity work so when we add some text on how to use framing to do selective disclosure with, e.g., BBS, we will address it.

Possible text, you don't need to use JSON-LD frame to support selective disclosure, you can simply process and disclose claims as is done in SD-JWT?

I'll presume you meant this jokingly since that would be very silly to only say that about framing. In fact, we could simplify selective disclosure further by just using paper and a black marker! :)

I think what you're driving at here is what you mentioned previously on a call: that it would be good to help people understand the advantages of the framing approach over others. That's a good idea and we should, for example, mention that if you have a JSON-LD framing primitive in hand already, then you can use it when doing selective disclosure to leak less relational information without having to remodel your data. This is one privacy advantage over other approaches. This is because framing works with the atomic statements at the core of the VCDM.

OR13 commented 1 year ago

@dlongley yes : )

Maybe this doesn't belong in the core data model, if its specific to how data integrity makes use of framing for selective disclosure.

I could see it going in "suites", like BBS... But I think it would be best addressed in data integrity and referenced from the core data model.

I leave it to you and @msporny to address, let me know if you want a review.

msporny commented 1 year ago

Maybe this doesn't belong in the core data model, if its specific to how data integrity makes use of framing for selective disclosure.

Yes, agree.

I could see it going in "suites", like BBS... But I think it would be best addressed in data integrity and referenced from the core data model.

Yes, agree that it should probably go in Data Integrity, don't know if VCDM needs to talk about it at all since it's mostly an implementation detail of specific cryptographic suites.

I leave it to you and @msporny to address, let me know if you want a review.

Ok, will make an attempt at some text in the next few weeks.

@brentzundel @Sakurann -- can we transfer this issue to the VC Data Integrity specification, please?

msporny commented 1 year ago

Marking as after CR since this is just going to be explanatory text on how JSON-LD Framing is used, with references to the normative text in the JSON-LD Framing standard.

OR13 commented 1 year ago

Not sure I agree with comment that is is after CR, depends on outcome of https://github.com/w3c/vc-data-model/issues/1227

Wind4Greg commented 11 months ago

Folks (@OR13, @msporny, @dlongley) selective disclosure primitives used in VC-DI-ECDSA and VC-DI-BBS haven't used JSON-LD framing for quite some time. They use a JSON pointer based algorithm independent of JSON-LD. Can we close this now.

dlongley commented 11 months ago

Yes, +1 to close.

msporny commented 11 months ago

Agreed, no need to document something we don't use.