Vault plugin error: unable to determine plugin type

Viewed 201

I am getting this error:

Error writing data to sys/plugins/catalog/example-auth-plugin: Error making API request.

URL: PUT http://127.0.0.1:1234/v1/sys/plugins/catalog/example-auth-plugin
Code: 500. Errors:

* 1 error occurred:
        * unable to determine plugin type

After running this command:

# vault write sys/plugins/catalog/example-auth-plugin \
>     sha_256="${SHA256}" \
>     command="vault-auth-plugin-example"

I am running everything in a container.

podman run \
        --rm \
        --cap-add=IPC_LOCK \
        -p '8200:8200' \
        -e 'VAULT_ADDR=127.0.0.1:1234' \
        -e 'VAULT_DEV_LISTEN_ADDRESS=127.0.0.1:1234' \
        -v './data/:/var/lib/vault' \
        -v './code/vault-auth-plugin-example:/etc/vault/plugins/vault-auth-plugin-example' \
        -e 'VAULT_LOCAL_CONFIG={"backend": {"file": {"path": "/vault/file"}}, "log_level": "debug", "disable_mlock": true, "listener": [{"tcp": {"tls_disable": true}}], "plugin_directory": "/etc/vault/plugins/", "default_lease_ttl": "168h", "max_lease_ttl": "720h"}' \
        --name=dev-pam-vault \
        vaultplugin

Vault version: Vault v1.3.0

I did run this command first:

export SHA256=$(shasum -a 256 "/etc/vault/plugins/vault-auth-plugin-example" | cut -d' ' -f1)

I also tried:

# vault write sys/plugins/catalog/example-auth-plugin \
>     sha_256="${SHA256}" \
>     command="vault-auth-plugin-example"

But then I get this error:

Error writing data to sys/plugin/catalog/example-auth-plugin: Error making API request.

URL: PUT http://127.0.0.1:1234/v1/sys/plugin/catalog/example-auth-plugin
Code: 404. Errors:

* 1 error occurred:
        * unsupported path

Any ideas?

Thank you in advance.

0 Answers
Related