-
Notifications
You must be signed in to change notification settings - Fork 6
cannot pass array of rules #57
Comments
There are no arrays, it is all still a hash. In the Vault issues, the question of getting examples of policies in json was submitted (hashicorp/vault#582). The last entry shows multiple policies example. |
yeah, I was just looking at line 76 of policy.js where the code says (_.isPlainObject(options.body.rules) || _.isArray(options.body.rules))) { so you are explicitly allowing an array to be passed - this will obviously not work, so I thought it would be better to throw an error at this point rather than at the vault side |
I thought an array might work at first but forgot to remove it. I will be dropping the check for array shortly. |
I will create add an item to include type checking for all parameters. Currently there is only checking for required inputs, but type checking has not been included as of yet. Array check removed with commit a9afcb7 |
Feature request #61 created closing this request. |
Following on from the excellent work done in #46 , there is a small problem in that although the vaulted code allows it, passing an array of rules to createPolicy barfs on the vault side
gives an error of
but if you pass in
all is well
The text was updated successfully, but these errors were encountered: