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

Issuer Component - POST create credential #7

Closed
Tracked by #416 ...
jjeroch opened this issue Feb 26, 2024 · 2 comments
Closed
Tracked by #416 ...

Issuer Component - POST create credential #7

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

Comments

@jjeroch
Copy link
Contributor

jjeroch commented Feb 26, 2024

Summary

Endpoint to create a credential based on the input received from the FE application - note when receiving the requests, any previous validations are already executed (e.g. validation of presentation).

Important - Request url encoded

Details

Endpoint: /createCredentialxxxxxx (bpn)

Method: POST

Request Body:

 {
  "holder": "{didDocumentLocation}",
  "businessPartnerNumber": ".....",
  "technicalUserDetails": {
       "clientId": "{clientID}",
       "clientSecret": "{secret}"
     }
   }

Response:

201 created
400 in case didDocumentLocation not found
400 in case BPNL does not follow the official pattern (16characters; start with "BPN" and only letters and digits) not found

Note: we decided to add the BPN field inside the request body. Reason: each company can have multiple BPNs (especially when it comes to BPNSs and BPNAs. To be flexible for the future; we decided to have a own property for the BPN attribute.


Endpoint: /createCredentialxxxxxx (membership)

Method: POST

Request Body:

 {
  "holder": "{didDocumentLocation}",
  "memberOf": ".....",
  "technicalUserDetails": {
       "clientId": "{clientID}",
       "clientSecret": "{secret}"
     }
   }

Response:

201 created
400 in case didDocumentLocation not found
400 in case memberOf not existing

Endpoint: /createCredentialxxxxxx (frameWork)

Method: POST

Request Body:

 {
  "holder": "{didDocumentLocation}",
  "useCaseFrameworkID": "{uuid}",
  "technicalUserDetails": {
       "clientId": "{clientID}",
       "clientSecret": "{secret}"
     }
   }

Response:

201 created
400 in case didDocumentLocation not found
400 in case useCaseFrameworkID not existing

Explanation:

  • The API endpoint /createCredentialxxxxx is used to create a new credential.
  • The request method is POST since we are creating a new resource.
  • The response is only a success/error information since further processes are running assynchron
  • the technical user details are optional in case those are not entered; the process will proceed (reason without technical user details we are not able to push the credential into the holder wallet BUT thats ok; we will offer the customer to download the credential and place it inside the holder wallet by himself)
  • Note: the newly created credential is supposed to get stored as .json file inside the ssi-credential-issuer.documents table with the status "Active"; Type: Credential; user id: tech user; timestamp as of today
  • The POST endpoints should be implemented as x-www-form-urlencoded
@jjeroch jjeroch added the Sub-task A small piece of work that's part of a larger task. label Feb 26, 2024
@jjeroch jjeroch added this to the CX Release 24.05 (dev) milestone Feb 26, 2024
@jjeroch jjeroch added this to Portal Feb 26, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Feb 26, 2024
@jjeroch jjeroch moved this from NEW USER REQUEST to BACKLOG in Portal Feb 29, 2024
@jjeroch
Copy link
Contributor Author

jjeroch commented Feb 29, 2024

Refinement with @Phil91 done; ticket moved to "Backlog"

@jjeroch jjeroch removed their assignment Feb 29, 2024
@jjeroch
Copy link
Contributor Author

jjeroch commented Mar 1, 2024

@Phil91 please note that I added at the bottom of the ticket the following bullet point:

  • Note: the newly created credential is supposed to get stored as .json file inside the ssi-credential-issuer.documents table with the status "Active"; Type: Credential; user id: tech user; timestamp as of today

@Phil91 Phil91 moved this from BACKLOG to IN PROGRESS in Portal Mar 5, 2024
@Phil91 Phil91 mentioned this issue Mar 8, 2024
9 tasks
@Phil91 Phil91 moved this from IN PROGRESS to IN REVIEW in Portal Mar 8, 2024
Phil91 added a commit that referenced this issue Mar 25, 2024
* feat: add issuer component
* build: add helm chart for issuer component
* feat(notification): adjust notification endpoint
* fix(build): enable build of docker images (#21)
* feat: add callback process step
* chore: enable helm chart (#22)
* fix: remove lint issue
* fix: solve templating issues
* chore: change setup of cronjobs: remove hooks
* chore: change name setup of job resources
* chore: add line breaks
* chore: move placeholder value into resources
* chore: change to unique templates for db subchart
* chore: change secret setup
* chore: move passwords from db dependency to according section
* chore: remove upgrade env file
* chore: change centralidp setup
* chore: rearrange health checks
* chore: rearrange values file
* chore: change ingress to trg-5.04
* chore: fix container name and namespace
* chore: change image tag retrieval
* chore: change version
* chore(db-dependency): change image tag to get latest minor updates
* chore: set resource limits
* chore: update readme files
* chore: change credentialexpiry to camelcase
* chore: fix helm chart, improve workflows and docs (#23)
* chore(helm-test): fix image name and tag override at upgrade
* chore: fix owasp scan
* chore(helm-test and owasp): change set command
* chore: re-arrange values file
* chore(pre-checks): run only on changes to src/**
* docs(CONTRIBUTING.md): update to contribution details
* chore: fix db dependency secret name in cronjobs
* chore(dependencies-check): align file naming and docs
* chore: remove white space

---------

Refs: #2 #3 #4 #5 #6 #7 #8 #9 #13 #21 #22 #23
Reviewed-by: Evelyn Gurschler <[email protected]>
Reviewed-by: Norbert Truchsess <[email protected]>
Co-authored-by: Evelyn Gurschler <[email protected]>
Co-authored-by: Norbert Truchsess <[email protected]>
Phil91 added a commit that referenced this issue Apr 8, 2024
* feat: add issuer component
* build: add helm chart for issuer component
* feat(notification): adjust notification endpoint
* fix(build): enable build of docker images (#21)
* feat: add callback process step
* chore: enable helm chart (#22)
* fix: remove lint issue
* fix: solve templating issues
* chore: change setup of cronjobs: remove hooks
* chore: change name setup of job resources
* chore: add line breaks
* chore: move placeholder value into resources
* chore: change to unique templates for db subchart
* chore: change secret setup
* chore: move passwords from db dependency to according section
* chore: remove upgrade env file
* chore: change centralidp setup
* chore: rearrange health checks
* chore: rearrange values file
* chore: change ingress to trg-5.04
* chore: fix container name and namespace
* chore: change image tag retrieval
* chore: change version
* chore(db-dependency): change image tag to get latest minor updates
* chore: set resource limits
* chore: update readme files
* chore: change credentialexpiry to camelcase
* chore: fix helm chart, improve workflows and docs (#23)
* chore(helm-test): fix image name and tag override at upgrade
* chore: fix owasp scan
* chore(helm-test and owasp): change set command
* chore: re-arrange values file
* chore(pre-checks): run only on changes to src/**
* docs(CONTRIBUTING.md): update to contribution details
* chore: fix db dependency secret name in cronjobs
* chore(dependencies-check): align file naming and docs
* chore: remove white space

---------

Refs: #2 #3 #4 #5 #6 #7 #8 #9 #13 #21 #22 #23
Reviewed-by: Evelyn Gurschler <[email protected]>
Reviewed-by: Norbert Truchsess <[email protected]>
Co-authored-by: Evelyn Gurschler <[email protected]>
Co-authored-by: Norbert Truchsess <[email protected]>
@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
leandro-cavalcante pushed a commit to leandro-cavalcante/ssi-credential-issuer that referenced this issue Oct 21, 2024
…dates (eclipse-tractusx#7)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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