Giter VIP home page Giter VIP logo

ace's Introduction

ACE: Append-only Encrypted Environment Variables

Introduction

ACE (Append-only encrypted Environment variables) is a tool designed to securely manage environment variables for different environments and applications. By leveraging age-encryption.org's robust encryption mechanisms, ACE ensures that sensitive information remains secure while providing flexibility through append-only updates. It supports multiple recipients, making it ideal for CI/CD pipelines, shared services, and any application that requires secure, environment-specific configuration.

Key Features

  • Append-only Updates: Safely update environment variables without the need to decrypt existing ones.
  • Encrypted Variables: Utilize age-encryption to secure environment variables, with public keys to monitor changes.
  • Recipient-specific Blocks: Tailor environment variables to specific recipients, enhancing security and flexibility.
  • Built on age-encryption.org: Leverages a trusted and secure encryption framework.

Getting Started

Installation

Install by downloading a release for your platform and placing it somewhere on your $PATH.

Or if you have a Go environment setup you may also install it using go install github.com/slaskis/ace@latest.

Basic Usage

To begin using ACE, follow these simple steps:

  1. Create a key:

    age-keygen -o $XDG_CONFIG_HOME/ace/identity
  2. Add a recipient:

    age-keygen -y $XDG_CONFIG_HOME/ace/identity > recipients.txt
  3. Set Environment Variables:

    ace set DATABASE_URL=postgres://example.com/db1 REDIS_URL=redis://example.com/db2
    ace set < .env
  4. Retrieve Environment Variables:

    ace get
    ace get DATABASE_URL
  5. Execute Command with Environment:

    ace env -- <COMMAND WITH ARGS...>

Detailed Examples

Setting and Getting Variables

  • Set a single variable:

    ace set API_KEY=abc123
  • Bulk set variables from a file:

    ace set < .env
  • Get a specific variable:

    ace get API_KEY
  • Get all accessible variables:

    ace get
  • Rotate all available keys to the most recent recipients

    ace get | ace set

Using ACE in CI/CD

ACE was meant for a workflow where a project can store all secrets in the git repository while only giving access to certain recipients, such as CI.

API Reference

  • ace set [KEY=VALUE...]: Sets environment variables. Accepts multiple key-value pairs.
  • ace set < .env: Sets variables from a file formatted as KEY=VALUE per line.
  • ace get [KEY...]: Retrieves the values of specified environment variables.
  • ace env COMMAND WITH ARGS...: Executes a command with the environment variables loaded. Use ace env as a docker entrypoint to have it load secrets into environment of the command.

Security Considerations

ACE leans on the simple and reliable age-encryption.org. The security of this implementation has not been vetted by security professionals, and keeping keys secure is outside of the scope of this tool.

ace's People

Contributors

slaskis avatar

Stargazers

Fredrik Jonsson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.