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

Remove unknown extensions test from test suite #23

Open
OR13 opened this issue Feb 22, 2025 · 2 comments
Open

Remove unknown extensions test from test suite #23

OR13 opened this issue Feb 22, 2025 · 2 comments

Comments

@OR13
Copy link
Collaborator

OR13 commented Feb 22, 2025

This specification does not forbid "unknown extensions".
The word "unknown" does not even appear in the document.

Implementations of vc-jose-cose are also not forbidden from injecting additional claims before issuance that are not known to the W3C VCDM (and an appropriate @context, which would make them known to JSON-LD processors).

The test case that asserts that unknown extensions should yield an error is therefore invalid.

If this is invalid:

{
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    "https://www.w3.org/ns/credentials/examples/v2"
  ],
  "id": "http://university.example/credentials/1872",
  "type": [
    "VerifiableCredential",
    "ExampleAlumniCredential"
  ],
  "issuer": "https://example.issuer/vc-jose-cose",
  "validFrom": "2010-01-01T19:23:24Z",
  "credentialSchema": {
    "id": "https://example.org/examples/degree.json",
    "type": "JsonSchema"
  },
  "badExtension": {
    "huh": "what?"
  },
  "anotherBadOne": {
    "oh": "no!"
  },
  "credentialSubject": {
    "id": "did:example:123",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science and Arts"
    }
  }
}

So is this:

{
  "phone_number_verified": true, // unknown extensions
  "email": "[email protected]",  // unknown extensions
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    "https://www.w3.org/ns/credentials/examples/v2", 
    { "@vocab": "https://www.iana.org/assignments/jwt/jwt.xhtml#" } // registry for "+jwt" extensions
  ],
  "id": "http://university.example/credentials/1872",
  "type": [
    "VerifiableCredential",
    "ExampleAlumniCredential"
  ],
  "issuer": "https://example.issuer/vc-jose-cose",
  "validFrom": "2010-01-01T19:23:24Z",
  "credentialSubject": {
    "id": "did:example:123",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science and Arts"
    }
  }
}
@selfissued
Copy link

Yes, not understood claim MUST be ignored. Can you file an issue on this in https://github.com/w3c/vc-jose-cose-test-suite Orie? Thanks.

@brentzundel
Copy link
Member

This seems to be an issue with the test suite rather than with the specification.
I am moving this issue there

@brentzundel brentzundel transferred this issue from w3c/vc-jose-cose Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants