Venafi / vault-pki-backend-venafi

Venafi PKI Secrets Engine plugin for HashiCorp Vault that enables certificate enrollment using Venafi machine identity services.
Mozilla Public License 2.0
54 stars 19 forks source link

venafi-pki plugin crashes with 500 error code #151

Open sbrar7 opened 1 month ago

sbrar7 commented 1 month ago

PROBLEM SUMMARY We are using venafi-pki plugin within our organisation integrated to Enterprise HashiCorp Vault. As part of the pattern we offer, we allow users to create certificates within their respective application and environment with some controls and rbac built in using a veanfi pki role starting with appid-env. path "venafi-pki/issue/appid-env-" { capabilities = ["read", "list", "create", "update"] required_parameters = ["common_name", "alt_names"] }

The issue is if the user uses a role that doesn't exist, the plugin crashed with 500 error rather than failing gracefully with 404 not found error.

STEPS TO REPRODUCE

ACTUAL RESULTS It should display 404 not found or related error

ENVIRONMENT DETAILS We are using Terraform for requesting certificate via Vault (which is integrated to TPP)

COMMENTS/WORKAROUNDS If you use a role name that exists, it works as expected.