Hello,
is it somehow possible to use template IDs within parameter contraints in policy files? So to do something like:
path "secret/foo" {
capabilities = ["create"]
}
ie an account with this policy attached is able to add items to secret/foo, but it must supply its own entity name for the parameter "bar".
The actual goal is to have a policy for multiple machines A, B, C, which are allowed to request certificates via pki/issue, but only for their own hostname. So machine A should be able to request a certificate for CN=A, but not for CN=B. Of course I could create a separate PKI role for each machine (
https://www.vaultproject.io/api/secret/pki/index.html#create-update-role), with allowed_domains set to the corresponding hostname. But creating hundreds of PKI roles for each machine is kind of a nuisance... Instead I'd like to use a policy template or something similar to restrict the common_name parameter of the requests.