Authenticates through a my.so.ch JWE token.
The service will decrypt/decode the JWE, then:
- Check whether the
iss
claim of the token matches one of the configuredallowed_iss
- Extract the userid from the claims (first non-empty claim of the configured
userid_claims
) - Validate whether the userid exists using the configured
userid_verify_sql
query, or check whether the userid shall be autoregistered usingautoregistration_allowed_query
andautoregistration_query
. - Issue a JWT for QWC
See sogis-mysoch-auth.json configuration schema.
All configuration options can also be set with the respective UPPER_CASE environment variables.
Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install requirements:
pip install -r requirements.txt
Run standalone application:
python src/server.py