Metadata-Version: 2.1
Name: pants_backend_secrets
Version: 0.1.0
Summary: A secrets plumbing plugin for the Pants build system
Keywords: pantsbuild,pants,backend,secrets
Author-email: Tom Solberg <me@sbg.dev>
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Build Tools
Project-URL: Changelog, https://github.com/tgolsson/pants-backends/tree/main/pants-plugins/secrets/CHANGELOG.md
Project-URL: Code, https://github.com/tgolsson/pants-backends/tree/main/pants-plugins/secrets
Project-URL: Repository, https://github.com/tgolsson/pants-backends
Description-Content-Type: text/markdown

# Secrets backend for Pants

[![PyPI](https://img.shields.io/pypi/v/pants-backend-secrets?label=Latest%20release)](https://pypi.org/project/pants-backend-secrets)

> **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.

``` python
env_secret(
    name="bw_session_key",
    key="BW_SESSION",
)
```

| Argument      | Meaning                           | Default value                                         |
|---------------|-----------------------------------|-------------------------------------------------------|
| `name`        | The target name                   | Same as any other target, which is the directory name |
| `key`         | The environment variable to read. | **Required**                                          |
| `decsription` | A description of the target       | ` `                                                   |
| `tags`        | List of tags                      | `[]`                                                  |


## Goals

### `decrypt`

Decrypts and prints a secret.

```console
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-...
```

