Open jeffwhite06 opened 1 year ago
Hi @jeffwhite06 , thank you for reaching out!
This is not bug, this is intended, let me quote a colleague:
the
allowed_domains
andallow_subdomains
parameters are silently ignored the same as any invalid parameter would be. The documentation was written with a focus on showing how easy it is to transition away from the native Vault PKI to our secrets engine (i.e. just add thevenafi_secret
and you can keep the rest of the parameters the way they are—we’ll just ignore them if they don’t apply any longer). Now that we know most people are adopting our secrets engine from the beginning as opposed to transitioning from the native Vault PKI, I think we can remove those parameters from the README so there isn’t any confusion.
And this make sense, because we want you to manage policies or do policy enforcement within the Venafi Control Plane (either you are using TLSPC, previously know as VaaS or TLSPDC, previously know as TPP).
This is more of a issue in our README but not a bug in the code, so I'll remove it. We do need to update our documentation.
Thank you for raising the concern!
PROBLEM SUMMARY When specifying allowed_domains parameter on the role, the role should only issue certificates within the provided allowed domains.
This may be one of many constraints not being enforced. I also tested
allow_wildcard_certificates = false
and was also able to create a wildcard certificate.According to the documentation: https://developer.hashicorp.com/vault/docs/secrets/venafi These constraints should be enforced.
STEPS TO REPRODUCE Run terraform code provisioning the Venafi mount and role. Include the allowed_domains in the role creation. Attempt to issue a certificate using the role, with a domain name that is outside of the allowed domains.
EXPECTED RESULTS We expect that the creation of this certificate would be denied because the common_name domain requested is not within the allowed_domains on the role.
ACTUAL RESULTS The certificate gets created:
ENVIRONMENT DETAILS HCP Vault v1.14.3 Terraform 1.6.1 Terraform Vault provider v3.21.0
COMMENTS/WORKAROUNDS