-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make project sd-jwt-vc compliant #114
Conversation
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #114 +/- ##
==========================================
+ Coverage 95.54% 96.10% +0.56%
==========================================
Files 21 22 +1
Lines 1705 1771 +66
Branches 246 251 +5
==========================================
+ Hits 1629 1702 +73
+ Misses 72 69 -3
+ Partials 4 0 -4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
@cre8 Looking at the code, I thought about it some more. |
I first thought the same, |
Signed-off-by: Mirko Mollik <[email protected]>
I would also strongly recommend to make the |
@berendsliedrecht good point, I add the other package |
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
@lukasjhan @berendsliedrecht added a new package
I copied the e2e test from sd-jwt and modified the input so it's compliant. |
Is there a way to just use it as a class instead of making |
Like described above, sd-jwt: This spec for the So to be compliant to the spec you can not use only sd-jwt as the credential format, you need an implementation of the class to specify the header type |
@cre8 The big change is not being able to use sd-jwt raw. I think the rest is okay. @berendsliedrecht Can you tell me what you think? btw you need to fix the |
Signed-off-by: Mirko Mollik <[email protected]>
I wouldn't call it "big change" or "breaking change" since we moved back to version 0.x that allows to be unstable. Also we are getting compliant to the spec we were not in the first place. I moved the examples from core to sd-jwt-vc and made a node in the packages about this. |
@cre8 Good. Examples are all good :) |
It is fully valid to use an |
The spec for sd-jwt has no mentioning to set the To be compliant with the jwt spec, the I don't feel good to allow people to give out |
simplifying the approach Co-authored-by: Berend Sliedrecht <[email protected]> Signed-off-by: Mirko Mollik <[email protected]>
Signed-off-by: Mirko Mollik <[email protected]>
I understand your point, however the Also, the sd-jwt-vc spec was not only written to define the |
It depends on the context: like I said: sd-jwt is only the algo, so it has no impact on the type. However sd-jwt-vc forces it. So again: sd-jwt should NOT be a class that can be initialized on its own. |
I don't think we will reach any consensus here, but If it says anywhere in the specification of |
FYI: SD JWT VC standard version 2 just released: The contents of link describe SD-JWT as a Credential Format. |
But isn't each JWT is a credential since it includes signed claims? It does not include the "proof of ownership" by binding a holders public key. SD-JWT-VC is not requiring this. I totally agree that the SD-Algorithm can be used for anything else, but then we need to split it up from the JWT part and then we can use it for non credentials. |
@berendsliedrecht so we have two options:
What way do you prefer, I am fine with both |
If we allow people to use pure sd-jwt, then I think
is better :) They can use it easily without extending it. |
Id have to stay with option one. I hope my Saturday will stay free and I can give a whole lot more into the codebase and get a bit of a better sense of these exact complications. People should be able to create an sd-jwt without creating a class for it first and as long as that is possible, I am happy with it :). |
This PR makes the library compliant to
sd-jwt-vc
sincesd-jwt
only defines the protocol of the selective disclosure approach.Since the
sd-jwt-vc
is the only spec that seems to be stable engouth to be used withsd-jwt
, I changed the core values.First thoughts to split it up were aborted since the integration of a W3C-VC-DM is not standardized and could lead to massive interop problems.
Open questions before accepting this:
Required types
The
sd-jwt-vc
required the following values to be specified in a credentialI decided to pass them together with the claims in the issue function like:
In case the issuer is a did, the
iss
has to be the url referencing the key likedid:web:exmaple.com#key1
.Issuance date should not be automatically calculated by the SDK since an issuer could have an intention to set it to another value (I don't see a reason for this, but doing so we are not limiting him).
I would also suggest to pass the issuer value during the issuance process and not via the init of the SDJWT Instance. The kid field will also not be updated intern, the user is able to pass it in the third parameter when issuing.
VCT should define the type, see https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-01.html#name-verifiable-credential-type- This seems to be required, but we are not able to set this by the SDK.
Renaming
I did not rename classes like
SDJwtInstance
since they do not include any logic that is specific for the SD-JWT-VC usage, we can rename this, but it would be a breaking changeSigned-off-by: Mirko Mollik [email protected]