Metadata-Version: 2.1
Name: kcwarden
Version: 0.1.0a0
Summary: Keycloak auditor
Author: Max Maass
Author-email: max.maass@iteratec.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Description-Content-Type: text/markdown

# kcwarden - Keycloak Configuration Auditor

[kcwarden](https://iteratec.github.io/kcwarden/) checks your Keycloak configuration for common misconfigurations and security vulnerabilities.

## Installation and Usage

Please see our [documentation on the project website](https://iteratec.github.io/kcwarden/).

## Development

### Docker Image

To build a Docker image with a bundled kcwarden, you can use:

```shell
docker build -f Docker/Dockerfile -t kcwarden:0.0.1 .
```

or

```shell
buildah build -f Docker/Dockerfile -t kcwarden:0.0.1 .
```

It uses a multi-stage build to first build the application as Python wheel and afterwards install this wheel in a second
image.

### Tests

The unit tests can be run with `poetry run pytest`.

The integration tests that actually start Keycloak containers using Docker can be executed
with `poetry run pytest --integration`.
The Keycloak versions for which the tests are executed can be found in [`conftest.py`](./tests/integration/conftest.py).
It can be overridden by setting the environment variable `INTEGRATION_TEST_KEYCLOAK_VERSIONS` to a space-separated list
of Keycloak container image tags (see [quay.io](https://quay.io/repository/keycloak/keycloak?tab=tags)).

### Build the Docs

The documentation is created using [MkDocs](https://www.mkdocs.org/) and lives in the [`docs`](./docs) directory.
The dependencies for _MkDocs_ can be installed using this command: `poetry install --with docs`.
Afterward, the documentation can be built using `poetry run mkdocs build`.
The static output is then located in the `site` directory.
A development server that serves the documentation, watches for changes and automatically re-creates the site can be
spun up using `poetry run mkdocs serve`.

