diff --git a/README.md b/README.md index e4406b6f..d4660316 100644 --- a/README.md +++ b/README.md @@ -292,7 +292,9 @@ docker run --env-file .env.docker -p 8080:8080 managed-identity-wallets::5432/?user=&password=<>' \ --from-literal=miw-auth-client-id='ManagedIdentityWallets' \ - --from-literal=miw-auth-client-secret='' + --from-literal=miw-auth-client-secret='' \ + --from-literal=bpdm-auth-client-id='' \ + --from-literal=bpdm-auth-client-secret='' kubectl -n managed-identity-wallets create secret generic managed-identity-wallets-acapy-secrets \ --from-literal=acapy-endorser-wallet-key='' \ diff --git a/charts/managed-identity-wallets/Chart.yaml b/charts/managed-identity-wallets/Chart.yaml index 54aef7de..1b11e907 100644 --- a/charts/managed-identity-wallets/Chart.yaml +++ b/charts/managed-identity-wallets/Chart.yaml @@ -15,8 +15,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.0 -appVersion: 3.3.0 +version: 0.7.1 +appVersion: 3.3.1 dependencies: - name: postgresql diff --git a/charts/managed-identity-wallets/README.md b/charts/managed-identity-wallets/README.md index c11c160d..7e3fc51f 100644 --- a/charts/managed-identity-wallets/README.md +++ b/charts/managed-identity-wallets/README.md @@ -1,6 +1,6 @@ # managed-identity-wallets -![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.0](https://img.shields.io/badge/AppVersion-3.3.0-informational?style=flat-square) +![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.1](https://img.shields.io/badge/AppVersion-3.3.1-informational?style=flat-square) Managed Identity Wallets Service @@ -104,7 +104,7 @@ Managed Identity Wallets Service | postgresql.primary.extraVolumes[0].name | string | `"initdb"` | | | postgresql.primary.extraVolumes[0].emptyDir | object | `{}` | | | postgresql.primary.initContainers[0].name | string | `"initdb"` | | -| postgresql.primary.initContainers[0].image | string | `"ghcr.io/catenax-ng/tx-managed-identity-wallets_initdb:3.2.0"` | The image is built and used to initialize the database of MIW. The tag must equal the appVersion in Chart.yaml | +| postgresql.primary.initContainers[0].image | string | `"ghcr.io/catenax-ng/tx-managed-identity-wallets_initdb:3.3.1"` | The image is built and used to initialize the database of MIW. The tag must equal the appVersion in Chart.yaml | | postgresql.primary.initContainers[0].imagePullPolicy | string | `"Always"` | | | postgresql.primary.initContainers[0].command[0] | string | `"sh"` | | | postgresql.primary.initContainers[0].args[0] | string | `"-c"` | | diff --git a/charts/managed-identity-wallets/values.yaml b/charts/managed-identity-wallets/values.yaml index d88a4820..51fcede1 100644 --- a/charts/managed-identity-wallets/values.yaml +++ b/charts/managed-identity-wallets/values.yaml @@ -169,7 +169,7 @@ postgresql: initContainers: - name: initdb # -- The image is built and used to initialize the database of MIW. The tag must equal the appVersion in Chart.yaml - image: ghcr.io/catenax-ng/tx-managed-identity-wallets_initdb:3.2.0 + image: ghcr.io/catenax-ng/tx-managed-identity-wallets_initdb:3.3.1 imagePullPolicy: Always command: - sh diff --git a/gradle.properties b/gradle.properties index f858bd42..a89baa11 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,6 @@ acapy_java_library_version=0.7.33 kotlin.code.style=official kompendium_version=2.3.5 exposed_version=0.38.2 -version=3.3.0 +version=3.3.1 coverage_excludes=**/models/**,**/entities/**,**/Application*,**/services/IWalletService*,**/services/IAcaPyService*,**/services/AcaPyService*,**/services/IBusinessPartnerDataService*,**/services/IRevocationService*,**/services/RevocationService* diff --git a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/routes/AppRoutes.kt b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/routes/AppRoutes.kt index 74ad6287..dd06b5dc 100644 --- a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/routes/AppRoutes.kt +++ b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/routes/AppRoutes.kt @@ -118,7 +118,6 @@ fun Application.appRoutes( val topic = call.parameters["topic"] ?: throw BadRequestException("Missing or malformed topic") val managedWalletHandler = ManagedWalletsAriesEventHandler( walletService, - revocationService, webhookService, utilsService ) diff --git a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/AcaPyWalletServiceImpl.kt b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/AcaPyWalletServiceImpl.kt index 2ce5abcb..cf4b5cae 100644 --- a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/AcaPyWalletServiceImpl.kt +++ b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/AcaPyWalletServiceImpl.kt @@ -213,6 +213,18 @@ class AcaPyWalletServiceImpl( walletRepository.toObject(createdWalletData) } + try { + revocationService.issueStatusListCredentials( + profileName = utilsService.getIdentifierOfDid(createdDid.result.did), + force = true + ) + } catch (e: Exception) { + log.error( + "Error while issuing status list credential for DID ${createdDid.result.did}" + + "with message ${e.message}" + ) + } + acaPyService.sendConnectionRequest( didOfTheirWallet = utilsService.getIdentifierOfDid(getBaseWallet().did), usePublicDid = false, // It has no public DID yet diff --git a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/ManagedWalletsAriesEventHandler.kt b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/ManagedWalletsAriesEventHandler.kt index 123364f3..a2787ff0 100644 --- a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/ManagedWalletsAriesEventHandler.kt +++ b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/services/ManagedWalletsAriesEventHandler.kt @@ -37,7 +37,6 @@ import org.slf4j.LoggerFactory */ class ManagedWalletsAriesEventHandler( private val walletService: IWalletService, - private val revocationService: IRevocationService, private val webhookService: IWebhookService, private val utilsService: UtilsService ) : TenantAwareEventHandler() { @@ -81,10 +80,6 @@ class ManagedWalletsAriesEventHandler( if (connection.theirRole == ConnectionTheirRole.INVITER && connection.alias == "endorser") { walletService.setAuthorMetaData(walletId, connection.connectionId) walletService.setCommunicationEndpointUsingEndorsement(walletId) - revocationService.issueStatusListCredentials( - profileName = utilsService.getIdentifierOfDid(wallet.did), - force = true - ) } } } @@ -108,8 +103,10 @@ class ManagedWalletsAriesEventHandler( if (v20Credential.credOffer.formats[0].format == AriesLdFormats.ARIES_LD_PROOF_VC_DETAIL_V_1_0) { walletService.acceptReceivedOfferVc(walletId!!, v20Credential) } else { - log.warn("CredExRecord ${v20Credential.credentialExchangeId} has unsupported format " + - "${v20Credential.credOffer.formats[0].format}") + log.warn( + "CredExRecord ${v20Credential.credentialExchangeId} has unsupported format " + + v20Credential.credOffer.formats[0].format + ) } } } @@ -118,8 +115,10 @@ class ManagedWalletsAriesEventHandler( if (v20Credential.credIssue.formats[0].format == AriesLdFormats.ARIES_LD_PROOF_VC_V_1_0) { walletService.acceptAndStoreReceivedIssuedVc(walletId!!, v20Credential) } else { - log.warn("CredExRecord ${v20Credential.credentialExchangeId} has unsupported format " + - "${v20Credential.credIssue.formats[0].format}") + log.warn( + "CredExRecord ${v20Credential.credentialExchangeId} has unsupported format " + + v20Credential.credIssue.formats[0].format + ) } } } diff --git a/src/test/kotlin/org/eclipse/tractusx/managedidentitywallets/ManagedWalletAriesEventHandlerTest.kt b/src/test/kotlin/org/eclipse/tractusx/managedidentitywallets/ManagedWalletAriesEventHandlerTest.kt index 4379411e..4fc92464 100644 --- a/src/test/kotlin/org/eclipse/tractusx/managedidentitywallets/ManagedWalletAriesEventHandlerTest.kt +++ b/src/test/kotlin/org/eclipse/tractusx/managedidentitywallets/ManagedWalletAriesEventHandlerTest.kt @@ -199,7 +199,6 @@ class ManagedWalletAriesEventHandlerTest { .whenever(acaPyServiceMocked).acceptConnectionRequest(any(), anyOrNull()) val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler( walletService = walletServiceSpy, - revocationService = revocationServiceMocked, webhookService = webhookServiceMocked, utilsService = utilsService ) @@ -274,7 +273,6 @@ class ManagedWalletAriesEventHandlerTest { .whenever(acaPyServiceMocked).acceptConnectionRequest(any(), anyOrNull()) val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler( walletService = walletServiceSpy, - revocationService = revocationServiceMocked, webhookService = webhookServiceMocked, utilsService = utilsService ) @@ -335,7 +333,6 @@ class ManagedWalletAriesEventHandlerTest { val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler( walletService = walletServiceSpy, - revocationService = revocationServiceMocked, webhookService = webhookServiceMocked, utilsService = utilsService ) @@ -402,7 +399,6 @@ class ManagedWalletAriesEventHandlerTest { val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler( walletService = walletServiceSpy, - revocationService = revocationServiceMocked, webhookService = webhookServiceMocked, utilsService = utilsService )