diff --git a/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml b/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml index 2bb435ef..7266260c 100644 --- a/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml +++ b/charts/ssi-credential-issuer/templates/deployment-issuer-service.yaml @@ -131,6 +131,38 @@ spec: secretKeyRef: name: "{{ template "issuer.secretName" . }}" key: "credential-encryption-key0" + - name: "WALLET__BASEADDRESS" + value: "{{ .Values.walletAddress }}" + - name: "WALLET__CLIENTID" + value: "{{ .Values.processesworker.wallet.clientId }}" + - name: "WALLET__CLIENTSECRET" + valueFrom: + secretKeyRef: + name: "{{ template "issuer.secretName" . }}" + key: "wallet-client-secret" + - name: "WALLET__GRANTTYPE" + value: "{{ .Values.processesworker.wallet.grantType }}" + - name: "WALLET__TOKENADDRESS" + value: "{{ .Values.walletTokenAddress }}" + - name: "WALLET__PASSWORD" + value: "empty" + - name: "WALLET__SCOPE" + value: "{{ .Values.processesworker.wallet.scope }}" + - name: "WALLET__USERNAME" + value: "empty" + - name: "WALLET__ENCRYPTIONCONFIG__ENCRYPTIONCONFIGINDEX" + value: "{{ .Values.processesworker.wallet.encryptionConfigIndex }}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__INDEX" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.index}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__CIPHERMODE" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.cipherMode}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__PADDINGMODE" + value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.paddingMode}}" + - name: "WALLET__ENCRYPTIONCONFIGS__0__ENCRYPTIONKEY" + valueFrom: + secretKeyRef: + name: "{{ template "issuer.secretName" . }}" + key: "process-wallet-encryption-key0" ports: - name: http containerPort: {{ .Values.portContainer }} diff --git a/src/externalservices/Portal.Service/Services/PortalService.cs b/src/externalservices/Portal.Service/Services/PortalService.cs index 44c45bc6..475ce447 100644 --- a/src/externalservices/Portal.Service/Services/PortalService.cs +++ b/src/externalservices/Portal.Service/Services/PortalService.cs @@ -44,7 +44,7 @@ public async Task AddNotification(string content, Guid requester, NotificationTy { var client = await _tokenService.GetAuthorizedClient(_settings, cancellationToken).ConfigureAwait(false); var data = new NotificationRequest(requester, content, notificationTypeId); - await client.PostAsJsonAsync("api/notifications/management", data, Options, cancellationToken) + await client.PostAsJsonAsync("api/notifications/ssi-credentials", data, Options, cancellationToken) .CatchingIntoServiceExceptionFor("notification", HttpAsyncResponseMessageExtension.RecoverOptions.REQUEST_EXCEPTION) .ConfigureAwait(false); } @@ -53,7 +53,7 @@ public async Task TriggerMail(string template, Guid requester, IEnumerable(_settings, cancellationToken).ConfigureAwait(false); var data = new MailData(requester, template, mailParameters); - await client.PostAsJsonAsync("api/administration/mail", data, Options, cancellationToken) + await client.PostAsJsonAsync("api/administration/mail/ssi-credentials", data, Options, cancellationToken) .CatchingIntoServiceExceptionFor("mail", HttpAsyncResponseMessageExtension.RecoverOptions.REQUEST_EXCEPTION) .ConfigureAwait(false); } diff --git a/src/issuer/SsiCredentialIssuer.Service/appsettings.json b/src/issuer/SsiCredentialIssuer.Service/appsettings.json index 9726c0c8..191d8b6d 100644 --- a/src/issuer/SsiCredentialIssuer.Service/appsettings.json +++ b/src/issuer/SsiCredentialIssuer.Service/appsettings.json @@ -71,13 +71,6 @@ "StatusListUrl": "", "MaxPageSize": 15, "EncryptionConfigIndex": 0, - "EncryptionConfigs": [ - { - "Index": 0, - "EncryptionKey": "", - "CipherMode": "", - "PaddingMode": "" - } - ] + "EncryptionConfigs": [] } } diff --git a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs index 4420fbad..ef896cea 100644 --- a/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs +++ b/tests/credentials/SsiCredentialIssuer.Expiry.App.Tests/ExpiryCheckServiceTests.cs @@ -141,7 +141,6 @@ public async Task ExecuteAsync_WithPendingAndExpiryBeforeNow_DeclinesRequest() A.CallTo(() => _issuerRepositories.SaveAsync()).MustHaveHappenedOnceExactly(); A.CallTo(() => _processStepRepository.CreateProcess(ProcessTypeId.DECLINE_CREDENTIAL)).MustHaveHappenedOnceExactly(); A.CallTo(() => _processStepRepository.CreateProcessStep(ProcessStepTypeId.REVOKE_CREDENTIAL, ProcessStepStatusId.TODO, A._)).MustHaveHappenedOnceExactly(); - ssiDetail.CompanySsiDetailStatusId.Should().Be(CompanySsiDetailStatusId.INACTIVE); } [Theory] diff --git a/tests/issuer/SsiCredentialIssuer.Service.Tests/appsettings.IntegrationTests.json b/tests/issuer/SsiCredentialIssuer.Service.Tests/appsettings.IntegrationTests.json index 32a29359..845532d3 100644 --- a/tests/issuer/SsiCredentialIssuer.Service.Tests/appsettings.IntegrationTests.json +++ b/tests/issuer/SsiCredentialIssuer.Service.Tests/appsettings.IntegrationTests.json @@ -44,5 +44,24 @@ "PaddingMode": "PKCS7" } ] + }, + "Wallet": { + "Username": "empty", + "Password": "empty", + "ClientId": "sa-cl-test", + "GrantType": "client_credentials", + "ClientSecret": "test", + "Scope": "openid", + "TokenAddress": "https://example.org/auth/realms/xy/protocol/openid-connect/token", + "BaseAddress": "https://localhost:5001", + "EncryptionConfigIndex": 0, + "EncryptionConfigs": [ + { + "Index": 0, + "EncryptionKey": "9b1503084ab5638260079cb61b8ed2d1fde462b5a7608556516a1659aeb3f541", + "CipherMode": "CBC", + "PaddingMode": "PKCS7" + } + ] } }