Skip to content

Build the Vault plugin

From the repository root on Linux (Ubuntu, Kali, Mint, etc.), using the normal native build toolchain:

make deps -j8
make vault -j8
make test-vault -j8
make clean-vault

make vault incrementally builds the shared core and then the Go plugin on Linux itself. Go must satisfy vault-plugin-abe/go.mod (Go's automatic toolchain download can provide it). The plugin uses CGO and the same public header/library output as other consumers. Docker is not part of compilation. make deps is needed after modifying dependency sources; a missing ready marker also triggers it automatically, following the main project's existing rules. make clean-vault removes only build/artifacts/linux/vault/; native core, dependency output and Go caches are retained. make clean-deps removes the native dependency output for the current platform.

On Windows, enter your chosen Linux/WSL distribution first, then run the same commands from its shell. The Makefile does not select or launch a distribution:

make vault
make test-vault

Only Linux artifacts are produced. Native Windows/macOS invocations print an explanation and exit without compiling a plugin for the wrong platform.

Output is collected under build/artifacts/linux/vault/:

  • vault-plugin-abe
  • libhybrid-pq-cp-abe.so

Release CI also builds/tests this plugin on its Linux runner and publishes a separate vault-plugin-abe_linux_x86_64_v<VERSION>.zip alongside the native SDK packages. The archive includes both runtime files, a Covercrypt configuration example, documentation and third-party notices. Its extracted contents are tested against a Vault service before upload. Register vault-plugin-abe inside the archive; the executable keeps its standard name.

Deploy both files together. The loader uses the plugin's own directory as a runtime library search path. The build helper fingerprints the public headers and native library to invalidate CGO's cache after native changes; no source sync or global Go cache reset is needed. Native buffers are released through the same library's freeBuffer function.

Vault plugin README