Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Secrets backend for Pants

This release targets Pants 2.31.0. Install it with pants-backend-secrets==0.7.0 in [GLOBAL].plugins in pants.toml.

PyPI

Warning This plugin is in development. No stability is guaranteed! Contributions welcome.

This backends implements utilities for handling secrets.

Planned and missing features

  • Setting and creating secrets via Pants

Targets

env_secret

A secret to be read from the environment.

env_secret(
    name="bw_session_key",
    key="BW_SESSION",
)
ArgumentMeaningDefault value
nameThe target nameSame as any other target, which is the directory name
keyThe environment variable to read.Required
decsriptionA description of the target
tagsList of tags[]

Goals

decrypt

Decrypts and prints a secret.

BW_SESSION="..." pants decrypt //examples/bitwarden:pypi_token
22:29:42.17 [INFO] Completed: Decrypting examples/bitwarden:pypi_token
Secret examples/bitwarden:pypi_token from BitWarden: pypi-...