doppler-rs
Unofficial client library for the Doppler API - secure secrets management platform
🔐 About Doppler
Doppler is a universal secrets manager that helps developers and DevOps teams securely store, manage, and deploy environment variables and secrets across applications, environments, and team members.
✨ Features
- Complete API Coverage: Full support for all Doppler API endpoints
- Type Safety: Leverages Rust's type system for secure and reliable code
- Async/Await: Built on top of
reqwestwith full async support usingtokio - Comprehensive Error Handling: Detailed error types for robust error handling
- Automatic Serialization: JSON serialization/deserialization with
serde - DateTime Support: Native
chronointegration for date/time fields
📦 Installation
Add this to your Cargo.toml:
[]
= "0.0.2"
= { = "1.0", = ["full"] }
Features
This crate supports the following optional features:
rustls (TLS Backend)
Enables rustls-tls for reqwest, providing a pure Rust TLS implementation:
[]
= { = "0.0.2", = ["rustls"] }
When to use rustls:
- You prefer a pure Rust TLS stack
- You want to avoid OpenSSL dependencies
- You're targeting environments where OpenSSL isn't available
- You need reproducible builds across different platforms
Default behavior: Without any features enabled, reqwest will use the system's default TLS implementation (typically OpenSSL on Unix systems and SChannel on Windows).
# Use default TLS (system native)
= "0.0.2"
# Use rustls TLS
= { = "0.0.2", = ["rustls"] }
🚀 Quick Start
Authentication
Doppler supports multiple authentication methods:
Service Tokens (Recommended for Applications)
use ;
async
Personal Access Tokens
use ;
async
Managing Secrets
use ;
use HashMap;
async
Project and Environment Management
use ;
async
Service Account Management
use ;
async
📖 API Documentation
This client provides access to all Doppler API endpoints:
Core Resources
- Secrets: Manage environment variables and secrets
- Projects: Organize secrets into projects
- Environments: Separate secrets by environment (dev, staging, prod)
- Configs: Fine-grained secret organization within environments
Access Control
- Users: Manage team members and permissions
- Groups: Organize users into groups with shared permissions
- Service Accounts: Automated access for applications and CI/CD
- Workplace Roles: Define permissions across the organization
- Project Roles: Define permissions within specific projects
Security & Compliance
- Activity Logs: Audit trail of all changes and access
- Config Logs: Detailed history of secret changes
- Trusted IPs: Restrict access by IP address
- Change Request Policies: Require approval for sensitive changes
Integrations
- Webhooks: Real-time notifications of changes
- Syncs: Automatically sync secrets to external services
- Dynamic Secrets: Generate short-lived credentials on-demand
For detailed API documentation, visit: https://docs.doppler.com/reference
🛠️ Configuration
The client uses reqwest with sensible defaults:
use Configuration;
let mut config = new;
config.bearer_access_token = Some;
// Optionally customize other settings
config.user_agent = Some;
Environment Variables
You can also configure the client using environment variables:
use ;
async
🔒 Security Best Practices
- Use Service Tokens for Applications: Service tokens are scoped to specific projects/environments
- Rotate Tokens Regularly: Set expiration dates and rotate tokens periodically
- Limit Token Scope: Use the most restrictive token type that meets your needs
- Store Tokens Securely: Never commit tokens to version control
- Use Trusted IPs: Restrict API access to known IP addresses when possible
- Monitor Activity Logs: Regularly review API usage and access patterns
🤝 Contributing
This is a generated API client library. Most improvements come from updates to the OpenAPI specification or the generation templates.
Reporting Issues
If you encounter bugs or have feature requests:
- Check if it's an API issue by testing with the Doppler API directly
- For client-specific issues, please open an issue on GitHub
- Include relevant code examples and error messages
Development Setup
- Clone the repository
- Install Rust (latest stable)
- Run tests:
cargo test - Run examples:
cargo run --example basic_usage
Generating the Client
This client is generated from the Doppler OpenAPI specification:
# Regenerate the client
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: https://docs.doppler.com
- Community: https://community.doppler.com
- Issues: Please open an issue on GitHub
- Security: For security issues related to the doppler api and not this crate, email security@doppler.com
🏷️ Version
Current Version: 0.0.2
Generated with: OpenAPI Generator
Disclaimer: This is an unofficial client library. For official SDKs and support, visit Doppler's official documentation.