Skip to content
Snippets Groups Projects
README.md 1.68 KiB
Newer Older
Sven Feyerabend's avatar
Sven Feyerabend committed
# stupass

This is a simple self-service password recovery and account activation utility.
It works by making requests to the API of a configured midPoint instance.

It requires the following environment variables to run:

| **Name**            | **Default Value**        | **Description**                           |
| ------------------- | ------------------------ | ----------------------------------------- |
| `SECRET_KEY`        | `secret-key`             | Shared secret for hmac validation.        |
| `MIDPOINT_URL`      | :heavy_multiplication_x: | API endpoint of the midPoint instance.    |
| `MIDPOINT_USER`     | :heavy_multiplication_x: | Username used to authenticate to the API. |
| `MIDPOINT_PASSWORD` | :heavy_multiplication_x: | Password used to authenticate to the API. |

The Account used to auhtenticate need sufficient permissions to search users by name and update their `lifecycleState`, `credentials/password/value` and `extension/gdprConsent` fields.


## Development

This app can be run in debug mode with the following command:

```
$ flask run --debug
```

If started like this, it expects the [`bulma`](https://bulma.io/documentation/start/installation/) npm package to be located at `static/deps/node_modules/bulma`.
This can be achived by the following commands after cloning the repo:

```
$ mkdir  static/deps
$ cd static deps
$ npm install bulma
```

For production use, the container build will download `bulma.min.css` and bake it into the final image.


## Translations

Translations are done with `flask-babel` and can be found in [translations](./translations/).
Update the `.po` files with your translations and compile them with

```
$ pybabel compile -d translations
```