hashicorp / vault

A tool for secrets management, encryption as a service, and privileged access management
https://www.vaultproject.io/
Other
31.3k stars 4.23k forks source link

The plugin is not marked as a secret plugin when registered with a version #28936

Open morganBlanloeil opened 1 week ago

morganBlanloeil commented 1 week ago

Describe the bug When we register a custom plugin, this plugin is not marked as secret plugin when we use vault API. This blocks the use of other endpoints like /sys/plugins/catalog/secret

To Reproduce Steps to reproduce the behavior:

  1. Ensure you configure plugin_repository
  2. Run vault plugin register sha256=<sample-sha-256> -command=<plugin-name> version=1.0.1 secret <plugin-name>
  3. See error with curl -H 'X-Vault-Token: <my-token>' --request LIST https://127.0.0.1:8200/v1/sys/plugins/catalog/secret our plugin doest not appear

Expected behavior

Plugin should be marked as secret plugin. To Bypass we need to register plugin first without version !

Environment:

Thanks!

stevendpclark commented 1 week ago

Thanks @morganBlanloeil for filing the issue. I've confirmed what you are seeing. A few extra notes on the issue.

  1. The registered plugin is usable through a vault secrets enable ... command.
  2. The registered plugin does appear in the detailed section of the GET http://127.0.0.1:8200/v1/sys/plugins/catalog request but it does not show up within the data.secret section of the response a. This is why the registered plugin does appear in the output of vault plugin list secret