Skip to content

vc-jws #12

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

Closed
OR13 opened this issue Sep 4, 2022 · 7 comments
Closed

vc-jws #12

OR13 opened this issue Sep 4, 2022 · 7 comments

Comments

@OR13
Copy link
Contributor

OR13 commented Sep 4, 2022

I have a dream:

it("can decode a verifiable credential from a json web signature", async () => {
  const credential = JSON.parse(
    Buffer.from(verifiableCredential.split(".")[1], "base64").toString()
  );
  console.log(credential);
});

That one day verifiable credentials are flexible enough to be used with any popular signing, encryption, or proving system.

@selfissued
Copy link
Collaborator

selfissued commented Oct 13, 2022

To be clear, your dream is to decouple the VC body from the way that it's secured?

A consequence of this is that we wouldn't be using standard JWT claims such as "iss", "iat", and "exp" to express these values, but other claim names with sometimes different syntax. I know that @nadalin has views on that, per his comments at TPAC and #14.

@OR13
Copy link
Contributor Author

OR13 commented Oct 14, 2022

I'm a strong -1 to must of his comments on #14.

My dream is to allow developers to use JOSE to protect the VCDM core data model which is JSON-LD, and can therefore be trivially secured with JOSE.

I believe the JWT mapping is complexity that many developers have already failed to implement consistently, and which is not necessary.

I think we should be allowed to secure JSON-LD in the following ways:

  1. As JWT with a normatively defined mapping that is unambiguous and as simple as possible.
  2. As a JWS with a normatively defined mapping that is unambiguous and as simple as possible.
  3. As a JWE with a normatively defined mapping that is unambiguous and as simple as possible.

There are lots of use cases where I don't care about JWT, and I just want to use a simple JWS for a large VC, and JWE to encrypt its presentation.

To be clear, I don't think folks should be prevented from securing VCDM with JWT, I think it should not be the only legal way to secure the VCDM with JOSE.

@Sakurann
Copy link
Contributor

per JWS/JWE specs, what is signed/encrypted as JWS/JWE does not have to be a JWT.

  • Option 1 would be for the spec can say that JSON-LD Credential must be signed as-is using JWS/JWE without any JWT mapping, but JWT credential MUST use JWT Claims as defined in the spec (I put my suggestion here clarify that vc vp claims do not include entire VC/VPs #4 (comment))
  • Option 2 would be to say that even when JSON-LD is used, it MUST be a JWT following certain rules (my suggestion above would still apply)

I don't have a strong preference, but if we can agree on the usage of JWT claims, Option 2 would be more consistent and less complicated.

@OR13
Copy link
Contributor Author

OR13 commented Jan 16, 2023

per JWS/JWE specs, what is signed/encrypted as JWS/JWE does not have to be a JWT.

I was reading this section yesterday: https://www.rfc-editor.org/rfc/rfc7519#section-5.2

There are proposals that have gone to the list and which have not been discussed yet by the WG, they are mentioned here:

My proposed solution would be:

Add a section to VC-JWT, that describes how to secure application/credential+ld+json with a JWS.

The only place that normative extensions would apply would be the treatment of the header... and it should be clear how that token is different than a "vc-jwt" under 1.1.

@alenhorvat
Copy link

I have a dream:

it("can decode a verifiable credential from a json web signature", async () => {
  const credential = JSON.parse(
    Buffer.from(verifiableCredential.split(".")[1], "base64").toString()
  );
  console.log(credential);
});

That one day verifiable credentials are flexible enough to be used with any popular signing, encryption, or proving system.

Maybe I have an idea. Will try to finish it next week.

@OR13
Copy link
Contributor Author

OR13 commented Jun 30, 2023

This issue should be closed, this is what V2 does now.

@OR13
Copy link
Contributor Author

OR13 commented Jul 19, 2023

Marked pending close over 1 week ago, closing.

@OR13 OR13 closed this as completed Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants