Install plugin under /usr/libexec (#7)
ci / pre-commit (push) Has been cancelled
ci / lint (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (push) Has been cancelled
release / release (push) Has been cancelled

Plugin binaries are internal executables run by Vault/OpenBao, not by users, so FHS places them under /usr/libexec (which also gives them the SELinux bin_t label).

- vault RPM installs to /usr/libexec/vault-plugins, openbao RPM to /usr/libexec/openbao-plugins
- preinstall scripts create the new directories
- README install example uses the packaged path

Reviewed-on: #7
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #7.
This commit is contained in:
2026-11-19 22:31:46 +11:00
committed by BenVincent
parent 681bd8264f
commit a94472cbef
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ nfpms:
- &rpm
id: vault
package_name: vault-plugin-secrets-gpg
bindir: /opt/vault-plugins
bindir: /usr/libexec/vault-plugins
scripts:
preinstall: packaging/scripts/preinstall-vault.sh
replaces: [vault-plugin-secrets-gpg]
@@ -37,7 +37,7 @@ nfpms:
- <<: *rpm
id: openbao
package_name: openbao-plugin-secrets-gpg
bindir: /opt/openbao-plugins
bindir: /usr/libexec/openbao-plugins
scripts:
preinstall: packaging/scripts/preinstall-openbao.sh
replaces: [openbao-plugin-secrets-gpg]
+4 -4
View File
@@ -32,14 +32,14 @@ or build one:
make build # -> dist/vault-plugin-secrets-gpg
```
Copy the binary into the server's `plugin_directory`, then register it in the
The RPM installs the binary to `/usr/libexec/vault-plugins` (openbao flavour:
`/usr/libexec/openbao-plugins`); point the server's `plugin_directory` there, or
copy a built binary into your configured directory. Then register it in the
plugin catalog and enable the engine. On OpenBao, run the same commands with
`bao` in place of `vault`.
The example assumes `plugin_directory = "/etc/vault/plugins"`; use the
directory set in your server config.
```sh
SHA256=$(sha256sum /etc/vault/plugins/vault-plugin-secrets-gpg | cut -d' ' -f1)
SHA256=$(sha256sum /usr/libexec/vault-plugins/vault-plugin-secrets-gpg | cut -d' ' -f1)
vault plugin register -sha256="$SHA256" secret vault-plugin-secrets-gpg
vault secrets enable -path=gpg vault-plugin-secrets-gpg
```
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
# Ensure the plugin directory exists before the binary is laid down.
mkdir -p /opt/openbao-plugins
mkdir -p /usr/libexec/openbao-plugins
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
# Ensure the plugin directory exists before the binary is laid down.
mkdir -p /opt/vault-plugins
mkdir -p /usr/libexec/vault-plugins