Metadata-Version: 2.1
Name: convection-plugin-secrets-generic
Version: 1.0.0
Summary: Convection Secrets Store Plugin for Generic Key-Value Store
Author-email: AccidentallyTheCable <cableninja@cableninja.net>
License: GPLv3
Project-URL: Homepage, https://gitlab.com/accidentallythecable-public/convection-suite/plugins/secrets/generic/
Project-URL: Bug Tracker, https://gitlab.com/accidentallythecable-public/convection-suite/plugins/secrets/generic/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Environment :: Plugins
Classifier: Operating System :: POSIX
Classifier: Topic :: Communications
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: convection-shared <=1.0

# Convection Plugin - Secrets - Generic

- [Convection Plugin - Secrets - Generic](#convection-plugin---secrets---generic)
  - [Physical Storage](#physical-storage)
    - [Data Format](#data-format)
  - [Secret Store Args](#secret-store-args)
    - [***TBD***](#tbd)
  - [Secrets Args](#secrets-args)
    - [Create/Modify](#createmodify)
    - [Get/Destroy](#getdestroy)

Generic Secrets Storage (Key/Value Store)

## Physical Storage

If the Secret Store Name contains slashes, it is assumed as a path, and placed as `$STORAGE_ROOT/$STORE_NAME` (ex: `(/data)/(my/secret/store)`). If it does not contain slashes, it is stored at `$STORAGE_ROOT/secrets/$STORE_NAME` (ex `(/data)/(my.secret.store)`)

Data is stored all in a single file.

### Data Format

```json
{
    "metadata": { <plugin metadata> },
    "config": { <configuration data> },
    "store": { <secrets in k:v form>},
    "stats": {
        "reads": <number of reads performed since creation>,
        "writes": <number of writes performed since creation>
    }
}
```

Note that the Stats data for Reads may not be accurately represented if a number reads happen, but a write does not occur before the Convection Secrets Manager is shutdown/restarted. These stats are held in memory until a write occurs, and so the stat for reads since the last write would be lost on stop/restart. Write stat should always be accurate. The Read stat will be accurate for the duration of the service running (assuming no writes), however.

## Secret Store Args

These arguments are required when a new Generic Store is created.

### ***TBD***

## Secrets Args

### Create/Modify

 - `secret_name`: Name of Secret to Create/Modify
 - `secret_value`: Secret Data

### Get/Destroy

 - `secret_name`: Name of Secret to View/Destroy

