-
Notifications
You must be signed in to change notification settings - Fork 233
feat: support w3c revocation #2072
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
base: main
Are you sure you want to change the base?
feat: support w3c revocation #2072
Conversation
|
Hello @TimoGlastra, wanting to create a separate PR for w3c revocation, due to some conflicts in the original PR #2024 . I'll start with integrating the changes you suggested |
b2e1d60
to
078c43c
Compare
...ules/vc/models/credential/w3c-credential-status/bitstring-status-list/BitStringStatusList.ts
Outdated
Show resolved
Hide resolved
535cdbd
to
f5671a7
Compare
9786c84
to
22a8462
Compare
As per the discussion in the community call(with @TimoGlastra and @genaris ), the index allocation logic and the logic to revoke credential should be part of the revokers preference and credo must only be responsible for signing the BitSting status list credential and issuing a revocable credential containing a valid credential status property. Apologies as the PR is getting de-prioritized from my end. Looking forward to your reviews |
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> feat: support w3c revocation Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: verify credential status Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: rearrange files Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: remove unnecessary code from credentials API Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: remove unnecessary code from credentials API Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: remove bitstring specific credential status from jsonld cred formats Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: add appropriate format based error Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: rename symbol Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: update folder name Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: typing and other minor issues while verifying Bitstring status list credential Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: add named imports from pako Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: update error for verifying bit string status list credential Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: move validate status logic to libraries Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> refactor: Invalidate array of bitStringStatusListCredential Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> refactor: export files from index Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> refactor: separate bitstring statuslist and bitstring status list credential Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> feat: add CredentialStatusBasedOnType Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> reactor: remove duplicate code Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: add comment Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: add credential status compare while verifyReceivedCredentialMatchesRequest Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: remove credentialStatus from unsupported fields while accepting request Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: imports Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: update imports Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: imports Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: update minor type changes Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: remove unnecessary tranformation Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: verification of bitstring status list credential after fetching Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> chore: push pnpm-lock file Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: take claimformat from options instead of from credential record, which might not always be present Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: completed TODO Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> fix: check signature of fetched credential, w3cjwt support Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
…ocation separated from credo Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
…ocation separated from credo Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
f44a16a
to
748731e
Compare
Hello @genaris @TimoGlastra I understand you guys are quite occupied with all the interesting work going on in credo. Since this PR is quite raw, your feedback is quite essential to accommodate changes based on them. Thank you once again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @GHkrishna ! In general it looks good to me, as it is a good first step to support Bitstring Status lists.
I think it would be good to add some tests as well.
...ules/vc/models/credential/w3c-credential-status/bitstring-status-list/BitStringStatusList.ts
Outdated
Show resolved
Hide resolved
packages/didcomm/src/modules/credentials/formats/jsonld/JsonLdCredentialFormat.ts
Outdated
Show resolved
Hide resolved
@@ -58,6 +58,8 @@ | |||
"lru_map": "^0.4.1", | |||
"make-error": "^1.3.6", | |||
"object-inspect": "^1.10.3", | |||
"pako": "^2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does pako work fine in react native? How does it compare with other modules such as fflate? I'm asking this because we want core to be as smaller as possible and it looks like pako is a bit heavy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that's a good suggestion, I'm all in on keeping core as small as possible,
Pako did work fine with an android device.
I was not aware about fflate, will have a look at it.
packages/core/src/modules/vc/models/credential/w3c-credential-status/W3cCredentialStatus.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Yes sure, I just wanted to make sure, we are on the right track before starting with the test cases. I think this is a good time to start now. |
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Ariel, currently I'm adding testcases for revocable credential in addition to that of the existing ones(non-revocable w3c) instead of replacing/editing them. |
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com>
What
This PR introduces support for W3C credential revocation. The following changes have been made:
Refactor functionality for Verify Credential and Verify Presentation.
Integrated with the Bit String Status List for checking and updating credential status.
How
Revocation Flow: Implemented the revocation flow by checking a credential status and updating the credential issuance process to handle revocable credentials.
Integration: Integrated the new revocation features with the existing system, ensuring compatibility and proper handling of revoked credentials.
TO DO:
- [ ] Keep track of occupied and/or free spaces in the BSLC- [ ] Endpoints to create and post(host) a BitstringStatusList Credential(However, ability to verify signature of fetched credential is required)
- [ ] Update records as per occupied (both locally as well as on the server)- [ ] Revoking(change status of) a w3cCredential (issued by issuer or others capable of revoking the credential)(Might add some related taxs)