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 Download by Holder #24

Closed
10 tasks
Tracked by #2
jjeroch opened this issue Mar 19, 2024 · 0 comments
Closed
10 tasks
Tracked by #2

Credential Download by Holder #24

jjeroch opened this issue Mar 19, 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 19, 2024

Description:

We need to provide the ability for the issuer component to allow users to download credentials via a new API endpoint. The endpoint will be a GET request to /credential. This ticket involves creating the necessary backend functionality to handle the request, authenticate the user, retrieve the credential from the storage, and return it to the user in a secure manner.

Endpoint (new): /api/verifiedCredential/{credentialID}
Description:
The endpoint enables users to download the credential (full json) of their own company.
It is not allowed to fetch unsigned credentials or credentials of any other company.
The credential type inside table documents must be defined (per config) and the status of the credential MUST be ACTIVE or INACTIVE


Acceptance Criteria:

  1. API Endpoint Creation: A new API endpoint GET /credential must be created.
  2. Authentication: The endpoint must require user authentication. Only authenticated users should be able to access the endpoint.
  3. Authorization: Proper authorization checks must be in place to ensure that users can only download credentials they are entitled to. Client: Issuer Client
  4. Credential Retrieval: The system must retrieve the correct credential from the storage based on the provided parameters (e.g., credential ID).
  5. Data Format: The credential should be returned in a standard format (JSON).
  6. Error Handling: Proper error handling should be implemented. This includes handling cases where the credential does not exist, the user is not authorized (calling a credential which belongs to a different company), or any other exception occurs.
  7. Security: Ensure that the transmission of the credential is done over a secure channel (HTTPS).
  8. Unit Tests: Write unit tests covering the new functionality with a focus on the security aspects and the business logic.
  9. Documentation: Update the API documentation to include the new endpoint, its parameters, response format, and any error messages. (Swagger)

Tasks:

  • Design the API interface for the credential download endpoint.
  • Implement authentication and authorization checks for the new endpoint.
  • Develop the logic to retrieve the credential from the database or file storage.
  • Implement the API endpoint to handle the GET request and return the credential.
  • Ensure the credential is returned in the correct format.
  • Implement comprehensive error handling for the endpoint.
  • Write unit tests for the new functionality.
  • Update the API documentation with the new endpoint details.
  • Deploy the new endpoint to the dev environment for testing.
  • Validate the functionality in the dev environment.
@jjeroch jjeroch added the Sub-task A small piece of work that's part of a larger task. label Mar 19, 2024
@jjeroch jjeroch added this to the CX Release 24.05 (dev) milestone Mar 19, 2024
@jjeroch jjeroch added this to Portal Mar 19, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Mar 19, 2024
@jjeroch jjeroch moved this from NEW USER REQUEST to BACKLOG in Portal Mar 19, 2024
Phil91 added a commit that referenced this issue Apr 2, 2024
Phil91 added a commit that referenced this issue Apr 2, 2024
@Phil91 Phil91 moved this from BACKLOG to IN PROGRESS in Portal Apr 3, 2024
Phil91 added a commit that referenced this issue Apr 8, 2024
Phil91 added a commit that referenced this issue Apr 8, 2024
Phil91 added a commit that referenced this issue Apr 10, 2024
Phil91 added a commit that referenced this issue Apr 24, 2024
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]>
@Phil91 Phil91 moved this from IN PROGRESS to IN REVIEW in Portal Apr 29, 2024
@evegufy evegufy closed this as completed Oct 18, 2024
@github-project-automation github-project-automation bot moved this from IN REVIEW to USER READY in Portal Oct 18, 2024
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
Archived in project
Development

No branches or pull requests

3 participants