mojaloop-simulator helm chart template is not handling booleans logical comparisons correctly against VALIDATE_INBOUND_JWS value config #2083
Labels
bug
Something isn't working or it has wrong behavior on a Mojaloop Core service
infra-bug
An infrastructure issue or bug such as in helm charts or documentation
oss-core
This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
triaged
This bug has been triaged by the triage team!
Milestone
Summary:
When installing Mojaloop v12.0.0 and setting VALIDATE_INBOUND_JWS = "false" and pubKeyConfigMapName is not defined (or false) config values on the Mojaloop-simulator Helm chart <-- i.e. set
simulators.${each.value}.config.schemeAdapter.env.VALIDATE_INBOUND_JWS
to "false" as a string and not a booleanThe following error is displayed:
On line 12 of this template: https://github.com/mojaloop/helm/blob/master/mojaloop-simulator/templates/config-jws-public-keys.yaml#L12
You will notice that the if-statement is only comparing that the VALIDATE_INBOUND_JWS value is not "null" or false. So as long as the value is either a boolean
true
or is a string it will always be true.Severity:
Low
Priority:
Low
Expected Behavior
The following if-statement should not be entered when https://github.com/mojaloop/helm/blob/master/mojaloop-simulator/templates/config-jws-public-keys.yaml#L12:
simulators.${each.value}.config.schemeAdapter.env.VALIDATE_INBOUND_JWS
to a string such as "false" or "hello"simulators.${each.value}.config.schemeAdapter.env.VALIDATE_INBOUND_JWS
to a boolean falseSteps to Reproduce
simulators.${each.value}.config.schemeAdapter.env.VALIDATE_INBOUND_JWS
to "false" as a string and not a boolean, andsimulators.${each.value}.config.schemeAdapter.env.pubKeyConfigMapName
not set/definedSpecifications
Notes:
The text was updated successfully, but these errors were encountered: