Crates.io | secpar |
lib.rs | secpar |
version | 0.1.2 |
source | src |
created_at | 2022-08-18 15:06:23.844759 |
updated_at | 2023-12-02 22:48:13.912263 |
description | A tool that leverages AWS Rust SDK for Secrets Manager & Parameter Store |
homepage | |
repository | https://github.com/riyaolin/secpar |
max_upload_size | |
id | 648184 |
size | 65,400 |
A [Sec]rets Manager and [Par]ameter Store CLI tool that leverages the newly AWS SDK for Rust to manage secrets.
Secrets Manager vs Parameter Store
AWS Rust SDK will try to get the credentials in this order:
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY
environment varaibles -> ~/.aws/credentials
-> ~/.aws/config
.
Hence, one way to set credentials for AWS Rust SDK is ~/.aws/credentials
, one example as below:
[default]
aws_access_key_id=<key_id>
aws_secret_access_key=<secret>
region=us-east-1
For alternative ways, please refer to the SDK setup page
cargo run -- sec list
cargo run -- sec get --name <secret_name>
cargo run -- sec delete --name <secret_name>
cargo run -- sec describe --name <secret_name>
cargo run -- sec create --name <secret_name> --secret <secret_value>
cargo run -- par list
cargo run -- par get --name <parameter_name>
cargo run -- par delete --name <parameter_name>
cargo run -- par create --name <parameter_name> --value <parameter_value>
cargo run -- par apply --path <path_to_parameter_spec_file>
For the par apply
sub-subcommand, the format of the spec file is shown as follow. The spec is in yaml
format and each parameter entry’s name and value are separated by :
, a colon symbol:
parameters:
- /secpar/TEST:TEST_VALUE
- /secpar/qa/SASL_USERNAME:USERNAME