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

[Bug] JWT Verifiable Presentations should utilize the iss property #340

Closed
decentralgabe opened this issue Apr 6, 2023 · 0 comments · Fixed by #341
Closed

[Bug] JWT Verifiable Presentations should utilize the iss property #340

decentralgabe opened this issue Apr 6, 2023 · 0 comments · Fixed by #341
Assignees
Labels
bug Something isn't working
Milestone

Comments

@decentralgabe
Copy link
Member

Describe the bug
VPs encoded as JWTs as per the vc-jwt spec should utilize the iss property to represent the holder. The implementation currently uses the sub property, which is incorrect.

To Reproduce

Sample JWT VP generated by the impl:

eyJhbGciOiJFZERTQSIsImtpZCI6InRlc3Qta2lkIiwidHlwIjoiSldUIn0.eyJqdGkiOiI1ZWExYThhYy1hNDY4LTQ1M2ItYWE1NS02YTA5MjZhZjVjNWIiLCJub25jZSI6ImE2ODQ0MmU1LTFhODgtNDA5MC05YjE3LTdiZjU0ZWI5M2I2ZiIsInN1YiI6ImRpZDpleGFtcGxlOmViZmViMWY3MTJlYmM2ZjFjMjc2ZTEyZWMyMSIsInZwIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjEiXSwiaWQiOiI1ZWExYThhYy1hNDY4LTQ1M2ItYWE1NS02YTA5MjZhZjVjNWIiLCJob2xkZXIiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEiLCJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iLCJIYXBweVByZXNlbnRhdGlvbiJdLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6W3siQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy9leGFtcGxlcy92MSJdLCJpZCI6IjVkZDE0YjlhLWM5YzItNDNjNi04ZTkxLTBkY2FjMjc0ZDRjNiIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJIYXBweUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1ZXJzLzU2NTA0OSIsImlzc3VhbmNlRGF0ZSI6IjIwMTAtMDEtMDFUMTk6MjM6MjRaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaGFwcGluZXNzIjp7Imhvd0hhcHB5IjoicmVhbGx5IGhhcHB5In0sImlkIjoiZGlkOmV4YW1wbGU6ZWJmZWIxZjcxMmViYzZmMWMyNzZlMTJlYzIxIn19XX19.BNzz3AfY5WcfNyZ7ex9KeI1CEJoiO9Tww7Oj12aGKGXWYj7RsNtg0oQwMtUw5L61PqfCZXbzFSM4Sn7MtT10BA

which decodes to

{
  "jti": "5ea1a8ac-a468-453b-aa55-6a0926af5c5b",
  "nonce": "a68442e5-1a88-4090-9b17-7bf54eb93b6f",
  "sub": "did:example:ebfeb1f712ebc6f1c276e12ec21",
  "vp": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "id": "5ea1a8ac-a468-453b-aa55-6a0926af5c5b",
    "holder": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "type": [
      "VerifiablePresentation",
      "HappyPresentation"
    ],
    "verifiableCredential": [
      {
        "@context": [
          "https://www.w3.org/2018/credentials/v1",
          "https://www.w3.org/2018/credentials/examples/v1"
        ],
        "id": "5dd14b9a-c9c2-43c6-8e91-0dcac274d4c6",
        "type": [
          "VerifiableCredential",
          "HappyCredential"
        ],
        "issuer": "https://example.com/issuers/565049",
        "issuanceDate": "2010-01-01T19:23:24Z",
        "credentialSubject": {
          "happiness": {
            "howHappy": "really happy"
          },
          "id": "did:example:ebfeb1f712ebc6f1c276e12ec21"
        }
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants