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 16, 2024
1 parent 54dbd0e commit 8ec628e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,18 @@ spec:
- name: "WALLET__USERNAME"
value: "empty"
- name: "WALLET__ENCRYPTIONCONFIG__ENCRYPTIONCONFIGINDEX"
value: "{{ .Values.processesworker.wallet.encryptionConfigIndex }}"
value: "{{ .Values.service.credential.encryptionConfigIndex }}"
- name: "WALLET__ENCRYPTIONCONFIGS__0__INDEX"
value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.index}}"
value: "{{ .Values.service.credential.encryptionConfigs.index0.index}}"
- name: "WALLET__ENCRYPTIONCONFIGS__0__CIPHERMODE"
value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.cipherMode}}"
value: "{{ .Values.service.credential.encryptionConfigs.index0.cipherMode}}"
- name: "WALLET__ENCRYPTIONCONFIGS__0__PADDINGMODE"
value: "{{ .Values.processesworker.wallet.encryptionConfigs.index0.paddingMode}}"
value: "{{ .Values.service.credential.encryptionConfigs.index0.paddingMode}}"
- name: "WALLET__ENCRYPTIONCONFIGS__0__ENCRYPTIONKEY"
valueFrom:
secretKeyRef:
name: "{{ template "issuer.secretName" . }}"
key: "process-wallet-encryption-key0"
key: "credential-encryption-key0"
ports:
- name: http
containerPort: {{ .Values.portContainer }}
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 @@ -37,13 +37,11 @@ data:
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 -}}
11 changes: 1 addition & 10 deletions charts/ssi-credential-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ service:
credential:
issuerDid: "did:web:example"
issuerBpn: "BPNL00000001TEST"
statusListUrl: "https://example.org/statuslist"
statusListUrl: "https://example.org/statuslist"

Check failure on line 62 in charts/ssi-credential-issuer/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

62:52 [trailing-spaces] trailing spaces
encryptionConfigIndex: 0
encryptionConfigs:
index0:
Expand Down Expand Up @@ -124,15 +124,6 @@ processesworker:
clientId: "wallet-client-id"
# -- Client-secret for wallet client-id. Secret-key 'wallet-client-secret'.
clientSecret: ""
encryptionConfigIndex: 0
encryptionConfigs:
index0:
index: 0
cipherMode: "CBC"
paddingMode: "PKCS7"
# -- EncryptionKey for wallet. Secret-key 'process-wallet-encryption-key0'.
# Expected format is 256 bit (64 digits) hex.
encryptionKey: ""

credentialExpiry:
name: "expiry"
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 @@ -78,9 +78,6 @@ processesworker:
wallet:
clientId: "<path:portal/data/ssi-credential-issuer/dev/wallet#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/dev/wallet#clientSecret>"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/dev/wallet#encryptionKey0>"

credentialExpiry:
image:
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 @@ -69,9 +69,6 @@ processesworker:
wallet:
clientId: "<path:portal/data/ssi-credential-issuer/int/wallet#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/int/wallet#clientSecret>"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/int/wallet#encryptionKey0>"

credentialExpiry:
logging:
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 @@ -78,9 +78,6 @@ processesworker:
wallet:
clientId: "<path:portal/data/ssi-credential-issuer/dev/wallet#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/dev/wallet#clientSecret>"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/dev/wallet#encryptionKey0>"

credentialExpiry:
image:
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 @@ -68,9 +68,6 @@ processesworker:
wallet:
clientId: "<path:portal/data/ssi-credential-issuer/int/wallet#clientId>"
clientSecret: "<path:portal/data/ssi-credential-issuer/int/wallet#clientSecret>"
encryptionConfigs:
index0:
encryptionKey: "<path:portal/data/ssi-credential-issuer/int/wallet#encryptionKey0>"

credentialExpiry:
logging:
Expand Down

0 comments on commit 8ec628e

Please sign in to comment.