Skip to content

Revoke from Terraform vault_pki_secret_backend_cert fails #170

@MasakariDOR

Description

@MasakariDOR

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

  1. Issue a certificate using Terraform's vault provider and the resource vault_pki_secret_backend_cert with revoke = true configured.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions