Skip to content

edvm/secrets-on-premises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secrets.rs

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.

Features

  • 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

Encryption interface screenshot

Installation

  1. Clone this repository and:

    cd secrets-on-premises
  2. Build the project:

    cargo build --release
  3. Run the server:

    ./target/release/secrets-cli start
  4. Access the web interface: Open your browser and navigate to http://localhost:5150/ to access the web interface.

Architecture

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

API Endpoints

Endpoint Method Description
/secrets/encrypt/ POST Create a new secret
/secrets/decrypt/:uid POST Retrieve a secret by UUID

Getting Started

Prerequisites

  • Rust 1.70+
  • (Optional) PostgreSQL or other supported database. SQLite is used by default.

Usage Example

Creating a Secret

curl -X POST http://localhost:5150/api/secrets/encrypt \
  -H "Content-Type: application/json" \
  -d '{"text": "your-secret-data", "passphrase": "your-secure-passphrase"}'

Retrieving a Secret

curl -X POST http://localhost:5150/api/secrets/decrypt/c96b3797-396c-41b2-8266-2cce52effaaf \
  -H "Content-Type: application/json" \
  -d '{"passphrase": "your-secure-passphrase"}'

Development

Adding a New Remote Repository

# 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

Running Tests

cargo test

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE - see the LICENSE file for details.

Acknowledgments

About

Share sensitive information securely with workmates or customers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published