Skip to content

Commit

Permalink
Merge pull request #23 from catenax-ng/fix-timeout-status-list-creden…
Browse files Browse the repository at this point in the history
…tial

Fix timeout status list credential
  • Loading branch information
carslen committed Feb 23, 2023
2 parents bcf0c8a + dc1a79f commit fb73b1e
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 21 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ docker run --env-file .env.docker -p 8080:8080 managed-identity-wallets:<VERSION
kubectl -n managed-identity-wallets create secret generic managed-identity-wallets-secrets \
--from-literal=miw-db-jdbc-url='jdbc:postgresql://<placeholder>:5432/<database name>?user=<database user>&password=<<database password>>' \
--from-literal=miw-auth-client-id='ManagedIdentityWallets' \
--from-literal=miw-auth-client-secret='<placeholder>'
--from-literal=miw-auth-client-secret='<placeholder>' \
--from-literal=bpdm-auth-client-id='<placeholder>' \
--from-literal=bpdm-auth-client-secret='<placeholder>'
kubectl -n managed-identity-wallets create secret generic managed-identity-wallets-acapy-secrets \
--from-literal=acapy-endorser-wallet-key='<placeholder>' \
Expand Down
4 changes: 2 additions & 2 deletions charts/managed-identity-wallets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/managed-identity-wallets/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/managed-identity-wallets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
)
}
}
}
Expand All @@ -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
)
}
}
}
Expand All @@ -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
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ class ManagedWalletAriesEventHandlerTest {
.whenever(acaPyServiceMocked).acceptConnectionRequest(any(), anyOrNull())
val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler(
walletService = walletServiceSpy,
revocationService = revocationServiceMocked,
webhookService = webhookServiceMocked,
utilsService = utilsService
)
Expand Down Expand Up @@ -274,7 +273,6 @@ class ManagedWalletAriesEventHandlerTest {
.whenever(acaPyServiceMocked).acceptConnectionRequest(any(), anyOrNull())
val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler(
walletService = walletServiceSpy,
revocationService = revocationServiceMocked,
webhookService = webhookServiceMocked,
utilsService = utilsService
)
Expand Down Expand Up @@ -335,7 +333,6 @@ class ManagedWalletAriesEventHandlerTest {

val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler(
walletService = walletServiceSpy,
revocationService = revocationServiceMocked,
webhookService = webhookServiceMocked,
utilsService = utilsService
)
Expand Down Expand Up @@ -402,7 +399,6 @@ class ManagedWalletAriesEventHandlerTest {

val managedWalletAriesEventHandler = ManagedWalletsAriesEventHandler(
walletService = walletServiceSpy,
revocationService = revocationServiceMocked,
webhookService = webhookServiceMocked,
utilsService = utilsService
)
Expand Down

0 comments on commit fb73b1e

Please sign in to comment.