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

Inline @context in examples #86

Closed
filip26 opened this issue Nov 28, 2024 · 7 comments
Closed

Inline @context in examples #86

filip26 opened this issue Nov 28, 2024 · 7 comments
Assignees
Labels
CR1 This item was processed during the first Candidate Recommendation phase. editorial The item is editorial in nature.

Comments

@filip26
Copy link

filip26 commented Nov 28, 2024

Hi,
examples related to selective disclosure contain inline @context.

{
  "type": "DataIntegrityProof",
  "cryptosuite": "ecdsa-sd-2023",
  "created": "2023-08-15T23:36:38Z",
  "verificationMethod": "did:key:zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP#zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
  "proofPurpose": "assertionMethod",
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    {
      "@vocab": "https://windsurf.grotto-networking.com/selective#"
    }
  ]
}

Please see this discussion
w3c/vc-data-integrity#272

@vocab should not be used in a production. Having it in examples, test vectors, could lead to confusion and security issues.

(BTW an inline @context should be banned, it only adds complexity to processing that is vulnerable to issues, nothing else)

@msporny
Copy link
Member

msporny commented Dec 8, 2024

@vocab should not be used in a production. Having it in examples, test vectors, could lead to confusion and security issues.

Yes, agreed.

(BTW an inline @context should be banned, it only adds complexity to processing that is vulnerable to issues, nothing else)

Yes, agreed, it's unfortunate the tests include inline contexts.

We should try to remove these if possible from the test vectors and the test suites. That said, we also don't want to destabilize implementations.

/cc @BigBlueHat @PatStLouis @Wind4Greg -- what's the plan here? I suggest we switch to a driver's license, or PRC/EAD/NatCert example.

@msporny msporny added editorial The item is editorial in nature. CR1 This item was processed during the first Candidate Recommendation phase. labels Dec 8, 2024
@filip26
Copy link
Author

filip26 commented Dec 9, 2024

another option could be https://www.w3.org/ns/credentials/examples/v2. It's consistent with other VCDM2.0 based specs.

@Wind4Greg
Copy link
Collaborator

Hi @filip26, @msporny, and all. Currently the VC-DI-ECDSA contains three selective disclosure examples/test vectors:

  1. Employment authorization document example https://w3c.github.io/vc-di-ecdsa/#representation-ecdsa-sd-2023
  2. Permanent resident card example https://w3c.github.io/vc-di-ecdsa/#additional-example-for-representation-ecdsa-sd-2023
  3. Fictitious windsurfing example https://w3c.github.io/vc-di-ecdsa/#enhanced-example-for-representation-ecdsa-sd-2023

At this point I'd recommend dropping the windsurfing example which uses the "incline context" stuff. It did feature arrays and nesting that tested the SD primitives a bit more. However it also confused some folks resulting in another issue to be resolved.

@filip26, @msporny, @dlongley and all let me know what you think.

@filip26
Copy link
Author

filip26 commented Jan 21, 2025

@Wind4Greg I'm fine with any solution that removes the inline contexts. The examples you listed could be retained with the example context, which would benefit the specification. (some related examples/vectors will need to be updated accordingly)

@msporny
Copy link
Member

msporny commented Jan 21, 2025

+1 to removing the windsurfing example (as much as I like it)... the inline context is throwing some people.

@dlongley
Copy link
Contributor

I think it's fine to remove the example that uses the inline context.

@msporny
Copy link
Member

msporny commented Jan 26, 2025

PR #96 has been merged to address this issue; closing.

@msporny msporny closed this as completed Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR1 This item was processed during the first Candidate Recommendation phase. editorial The item is editorial in nature.
Projects
None yet
Development

No branches or pull requests

4 participants