dolores

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

Dolores

Simplifying secrets management on your cloud.

architecture

Encrypts configurations with different encryption algorithm and uses GCP or AWS or Vault as storage.

Demo

Setup

Configure for different environments to manage secrets

dolores --env production init

Enter the GCS bucket name where you want to store the application configuration

Encrypt a plain env file

To encrypt a plain env file backend.env for production environments and upload it to GCS bucket, run the following

dolores --env production config encrypt -f backend.env --name backend-01

Once the file is encrypted successfully, you can remove the local plaintext file.

Edit config

You can edit the remote config file with the following command

dolores --environment production config edit --name backend-01 -key-file $HOME/.config/dolores/production.key
Decrypt config

Prefer to use edit and run over decrypt as required, In case of you need to have env var file locally, decrypt the config with the following command

dolores --environment production config decrypt --name backend-01 -key-file $HOME/.config/dolores/production.key

Run commands with config

You can run a bash command or script and pre-load required config, so it's limited to the command's process.

dolores --env production run --with-config backend-01 -key-file $HOME/.config/dolores/production.key

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKeyFile      = errors.New("invalid key file")
	ErrInvalidFormat       = errors.New("invalid file content format")
	ErrInvalidIdentity     = errors.New("invalid identity")
	ErrInvalidConfiguraion = errors.New("invalid configuration")
)
View Source
var (
	Version = "version-undefined"
	Sha     = "sha-undefined"
)

Functions

This section is empty.

Types

type DecryptConfig

type DecryptConfig struct {
	Key     string
	KeyFile string
}

func (*DecryptConfig) Identities

func (c *DecryptConfig) Identities() ([]age.Identity, error)

func (*DecryptConfig) Valid

func (c *DecryptConfig) Valid() error

type DecryptOpt

type DecryptOpt func(cfg *DecryptConfig)

func WithKey

func WithKey(key string) DecryptOpt

func WithKeyFile

func WithKeyFile(keyFile string) DecryptOpt

type Decryptor

type Decryptor struct {
	// contains filtered or unexported fields
}

func NewDecryptor

func NewDecryptor(c *DecryptConfig, opts ...DecryptOpt) (Decryptor, error)

func (Decryptor) Decrypt

func (d Decryptor) Decrypt(data []byte) ([]byte, error)

type Encryptor

type Encryptor struct {
	// contains filtered or unexported fields
}

func NewEncryptor

func NewEncryptor(keys ...string) (*Encryptor, error)

func (*Encryptor) Encrypt

func (e *Encryptor) Encrypt(vars []Variable) ([]byte, error)

type EnvFile

type EnvFile struct {
	Variables []Variable
	CreatedAt time.Time
	// contains filtered or unexported fields
}

func LoadEnvFile

func LoadEnvFile(fn string) (*EnvFile, error)

func (*EnvFile) Parse

func (ef *EnvFile) Parse() error

type Variable

type Variable struct {
	Key   []byte
	Value []byte
}

func (Variable) Data

func (v Variable) Data() []byte

Directories

Path Synopsis
cmd
store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL