Passage

passage - store and manage access to shared secrets

Installation

apt install age
opam install . --deps-only

Development

Building the project

make build

Running tests

make test

Secret format

Multi-line secrets with comments:

<empty line>
possibly several lines of comments
without empty lines
<empty line>
secret until end of file

Multi-line secrets without comments:

<empty line>
<empty line>
secret until end of file

Single-line secrets with comments:

single-line secret
<empty line>
comments until end of file

Single-line secrets without comments:

single-line secret

The rationale for why we have 2 distinct secret formats for multi-line and single-line secrets (and not just multi-line secrets) is mainly for backward compatibility reasons since most of the existing secrets are of the "single-line secret" format.

Commands

Reading secrets

passage get [-c, --clip] [-l, --line=LINE] [-q, --qrcode] [-s, --singleline] SECRET_NAME

passage secret [-c, --clip] [-l, --line=LINE] [-q, --qrcode] [-s, --singleline] SECRET_NAME

passage cat [-c, --clip] [-l, --line=LINE] [-q, --qrcode] SECRET_NAME

passage show SECRET_NAME

Templating with secrets

passage template TEMPLATE_FILE [TARGET_FILE]

passage subst [TEMPLATE_ARG]

passage template-secrets [TEMPLATE_FILE]

Specifying recipients

Secrets' recipients are specified in the .keys file in the immediately containing folder. The first time a folder is used, passage will create this file. If no recipients are specified, it falls back to the caller as the sole recipient based on the file referenced by $PASSAGE_IDENTITY.

Recipients are not inherited from containing (parent) folders. Recipients in a folder can only be increased when added by the existing recipients.

All secrets in a given folder must share the same set of recipients.

passage edit-who SECRET_NAME

Creating or updating secrets

passage new SECRET_NAME

passage create SECRET_NAME

$ echo "secret" | passage create secret_folder/secret

passage edit SECRET_NAME

passage replace SECRET_NAME

passage rm [--force] [--verbose] SECRET_NAME / passage delete [--force] [--verbose] SECRET_NAME

Managing secrets

passage list [PATH] / passage ls [PATH]

passage search PATTERN [PATH]

passage show [PATH]

passage refresh [PATH]

passage who [PATH]

passage what RECIPIENT_NAME

Environment Variables

PASSAGE_DIR

PASSAGE_KEYS

PASSAGE_SECRETS

PASSAGE_IDENTITY

PASSAGE_X_SELECTION

PASSAGE_CLIP_TIME

Utilities

passage healthcheck

passage realpath [--verbose] [PATH]