eclipse-tractusx / managed-identity-wallet

Apache License 2.0
7 stars 20 forks source link

Abstract key storage and signing operations to facilitate different key storage types #291

Closed PManaras closed 1 month ago

PManaras commented 2 months ago

This PR introduces support for implementing different types of keystorages via the newly KeyProvider interface. This interface can be used to retrieve keys from different types of storages, i.e. remote vaults, file-system, database.

The newly created SigningService can be used to implement different types of signature processes. The standard signature process is "LOCAL" meaning the MIW will use keys provided by the keyprovider to sign VP/VC locally.

This PR also adds to new properties to application.yaml (authoritySigningServiceType (defaults to "LOCAL), localSigningKeyStorageType (defaults to DB). These additions are also reflected in the corresponding env-files.

The database entity Wallet was updated and now contains a new field signingServiceType that reflects which wallet uses which signatureServices. The new field is introduced via a new database migration (v3) and sets the signing_service_type to "LOCAL" for all existing wallets. This means: with the standard configuration the MIW will act as before.

this PR includes changes made in the PR on the main-branch

Pre-review checks

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

This PR is qual to PR285 from a different merge source

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

nitin-vavdiya commented 1 month ago

License headers need to be updated in changed files

borisrizov-zf commented 1 month ago

@thackerronak @nitin-vavdiya We're ok to rebase this branch and do final testing before we merge.

nitin-vavdiya commented 1 month ago

@thackerronak @nitin-vavdiya We're ok to rebase this branch and do final testing before we merge.

Rebase is done, fixing failing test cases, will let you know once it is ready to merge

nitin-vavdiya commented 1 month ago

@borisrizov-zf Tested all APIs manually and all tests are also working as expected. This PR is ready to merge

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

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

See analysis details on SonarCloud

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 0.5.0-develop.18 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 5 hours ago

:tada: This issue has been resolved in version 0.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: