eclipse-tractusx / managed-identity-wallet

Apache License 2.0
7 stars 20 forks source link

fix(IssueCredentialService): check if requested framework credential already exists #262

Closed neha-puraswani closed 2 months ago

neha-puraswani commented 4 months ago

Description

In the service layer, a new validation has been added that checks if a framework credential already exists with the same credential subject type for the requested holder. If the credential is present, a DuplicateCredentialProblem is thrown, else a new credential is issued.

Resolves #258

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

neha-puraswani commented 4 months ago

@borisrizov-zf we don't have any specific document that mentions the need for a unique FrameworkCredential.

However, as per the current flow in Catnena-X, we are issued a framework VC once we sign contract with the customer (customer requests FrameworkCredential using the portal UI, that the portal admin accepts. Once the request is accepted, we issue the requested VC).

In the portal it is not possible to request same type of VC multiple times (same as membership and dismentaler VC). So owing to the current scenario, all CX type of VC must be issued once.

We can think on re-issuing of the VC if the VC has expired or has been revoked.

borisrizov-zf commented 4 months ago

@OSchlienz please take a look, if this is aligned with your understanding of the MIW then I don't see a reason to not merge.

borisrizov-zf commented 3 months ago

@neha-smartsense please rebase and i can merge.

neha-puraswani commented 3 months ago

@borisrizov-zf the PR should be ready to merge as I don't see any new commits since last month

borisrizov-zf commented 3 months ago

@neha-smartsense Please rebase using the develop branch. That one has been updated and is the active development branch.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
15 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

neha-puraswani commented 3 months ago

Hi @borisrizov-zf, I have rebased using develop branch and also updated the base branch of this commit to the same.

nitin-vavdiya commented 2 months ago

This is no longer valid to align with issuer component changes, I think we can close this PR

borisrizov-zf commented 2 months ago

@nitin-vavdiya Ok, thank you for the update. I'll close for now.