Keeper Secrets Manager Rust SDK
The Rust SDK for Keeper Secrets Manager provides secure storage and retrieval of secrets for your Rust applications.
Features
- Retrieve secrets from Keeper Vault
- Create, update, and delete secrets
- File upload and download support
- Folder management operations
- TOTP code generation
- Password generation utilities
- Keeper Notation support for field access
- Multiple storage backends (file-based and in-memory)
- Caching support for improved performance
Installation
Add this to your Cargo.toml:
[]
= "17.0"
Quick Start
use ;
Common Use Cases
Retrieve Specific Secrets by UID
let mut record_uids = Vecnew;
record_uids.push;
let secrets = secrets_manager.get_secrets?;
Access Fields Using Keeper Notation
// Get specific field from a record
let value = secrets_manager.get_notation?;
// Get custom field by name
let custom_value = secrets_manager.get_notation?;
Generate Passwords
use ;
let options = new
.length
.uppercase
.lowercase
.digits
.special_characters;
let password = generate_password_with_options?;
Create a New Secret
use ;
use Value;
let mut new_record = new;
// Add fields
let fields = vec!;
new_record.fields = Some;
// Create the secret in a shared folder
let record_uid = secrets_manager.create_secret?;
Download Files
for secret in secrets
Generate TOTP Codes
use ;
let totp_field = secret.get_standard_field_value?;
let url = get_otp_url_from_value_obj?;
let totp_code = get_totp_code?;
println!;
Storage Options
File-based Storage (Recommended for persistent config)
use FileKeyValueStorage;
let config = new_config_storage?;
In-Memory Storage (For temporary or secure environments)
use InMemoryKeyValueStorage;
let base64_config = "YOUR_BASE64_CONFIG_STRING".to_string;
let config = new_config_storage?;
Caching
Enable caching to reduce API calls and improve performance:
use KSMRCache;
let cache = new_file_cache?;
let mut client_options = new_client_options;
client_options.set_cache;
let secrets_manager = new?;
Documentation
For more detailed documentation and examples, visit:
License
This SDK is distributed under the MIT License. See LICENSE for more information.
Support
For support, please visit our GitHub repository.