-
Notifications
You must be signed in to change notification settings - Fork 20
Description
PROBLEM SUMMARY
When attempting to revoke a venafi-pki certificate through Terraform's vault_pki_secret_backend_cert resource, it fails with the error
Code: 404. Errors:
│
│ * 1 error occurred:
│ * unsupported path
STEPS TO REPRODUCE
- Issue a certificate using Terraform's vault provider and the resource vault_pki_secret_backend_cert with
revoke = trueconfigured. - Destroy the vault_pki_secret_backend_cert resource
EXPECTED RESULTS
Certificate should be revoked.
ACTUAL RESULTS
The vault provider attempts to revoke the certificate using the path "/revoke" but the vault-pki-backend-venafi plugin expects this to be /revoke/. Weirdly, it also expects the role to be provided in the payload... this should adhere to the standards Hashicorp have implemented (although poorly documented) to ensure interoperability with Terraform.
ENVIRONMENT DETAILS
vault-pki-backend-venafi v0.14.0
vault enterprise v1.16.1
COMMENTS/WORKAROUNDS
This works from the vault CLI using the /revoke/ path. I've also tested with a POST command using the API and it also works but MUST have the role name supplied in the path. Given the role is already part of the schema, this seems to be an easy fix to line 20 on path_venafi_cert_revoke.go