derivepassphrase vault uses a very strict validator to ensure that a configuration is valid, both its contents and its types. For example, the configuration {"global": {"phrase": null}, "services": {}} is not valid according to derivepassphrase's validator, because the phrase value must be a string.
vault(1) however tests most of its parameters for falsy values (in the JavaScript sense), and so will accept the configuration {"global": {"phrase": null, "upper": ""}, "services": {}}, among others.
Therefore, in the interest of compatibility with vault(1), convert all falsy values to their correctly typed equivalent before validating them.
We shall still make sure that any configuration we write is valid according to our validator as well, not just vault(1)'s.
derivepassphrase vault
uses a very strict validator to ensure that a configuration is valid, both its contents and its types. For example, the configuration{"global": {"phrase": null}, "services": {}}
is not valid according toderivepassphrase
's validator, because thephrase
value must be a string.vault(1) however tests most of its parameters for falsy values (in the JavaScript sense), and so will accept the configuration
{"global": {"phrase": null, "upper": ""}, "services": {}}
, among others.Therefore, in the interest of compatibility with vault(1), convert all falsy values to their correctly typed equivalent before validating them.
We shall still make sure that any configuration we write is valid according to our validator as well, not just vault(1)'s.