Metadata-Version: 2.4
Name: clear-skies-akeyless-custom-wiz
Version: 2.0.6
Summary: Akeyless+Clearskies Custom Wiz Producer/Rotator
Project-URL: repository, https://github.com/clearskies-akeyless-custom-producers/wiz
Project-URL: Issues, https://github.com/clearskies-akeyless-custom-producers/wiz/issues
Project-URL: Changelog, https://github.com/clearskies-akeyless-custom-producers/wiz/blob/main/CHANGELOG.md
Author-email: Conor Mancone <cmancone@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: <4.0,>=3.11
Requires-Dist: clear-skies-akeyless-custom-producer<3.0.0,>=2.0.0
Requires-Dist: requests<3.0.0,>=2.0.0
Provides-Extra: dev
Requires-Dist: black>=25.1.0; extra == 'dev'
Requires-Dist: mypy>=1.16.1; extra == 'dev'
Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=8.4.1; extra == 'dev'
Requires-Dist: ruff>=0.12.1; extra == 'dev'
Requires-Dist: types-requests>=2.32.4; extra == 'dev'
Description-Content-Type: text/markdown

# wiz

Wiz dynamic producer for Akeyless

The payload for this producer looks like:

```json
{"clientId": "[YOUR_CLIENT_ID_HERE]", "clientSecret": "[YOUR_CLIENT_SECRET_HERE]"}
```

Call `clearskies_akeyless_custom_wiz.build_wiz_producer()` to initialize the create/rotate/revoke endpoints.  You can
optionally provide the `url` parameter which will add a prefix to the endpoints.  This can then be attached to a
[clearskies context](https://clearskies.info/docs/context/index.html) or an [endpoint group](https://clearskies.info/docs/endpoint-groups/endpoint-groups.html):

If used as a producer, it will use the client credentials to fetch and return a Wiz JWT.  It can also rotate the
client credentials you provide.

## Installation

```bash
# Install uv if not already installed
uv add clear-skies-akeyless-custom-wiz
```

```bash
pip install clear-skies-akeyless-custom-wiz
```

or

```bash
pipenv install clear-skies-akeyless-custom-wiz
```

or

```bash
poetry add clear-skies-akeyless-custom-wiz
```

```python
import clearskies
import clearskies_akeyless_custom_wiz

wsgi = clearskies.contexts.WsgiRef(
    clearskies_akeyless_custom_wiz.build_wiz_producer()
)
wsgi()
```

Which you can test directly using calls like:

```bash
curl 'http://localhost:8080/sync/create' -d '{"payload":"{\"clientId\":\"YOUR_CLIENT_ID_HERE\",\"clientSecret\":\"YOUR_CLIENT_SECRET_HERE\"}"}'

curl 'http://localhost:8080/sync/rotate' -d '{"payload":"{\"clientId\":\"YOUR_CLIENT_ID_HERE\",\"clientSecret\":\"YOUR_CLIENT_SECRET_HERE\"}"}'
```

**NOTE:** Akeyless doesn't store your payload as JSON, even when you put in a JSON payload.  Instead, it ends up as a stringified-json
(hence the escaped apostrophes in the above example commands).  This is normal, and normally invisible to you, unless you try to invoke the
endpoints yourself.
