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

Feat/jwt status list #225

Merged
merged 18 commits into from
May 13, 2024
Merged

Conversation

cre8
Copy link
Contributor

@cre8 cre8 commented May 6, 2024

closes #224

I extended the verify method so all checked that should be done via sd-jwt are called and then we are looking for revocation.

We will only check the revocation if the status field is present. We are not throwing an error if somebody has referenced another status mechanism and we are not validating if the status field was correctly placed inside the payload when the credential is created (but types are provided).

The verifier has to implement the fetch and validation function of the jwt-status-token and also the logic how to deal with the status (it can have multiple definitions but the values are not covered by the spec).

The statusValidator function is to stop the current validation. In case the status has a value to continue, the function executes without throwing an error and the verifier has to deal with the state after the successful verification.

Mirko Mollik added 2 commits May 6, 2024 20:23
…s#224

Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
@TimoGlastra
Copy link
Contributor

Should this instead be using https://datatracker.ietf.org/doc/draft-ietf-oauth-status-list/?

That's the replacement of JWT / CWT status list i believe.

@cre8
Copy link
Contributor Author

cre8 commented May 7, 2024

Should this instead be using https://datatracker.ietf.org/doc/draft-ietf-oauth-status-list/?

That's the replacement of JWT / CWT status list i believe.

It was built on the referenced IETF. I also opened a PR in the sd-jwt-vc spec since it was pointing to the wrong file

cre8 added 2 commits May 7, 2024 10:46
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
@cre8
Copy link
Contributor Author

cre8 commented May 7, 2024

@berendsliedrecht @TimoGlastra To make a clean PR, how should we proceed? Merge this PR and then open another to transfer the Lib directly into the repo.

Or do all in one step? I would prefer the first option since it makes a cleaner cut between the two tasks

Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @cre8, we were intending to start work on this later this month, and left some comments based on how we wanted to approach it

packages/sd-jwt-vc/src/index.ts Outdated Show resolved Hide resolved
packages/sd-jwt-vc/src/test/index.spec.ts Show resolved Hide resolved
packages/sd-jwt-vc/src/test/index.spec.ts Show resolved Hide resolved
packages/sd-jwt-vc/src/index.ts Outdated Show resolved Hide resolved
cre8 and others added 6 commits May 7, 2024 11:08
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Mirko Mollik <mirkomollik@gmail.com>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
… feat/jwt-status-list

Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
@berendsliedrecht
Copy link
Contributor

@berendsliedrecht @TimoGlastra To make a clean PR, how should we proceed? Merge this PR and then open another to transfer the Lib directly into the repo.

Or do all in one step? I would prefer the first option since it makes a cleaner cut between the two tasks

First option is fine for me.

@cre8
Copy link
Contributor Author

cre8 commented May 7, 2024

@berendsliedrecht @TimoGlastra To make a clean PR, how should we proceed? Merge this PR and then open another to transfer the Lib directly into the repo.
Or do all in one step? I would prefer the first option since it makes a cleaner cut between the two tasks

First option is fine for me.

Well, too late :D

cre8 and others added 4 commits May 7, 2024 12:45
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
Signed-off-by: Mirko Mollik <mollik@trustcerts.de>
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Mirko Mollik <mirkomollik@gmail.com>
Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work @cre8. LGTM ✅

I'm going to implement this into Credo directly, and will let you know if I encounter any issues

cre8 and others added 2 commits May 13, 2024 15:44
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Mirko Mollik <mirkomollik@gmail.com>
@cre8 cre8 merged commit 5711484 into openwallet-foundation-labs:main May 13, 2024
7 checks passed
@cre8 cre8 deleted the feat/jwt-status-list branch May 13, 2024 13:47
@cre8
Copy link
Contributor Author

cre8 commented May 13, 2024

@TimoGlastra new version 0.7.0 got released.

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

Successfully merging this pull request may close these issues.

Feat: Add revocation mechanism to sd-jwt-vc
4 participants