crates/e2e_test/src/kms/README.md
This directory contains the integration suites used to validate the full RustFS KMS (Key Management Service) workflow.
kms_local_test.rsEnd-to-end coverage for the local KMS backend:
kms_vault_test.rsEnd-to-end coverage for the Vault backend:
kms_comprehensive_test.rsFull KMS capability suite (currently disabled because of AWS SDK compatibility issues):
kms_integration_test.rsBroad integration tests that exercise:
System dependencies
# macOS
brew install vault awscurl
# Ubuntu/Debian
apt-get install vault
pip install awscurl
Build RustFS
cargo build
cd crates/e2e_test
cargo test test_local_kms_end_to_end -- --nocapture
cd crates/e2e_test
cargo test test_vault_kms_end_to_end -- --nocapture
cd crates/e2e_test
cargo test test_vault_kms_high_availability -- --nocapture
cd crates/e2e_test
# Disabled due to AWS SDK compatibility gaps
# cargo test test_comprehensive_kms_functionality -- --nocapture
# cargo test test_sse_modes_compatibility -- --nocapture
# cargo test test_kms_api_comprehensive -- --nocapture
cd crates/e2e_test
cargo test kms -- --nocapture
cd crates/e2e_test
cargo test kms -- --nocapture --test-threads=1
# Optional: custom RustFS port (default 9050)
export RUSTFS_TEST_PORT=9050
# Optional: custom Vault port (default 8200)
export VAULT_TEST_PORT=8200
# Optional: enable verbose logging
export RUST_LOG=debug
Tests look for:
../../target/debug/rustfs – RustFS servervault – Vault CLI (must be on PATH)/Users/dandan/Library/Python/3.9/bin/awscurl – AWS SigV4 helperrustfs-master-keyQ: RustFS server failed to become ready
lsof -i :9050
kill -9 <PID> # Free the port if necessary
Q: Vault fails to start
which vault
vault version
Q: awscurl authentication fails
ls /Users/dandan/Library/Python/3.9/bin/awscurl
# Or install elsewhere
pip install awscurl
which awscurl # Update the path in tests accordingly
Q: Tests time out
RUST_LOG=debug cargo test test_local_kms_end_to_end -- --nocapture
Enable verbose logs
RUST_LOG=rustfs_kms=debug,rustfs=info cargo test -- --nocapture
Keep temporary files – comment out cleanup logic to inspect generated configs
Pause execution – add std::thread::sleep for manual inspection during tests
Monitor ports
netstat -an | grep 9050
curl http://127.0.0.1:9050/minio/health/ready
Designed to run inside CI/CD pipelines:
- name: Run KMS E2E Tests
run: |
sudo apt-get update
sudo apt-get install -y vault
pip install awscurl
cargo build
cd crates/e2e_test
cargo test kms -- --nocapture --test-threads=1
These suites ensure KMS stability and reliability, building confidence for production deployments.