Crates.io | nitor-vault |
lib.rs | nitor-vault |
version | 0.6.2 |
source | src |
created_at | 2023-03-02 14:05:00.501125 |
updated_at | 2024-05-16 17:29:15.636429 |
description | Encrypted AWS key-value storage utility. |
homepage | |
repository | https://github.com/nitorcreations/vault |
max_upload_size | |
id | 798905 |
size | 87,785 |
Rust CLI and library for encrypting keys and values using client-side encryption with AWS KMS keys.
Usage: vault [OPTIONS] [COMMAND]
Commands:
delete, -d, --delete Delete an existing key from the store
describe, --describe Describe CloudFormation stack parameters for current configuration
exists, -e, --exists Check if a key exists
all, -a, --all List available secrets
lookup, -l, --lookup Print secret value for given key
store, -s, --store Store a new key-value pair
info, -i, --info Print region and stack information
help Print this message or the help of the given subcommand(s)
Options:
-b, --bucket <BUCKET> Override the bucket name [env: VAULT_BUCKET=]
-k, --key-arn <KEY_ARN> Override the KMS key arn for storing or looking up [env: VAULT_KEY=]
-r, --region <REGION> Specify AWS region for the bucket [env: AWS_REGION=]
--vault-stack <VAULT_STACK> Optional CloudFormation stack to lookup key and bucket [env: VAULT_STACK=]
-h, --help Print help (see more with '--help')
-V, --version Print version
ANSI color output can be disabled by setting the env variable NO_COLOR=1
.
Using the shell script:
./build.sh
Note: works on Windows too, use Git for Windows Bash to run it.
Manually from terminal:
# debug
cargo build
cargo run
# release
cargo build --release
cargo run --release
# pass arguments
cargo run --release -- --help
Depending on which build profile is used, Cargo will output the executable to either:
rust/target/debug/vault
rust/target/release/vault
You can install a release binary locally using cargo install.
Use the shell script:
./install.sh
The script calls cargo install
and checks for the binary in path.
If you run the command directly,
note that you need to specify the path to the directory containing Cargo.toml.
From the repo root you would do:
cargo install --path rust/
Cargo will put the binary under $HOME/.cargo/bin
by default,
which you should add to PATH if you don't have it there,
so the binaries installed through Cargo will be found.
If you still get another version when using vault,
you will need to put the cargo binary path $HOME/.cargo/bin
first in path.
Using rustfmt
cargo fmt
Using Clippy
cargo clippy
cargo clippy --fix
cargo update