Skip to content

Commit

Permalink
fix(encryptionKey): align credential and wallet config
Browse files Browse the repository at this point in the history
Refs: #197
  • Loading branch information
Phil91 committed Jul 15, 2024
1 parent 54dbd0e commit 8a45c3e
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
valueFrom:
secretKeyRef:
name: "{{ template "issuer.secretName" . }}"
key: "credential-encryption-key0"
key: "process-wallet-encryption-key0"
- name: "WALLET__BASEADDRESS"
value: "{{ .Values.walletAddress }}"
- name: "WALLET__CLIENTID"
Expand Down
2 changes: 0 additions & 2 deletions charts/ssi-credential-issuer/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ data:
# use index function for secret keys with hyphen otherwise '$secret.data.secretKey' works too
portal-client-secret: {{ coalesce ( .Values.processesworker.portal.clientSecret | b64enc ) ( index $secret.data "portal-client-secret" ) | default ( randAlphaNum 32 ) | quote }}
wallet-client-secret: {{ coalesce ( .Values.processesworker.wallet.clientSecret | b64enc ) ( index $secret.data "wallet-client-secret" ) | default ( randAlphaNum 32 ) | quote }}
credential-encryption-key0: {{ coalesce ( .Values.service.credential.encryptionConfigs.index0.encryptionKey | b64enc ) ( index $secret.data "credential-encryption-key" ) | default ( randAlphaNum 32 ) | quote }}
process-wallet-encryption-key0: {{ coalesce ( .Values.processesworker.wallet.encryptionConfigs.index0.encryptionKey | b64enc ) ( index $secret.data "process-wallet-encryption-key" ) | default ( randAlphaNum 32 ) | quote }}
{{ else -}}
stringData:
# if secret doesn't exist, use provided value from values file or generate a random one
portal-client-secret: {{ .Values.processesworker.portal.clientSecret | default ( randAlphaNum 32 ) | quote }}
wallet-client-secret: {{ .Values.processesworker.wallet.clientSecret | default ( randAlphaNum 32 ) | quote }}
credential-encryption-key0: {{ .Values.service.credential.encryptionConfigs.index0.encryptionKey | default ( randAlphaNum 32 ) | quote }}
process-wallet-encryption-key0: {{ .Values.processesworker.wallet.encryptionConfigs.index0.encryptionKey | default ( randAlphaNum 32 ) | quote }}
{{ end }}
{{- end -}}
9 changes: 0 additions & 9 deletions charts/ssi-credential-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ service:
issuerDid: "did:web:example"
issuerBpn: "BPNL00000001TEST"
statusListUrl: "https://example.org/statuslist"
encryptionConfigIndex: 0
encryptionConfigs:
index0:
index: 0
cipherMode: "CBC"
paddingMode: "PKCS7"
# -- EncryptionKey for wallet. Secret-key 'credential-encryption-key0'.
# Expected format is 256 bit (64 digits) hex.
encryptionKey: ""

migrations:
name: "migrations"
Expand Down
3 changes: 0 additions & 3 deletions environments/consortia/helm-values/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ service:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/dev/credential#encryptionKey0>"
portal:
clientId: "<path:portal/data/ssi-credential-issuer/portal#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/dev/portal#clientSecret>"
Expand Down
3 changes: 0 additions & 3 deletions environments/consortia/helm-values/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ service:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/int/credential#encryptionKey0>"
portal:
clientId: "<path:portal/data/ssi-credential-issuer/portal#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/int/portal#clientSecret>"
Expand Down
3 changes: 0 additions & 3 deletions environments/consortia/helm-values/values-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ service:
issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/dev/credential#encryptionKey0>"
portal:
clientId: "<path:portal/data/ssi-credential-issuer/portal#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/dev/portal#clientSecret>"
Expand Down
3 changes: 0 additions & 3 deletions environments/helm-values/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ issuer:
issuerDid: "did:web:portal-backend.int.catena-x.net:api:administration:staticdata:did:BPNL00000003CRHK"
issuerBpn: "BPNL00000003CRHK"
statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/ba0cd4ef-63e0-4c13-829a-915c496dc836/3c7b17d8-fe44-4f08-9bf9-f786f8be73bf"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/int/credential#encryptionKey0>"
portal:
clientId: "<path:portal/data/ssi-credential-issuer/portal#clientId>"
clientSecret: "<path:portal/data/int/iam/centralidp-client-secrets#issuer-sa>"
Expand Down

0 comments on commit 8a45c3e

Please sign in to comment.