Nordray Vault
Open source. MIT licence.

Secrets for bunny.net Magic Containers from KeePass files

Nordray Vault gives secrets to your applications from encrypted KeePass files. You keep the files in a Bunny storage zone. You do not operate a vault server.

Nordray logo: a white rabbit that jumps below the northern lights

Why

Magic Containers keeps the configuration of an application in environment variables. Each secret is one more variable to set by hand, and the variables are not a secret store.

A vault server, such as HashiCorp Vault, is a large service to operate for a small number of applications. Nordray Vault uses a tool that you possibly use already: KeePass.

How it works

Each application has one KeePass file and one key file. The nordray-vault program starts before your application and gives it the secrets as environment variables.

KeePassXCYou edit the secrets of an application in its KeePass file.
Bunny storage zoneThe encrypted files of all applications are in one storage zone.
nordray-vaultThe program gets the file of the application and decrypts it.
Your applicationThe application reads its secrets from environment variables.
  1. The container starts nordray-vault

    The entrypoint of the container is nordray-vault -- <your command>. You do not change your application.

  2. nordray-vault gets the KeePass file

    It downloads the file of the application from the storage zone. It uses the read-only password of the zone.

  3. nordray-vault decrypts the file

    It uses the key file of the application. Each application has only its own key file.

  4. nordray-vault sets the environment variables

    The title of each entry is the name of a variable. The password of the entry is the value. For example, MyApp__Database__Password becomes MyApp:Database:Password in .NET configuration.

  5. nordray-vault starts your application

    It removes its own variables and replaces itself with your command. It does not stay in the container.

Security model

An application can decrypt only its own secrets.

One key file for each application

All applications can download all files in the storage zone. Each application can decrypt only the file that its key file opens.

Read-only access

Applications use the read-only password of the storage zone. Only you can change the files.

Encrypted at rest

The storage zone contains only encrypted KeePass files. The key files are not in the zone.

No secrets in error messages

If nordray-vault cannot start, the error message does not show a value, a key or a password. A test does a check of this.

Your values have priority

If a variable is set on the container already, nordray-vault keeps that value. It writes only the name of the variable to the log.

Verified releases

Each release has a build provenance attestation for the program and for the container image. You can verify them with gh attestation verify.

Configuration

You set these environment variables on the container. Copy the program into your image from ghcr.io/activout/nordray-vault.

VariableValue
NORDRAY_VAULT_FILEThe KeePass file of the application, for example my-app.kdbx
NORDRAY_VAULT_KEYFILEThe key file of the application, in base64
NORDRAY_VAULT_STORAGE_ZONEThe name of the storage zone
NORDRAY_VAULT_STORAGE_PASSWORDThe read-only password of the storage zone
NORDRAY_VAULT_STORAGE_HOSTThe storage endpoint of the zone, if it is not in Falkenstein

Manage your secrets

You use KeePassXC or keepassxc-cli and the bunny CLI. The repository also has instructions for AI agents: they add, change, remove and roll back secrets, and they do not show the values.

Get the source code on GitHub

Also from Nordray: Access

Nordray Access puts a login in front of your web application at the Bunny CDN edge. You do not change your application code.

Read about Nordray Access