-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Description
In TestPolicy_Parse from Vault, we test the following denied_parameters value:
path "test/types" {
capabilities = ["create", "sudo"]
allowed_parameters = {
"map" = [{"good" = "one"}]
"int" = [1, 2]
}
denied_parameters = {
"string" = ["test"]
"bool" = [false]
}
}This works in HCL but not in the equivalent JSON:
"test/types": {
"capabilities": ["create", "sudo"],
"allowed_parameters": {
"map": [{"good": "one"}],
"int": [1, 2]
},
"denied_parameters": {
"string": ["test"],
"bool": [false]
}
}This results in:
policy_test.go:494: [slice[8].Permissions.DeniedParameters.map[bool].slice[0]: <no value> != false slice[8].DeniedParametersHCL.map[bool].slice[0]: <no value> != false]
This is noted here:
Lines 238 to 239 in 02db497
| case token.BOOL: | |
| // TODO(arslan) should we support? not supported by HCL yet |
Changing the earlier conditional:
Line 222 in 02db497
| case token.NUMBER, token.FLOAT, token.STRING: |
works to fix this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels