From 8cf2129a07dffd510933034f341c5a954df4caa0 Mon Sep 17 00:00:00 2001 From: spektr Date: Tue, 17 Nov 2026 07:12:54 +0100 Subject: [PATCH] GNAI-023 M8-T1: detaillierte Keycloak-26.2.4-Schritte (Client gnai-research, groups-Claim-Mapper, Secret-Handling) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- docs/platform/llm-server/ai/GNAI-023-PLAN_GPT-Researcher-IAP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/llm-server/ai/GNAI-023-PLAN_GPT-Researcher-IAP.md b/docs/platform/llm-server/ai/GNAI-023-PLAN_GPT-Researcher-IAP.md index 9036594..fb423b9 100644 --- a/docs/platform/llm-server/ai/GNAI-023-PLAN_GPT-Researcher-IAP.md +++ b/docs/platform/llm-server/ai/GNAI-023-PLAN_GPT-Researcher-IAP.md @@ -124,7 +124,7 @@ Internet → NPM (CT 103, 443) → auth_request-Subrequest an oauth2-proxy | # | Paket | Ziel | Wo | | --- | --- | --- | --- | -| M8-T1 | Keycloak-Client `gnai-research` + Realm-Rolle + Claim-Mapper; Secret als Podman-Secret. **Betreiberschritte (Admin-UI `https://auth.ghostnet.selfhost.eu`, Realm Ghost.net):** 1) Realm Roles → Create role `gnai-research-user`. 2) Clients → Create client: id `gnai-research`, **confidential**, Standard Flow, Valid Redirect URIs `https://research.ghostnet.selfhost.eu/oauth2/callback`, Web Origins `https://research.ghostnet.selfhost.eu`. 3) Client Scopes `gnai-research-dedicated` anlegen mit Mapper „realm roles" (claim name `groups`, add to access/id token ON) — oder `groups` direkt. 4) Secret kopieren → auf CT 103: `printf '%s' '' \| podman secret create oauth2-proxy-client-secret -`. 5) User `ghost` die Rolle `gnai-research-user` zuweisen (Users → Role Mappings). | CT 102 (Admin-UI) + CT 103 (Secret) | Keycloak | +| M8-T1 | Keycloak-Client `gnai-research` + Realm-Rolle + Claim-Mapper; Secret als Podman-Secret. **Detaillierte Betreiberschritte (Keycloak 26.2.4, Admin-UI `https://auth.ghostnet.selfhost.eu`, oben links Realm-Dropdown = `Ghost.net`):** **A) Realm-Rolle:** Menü „Realm roles" → „Create role" → Name `gnai-research-user` → Save. **B) Client:** Menü „Clients" → „Create client": Client ID `gnai-research`, Name „Ghostnet Research (oauth2-proxy)" → Next; Capability config: **Client authentication ON** (confidential), Authorization OFF, Standard flow ON, Direct access grants / Implicit / Service accounts / Device / CIBA **OFF** → Next; Login settings: Root URL `https://research.ghostnet.selfhost.eu`, Valid redirect URIs `https://research.ghostnet.selfhost.eu/oauth2/callback`, Valid post logout redirect URIs `https://research.ghostnet.selfhost.eu/*`, Web origins `https://research.ghostnet.selfhost.eu` → Save. **C) groups-Claim-Mapper** (damit `--oidc-groups-claim=groups` greift): Clients → `gnai-research` → „Client scopes" → `gnai-research-dedicated` → „Mappers" → „Add mapper" → „By configuration" → „User Realm Role": Mapper name `realm-roles-to-groups`, Multivalued ON, **Token Claim Name `groups`**, Claim JSON Type String, Add to ID token ON, Add to access token ON, Add to userinfo ON → Save. **D) Secret auf CT 103:** `ssh ansible-deploy@10.0.0.10` → `podman secret rm oauth2-proxy-client-secret 2>/dev/null; printf '%s' '' | podman secret create oauth2-proxy-client-secret -` (Secret nie in Chat/Repo). **E) Rolle zuweisen:** Users → `ghost` → „Role mapping" → „Assign role" → `gnai-research-user` → Assign. **F) Nach dem Deploy testen:** `curl -sI https://research.ghostnet.selfhost.eu/` → 302 zu `auth.ghostnet.selfhost.eu/.../login`. Hinweis: Redirect-URI jetzt schon registrieren, auch wenn `research.ghostnet.selfhost.eu` per DNS/vHost erst in M8-T3 live wird. | CT 102 (Admin-UI) + CT 103 (Secret) | Keycloak | | M8-T2 | oauth2-proxy v7.15.5 (quay.io, digest-gepinnt) als Quadlet auf CT 103 in eigenem Podman-Netz mit NPM, **kein** publish; Env: provider `oidc`, issuer, client-id/secret + cookie-secret als Podman-Secrets, `--email-domain`, `--whitelist-domain=.ghostnet.selfhost.eu`, `--allowed-group=gnai-research-user`, `--oidc-groups-claim=groups`, `--skip-auth-regex=^/ping$`, `--reverse-proxy=true`, `--set-xauthrequest` | CT 103, Rolle im CT-103-Ansible-Projekt | IAP | | M8-T3 | NPM-vHost `research.ghostnet.selfhost.eu` (LE-TLS, Force SSL) mit Advanced-Snippet `auth_request /oauth2/auth` + interne `location /oauth2/`; Split-DNS-Record auf CT 100; NPM-API via CT-103-Ansible | CT 103 + CT 100 | Ingress | | M8-T4 | GPT Researcher (digest-gepinnt) als Quadlet auf `ghostnet-ki` im Production-Netz, Port `10.0.0.90:8085` (Firewall: nur NPM); Env: `OPENAI_BASE_URL=http://llama-cpp:8080/v1`, `OPENAI_API_KEY`=Placeholder-Secret, `FAST_LLM`/`SMART_LLM`=Production-Alias, Search via SearXNG (custom retriever, `SEARXNG_URL=http://searxng:8080`) | `llm-server/llm/ansible` (neue Rolle `gpt_researcher`, Playbook `research.yml`) | Harness |