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.
Install dependencies and run service:
uv run src/server.py
With config path:
CONFIG_PATH=/PATH/TO/CONFIGS/ uv run src/server.py