SSO implementiert
This commit is contained in:
@@ -60,6 +60,56 @@ Configure the external MCP connector with `Authorization: Bearer $MCP_ACCESS_TOK
|
||||
|
||||
Every Mistral response is stored in `assistant_chat_logs`. The table includes the sanitized provider request, the full raw provider response, the extracted assistant text sent back to the UI, response status and timing metadata.
|
||||
|
||||
## SSO mit Keycloak
|
||||
|
||||
Listify nutzt OpenID Connect mit Authorization Code + PKCE. Bei Keycloak muss der Issuer immer auf den Realm zeigen, nicht nur auf die Basisdomain.
|
||||
|
||||
### Keycloak Client
|
||||
|
||||
1. In Keycloak im passenden Realm einen OpenID-Connect-Client fuer Listify anlegen, z. B. `listify`.
|
||||
2. `Standard flow` aktivieren. PKCE mit `S256` erlauben oder erzwingen.
|
||||
3. Scopes `openid`, `email` und `profile` verfuegbar machen.
|
||||
4. Der User muss ein `email` Claim im ID Token erhalten. Ohne E-Mail lehnt Listify den Login ab.
|
||||
5. Redirect URI fuer die Browser-URL eintragen:
|
||||
|
||||
```text
|
||||
http://localhost:4200/auth/sso/callback
|
||||
```
|
||||
|
||||
Bei Docker/Reverse Proxy:
|
||||
|
||||
```text
|
||||
http://localhost:8080/auth/sso/callback
|
||||
```
|
||||
|
||||
In Produktion muss hier die oeffentlich erreichbare Listify-URL stehen, z. B. `https://listify.example.com/auth/sso/callback`.
|
||||
|
||||
### Listify Environment
|
||||
|
||||
Bei einem Keycloak-Realm `listify` unter `https://auth.forgecore.work`:
|
||||
|
||||
```bash
|
||||
OIDC_ISSUER_URL=https://auth.forgecore.work/realms/listify
|
||||
OIDC_DISCOVERY_URL=
|
||||
OIDC_CLIENT_ID=listify
|
||||
OIDC_CLIENT_SECRET=<keycloak-client-secret>
|
||||
OIDC_CALLBACK_URL=http://localhost:4200/auth/sso/callback
|
||||
CLIENT_URL=http://localhost:4200
|
||||
```
|
||||
|
||||
Wenn dein Realm anders heisst, muss nur der Realm-Teil angepasst werden. Die Discovery-URL wird automatisch aus dem Issuer gebildet:
|
||||
|
||||
```text
|
||||
https://auth.forgecore.work/realms/<realm>/.well-known/openid-configuration
|
||||
```
|
||||
|
||||
Nur falls Keycloak hinter einem Proxy eine abweichende Discovery-URL liefert oder du sie explizit setzen willst:
|
||||
|
||||
```bash
|
||||
OIDC_ISSUER_URL=https://auth.forgecore.work/realms/listify
|
||||
OIDC_DISCOVERY_URL=https://auth.forgecore.work/realms/listify/.well-known/openid-configuration
|
||||
```
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user