Closed jmls closed 8 years ago
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 (https://github.com/hashicorp/vault/issues/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 a9afcb76fd4e5470e9993d9b41a572abd21cad24
Feature request #61 created
closing this request.
Following on from the excellent work done in https://github.com/chiefy/vaulted/issues/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