Skip to content

support vault http methods and parameters

For now the vault client is limited to GET. Some secrets backends use POST with parameters. For instance to get a certificate we need to post and can give a common name

vault:${NAMESPACE}-role,post,common_name=${NAME}:/pki/issue/cert_name

To create an hmac with the transit we need post and input parameter

vault:${NAMESPACE}-role,post,input=:/transit/hmac/abuild

We redefined the args part of vault url to be positional parameters + keywords arguments separated by ,. We can add a positional argument for the method after the role (get,list,post), and add keywords arguments for the post payload. In case there is only one positional parameter (role), we default to get to maintain backwards compatibility.

The clean way of implementing this is through parsers combinators which will get rid of blind variable substitution.

Edited by Éric BURGHARD