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

Credential Revocation by holder #14

Open
Tracked by #2 ...
jjeroch opened this issue Mar 6, 2024 · 0 comments
Open
Tracked by #2 ...

Credential Revocation by holder #14

jjeroch opened this issue Mar 6, 2024 · 0 comments
Assignees
Labels
Sub-task A small piece of work that's part of a larger task.

Comments

@jjeroch
Copy link
Contributor

jjeroch commented Mar 6, 2024

Summary

Revocation request by the holder of the credential.
The revocation itself will be inside the revocation of the issuer since the credential status list is located inside the issuer wallet.

Details

Task: Implement Credential Revocation Interface for Customer

implement a credential revocation interface for customers. This interface will allow customers to revoke their credentials, such as frameworkAgreement or BPN, in case of security concerns or account compromise. The interface should follow the specified requirements:

  1. Revocation Method: Implement a method revokeCredential that takes the customer's credential unique identifier to be revoked as input parameters.

  2. Validation: Before revoking the credential, validate the customer's identity to ensure that they have the authority to revoke the credential.

  • Validate customer permission
  • Validate the customer jwt claim "bpn" - must be the same as the wallet instance bpn
  1. Revocation Process: Once the customer's identity is validated, perform the necessary steps to revoke the credential. Details see below

To implement this function, we first of all need a new endpoint inside the issuer component which can get called by the holder.

Endpoint: /api/revocation/credentials/{credentialId}
HTTP Method: POST
Authority: revoce_credential
Validation:
the endpoint can get called by the holder to revoke the credential

  1. validate if the holder calling the credential revocation is the holder
  2. validate if the credential is revocable (active)
  • if "yes" proceed
  • if "no" repsonse "already done"
  1. run the revocation process on the wallet side (details see below)
  2. with the response of success (from the wallet side); take the following updates
  • set the document inside the documents table to "INACTIVE"
  • set the credential request inside the ssi_details table to "REVOKED"


The new API Endpoint should support following responses:

  • Status Code: 200 OK
  • Status Code: 401 Unauthorized (if authentication fails)
  • Status Code: 403 Forbidden (if authorization fails)
  • Status Code: 404 Not Found (if credential id is not found)
  • Status Code: 500 Internal Server Error (for any other server-side errors)


DIM WALLET REVOCATION

Endpoint: /api/v2.0.0/credentials/{credentialId}

HTTP Method: PATCH

Request Headers:

  • Content-Type: application/json
  • Authorization: Bearer [access_token] (for authentication and authorization)

Request Body:

{
  "payload": {
    "update": {
      "name": "???",
      "description": "revoke",
      "credentialSubject": {
        "id": "???",
        "email": "???"
      }
    }
  }
}


MANDATORY TEST:
try to revoke a credential by the holder of another customer

@jjeroch jjeroch added the Sub-task A small piece of work that's part of a larger task. label Mar 6, 2024
@jjeroch jjeroch added this to the CX Release 24.05 (dev) milestone Mar 6, 2024
@jjeroch jjeroch changed the title Revocation by holder Credential Revocation by holder Mar 14, 2024
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 27, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 28, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Mar 28, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Apr 8, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Apr 8, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Apr 10, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Apr 24, 2024
* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired

Refs: #14 #15 #16
Phil91 added a commit that referenced this issue Apr 26, 2024
* feat(revocation): add endpoints to revoke credentials

* add endpoint for issuer to revoke a credential
* add endpoint for holder to revoke a credential
* add logic to revoke credentials when they are expired
* feat(download): add credential download endpoint
* chore: adjust statusList Url

Refs: #14 #15 #16  #24

---------

Co-authored-by: Norbert Truchsess <[email protected]>
Reviewed-by: Norbert Truchsess <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sub-task A small piece of work that's part of a larger task.
Projects
Status: IN REVIEW
Development

No branches or pull requests

2 participants