This project provides an API and a Web UI for storing encrypted data securely. It leverages modern Rust libraries to create a high-performance, type-safe application with strong security guarantees.
Try it online here.
- Secure Storage: All secrets are stored encrypted
- RESTful API: Builtin RESTful API to encrypt/decrypt secrets
- Builtin Web UI: A simple web interface for managing secrets
-
Clone this repository and:
cd secrets-on-premises
-
Build the project:
cargo build --release
-
Run the server:
./target/release/secrets-cli start
-
Access the web interface: Open your browser and navigate to
http://localhost:5150/
to access the web interface.
The project is built with the following technologies:
- Loco.rs: Modern Rust framework for building applications
- SeaORM: Async ORM for Rust
- AES256 Encryption: Industry-standard encryption for data security
Endpoint | Method | Description |
---|---|---|
/secrets/encrypt/ |
POST | Create a new secret |
/secrets/decrypt/:uid |
POST | Retrieve a secret by UUID |
- Rust 1.70+
- (Optional) PostgreSQL or other supported database. SQLite is used by default.
curl -X POST http://localhost:5150/api/secrets/encrypt \
-H "Content-Type: application/json" \
-d '{"text": "your-secret-data", "passphrase": "your-secure-passphrase"}'
curl -X POST http://localhost:5150/api/secrets/decrypt/c96b3797-396c-41b2-8266-2cce52effaaf \
-H "Content-Type: application/json" \
-d '{"passphrase": "your-secure-passphrase"}'
# Add a GitHub remote
git remote add origin https://github.com/yourusername/secrets-on-premises.git
# Verify remotes
git remote -v
# Push to remote
git push -u origin main
cargo test
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE - see the LICENSE file for details.