Skip to content

Rust-based .env file encryption & decryption tool - store & retrieve your app environment variables safely 😎

License

Notifications You must be signed in to change notification settings

butlergroup/env_encryption_tool

env_encryption_tool ©️ Project Goals & Info

Purpose: the goal for this project is to encrypt .env files for a given Rust application and store them in an encrypted state, then decrypt them at runtime using an OS-based environment variable and pass them to the application. This requires any potential/illicit attacker to breach the operating system's security and access its environment variables before any application-level environment variables can be compromised.

Disclaimer: this project is brand-new. It's stable and can be used in production environments, but SLA-based support won't be offered until we're at v1.0. :trollface:

Installation Instructions

  1. Install Rust 🌎
  2. Clone/fork the env_encryption_tool repo ⚡
  3. Modify the encryption key in main.rs to your desired content 🔒
  4. Run "cargo build --release" - this outputs a binary in the target folder ✨
  5. Run the binary in the same folder as your .env file - this outputs a .env.enc file 🎊
  6. Integrate the included decrypt_config.rs file and its crates into your Rust project ⭐
  7. Set an OS-level environment variable named "DECRYPTION_KEY" ( 🌎 for Linux, 🌍 for Windows, 🌏 for MacOS) to the same value you placed in main.rs.
  8. Copy the .env.enc file to the same folder your Rust binary runs in and voila! You have encrypted environment variables provided to your application at runtime. 🎉

Contributing

We welcome contributions from the community! A simple guide to get started:

  1. Fork the repository to your Github account (a.k.a create a branch).
  2. Clone your forked repo/branch to your favorite IDE (VS Code is our editor of choice) and make changes (or use the command-line: git checkout -b feature/your-feature).
  3. Thoroughly test and debug your changes, then commit and push them to your forked repo/branch.
  4. Open a pull request to have your changes reviewed and reintegrated into the main branch.

Contributors are strongly encouraged to read our CONTRIBUTING.md file before opening a pull request.

License

env_encryption_tool is licensed under the AGPL-3.0 license, making it free to use, modify, and distribute as long as the source code remains open-source. Using a modified version of this software without disclosing its source code is not in compliance with the AGPL-3.0 license.

Acknowledgments

Special thanks to contributors, open-source enthusiasts, and supporters of env_encryption_tool's vision.

Terms of Service

Please read our Terms of Service before using our software. Violators of these Terms are not supported by the community or contributors.

Privacy Policy

Please also read our Privacy Policy to understand how we handle your personal information.

Contact

Have questions or suggestions? Reach out to us at [email protected]. Thank you and happy coding! :)

About

Rust-based .env file encryption & decryption tool - store & retrieve your app environment variables safely 😎

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages