Thanks for your interest in improving hashicorp-vault. This document covers how
to build, test, and submit changes.
- Be respectful and constructive in all project spaces (see CODE_OF_CONDUCT.md).
- By contributing, you agree your contributions are licensed under the project's Apache-2.0 license.
- Security issues go through SECURITY.md, not public issues.
hashicorp-vault is a Rust cdylib plugin. You need a recent stable toolchain
(rustup recommended), and — until busbarAI
ships publicly — a sibling checkout of it at ../busbarAI, since this crate's
Cargo.toml points at busbar's crates as local path dependencies. See the
README's Dependencies section for the exact layout;
CI checks out GetBusbar/busbar at the branch named in
ci.yml's busbar_ref input to the same place.
The end-to-end test needs a real Vault dev-mode server:
docker run --rm -p 8200:8200 --cap-add=IPC_LOCK -e VAULT_DEV_ROOT_TOKEN_ID=root hashicorp/vaultcargo build --release # cdylib
BUSBAR_TEST_VAULT_ADDR=http://127.0.0.1:8200 BUSBAR_TEST_VAULT_TOKEN=root cargo test
cargo clippy --all-targets -- -D warnings # lints must be clean
cargo fmt --all -- --check # format before committingWithout a running Vault, cargo test still runs every hermetic unit test; the
end-to-end test in hashicorp-vault-plugin/tests/e2e.rs self-skips locally with a
message (it hard-fails instead of skipping under CI — see the README's
Tests section).
cargo fmt --all— code must be rustfmt-clean.cargo clippy --all-targets -- -D warnings— no warnings.cargo build && cargo test(against a real local Vault, see above) — green, including the end-to-enddlopen/Vault test inhashicorp-vault-plugin/tests/e2e.rs— it must never be allowed to quietly skip under CI.- Add or update tests for any behavior change.
- Update documentation (
README.md, doc comments) when you change behavior or config.
This repo is a 2-crate workspace, not a thin adapter reaching back into busbarAI for its real logic:
hashicorp-vault/(cratebusbar-hashicorp-vault) — the real Vault KV v2 HTTP client: field addressing, response-size capping, error classification. Most substantive Vault-logic changes belong here.hashicorp-vault-plugin/(cratebusbar-hashicorp-vault-plugin) — the thincdylibadapter: turns the engine's JSON config into aVaultConfig/VaultSecretModule(from the siblinghashicorp-vaultcrate) and hands the trait object tobusbar-plugin-sdk, which emits the C ABI symbols the loader resolves.
Changes to the ABI-crossing seam (hashicorp-vault-plugin/src/lib.rs) deserve
extra care: it hands real secret material back across the plugin ABI.
- Keep commits focused; squash noisy WIP commits before opening the PR.
- Write a clear PR description: what changed, why, and how it was verified.
- Reference any related issue.
- Stage files by name; avoid sweeping
git add -Athat pulls in unrelated changes.
Open a discussion or issue. We're happy to help you get oriented.