docs(wiki): guide 10 - Wiki.js access via wiki.axion1337.chat + native OIDC
How an Anwender/Admin reaches the suite wiki: public wiki.axion1337.chat, same URL for both, Wiki.js's own OIDC login to Authentik (no forward-auth/outpost - that was only for static Docusaurus). Ready-to-apply Ingress+Certificate manifest (authentik pattern), the Authentik OAuth2 provider blueprint (parallel-safe slug wiki-js), and the Wiki.js OIDC endpoints. Prepared, not deployed; supersedes guide 09 for the suite (ADR-0014). Indexed in the guides README.
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
# Wiki.js: Zugang (wiki.axion1337.chat) + Authentik-OIDC
|
||||
|
||||
**Status**: vorbereitet, **nicht** ausgerollt · gehört zu #0048 (Ingress/Cert) und
|
||||
#0049 (OIDC) · **löst den Forward-Auth-Zwischenstand aus Guide 09 ab** (der war nur
|
||||
für das statische Docusaurus nötig)
|
||||
|
||||
## Wie das Wiki aufgerufen wird
|
||||
|
||||
**Anwender und Admin öffnen dieselbe URL: `https://wiki.axion1337.chat`.** Wiki.js
|
||||
zeigt seine eigene Login-Seite → „Login with Authentik" → Redirect zu
|
||||
`auth.axion1337.chat` → zurück. **Natives OIDC, kein Forward-Auth/Outpost** —
|
||||
Wiki.js authentifiziert selbst. Nach dem Login entscheidet die Authentik-Gruppe
|
||||
über Sicht und Bearbeiten (Rollen/Abschottung, #0049). Öffentlich wie der Rest der
|
||||
Plattform; Abschottung über Login + Rolle, nicht übers Netz.
|
||||
|
||||
## Teil 1 — Ingress + Zertifikat (`apps/production/wiki-ingress.yaml`)
|
||||
|
||||
Muster: `apps/authentik/certificate.yaml` + `apps/authentik/ingress.yaml`.
|
||||
Namespace = der der Wiki.js-Deployment (#0048); hier als `matrix` angenommen.
|
||||
Service-Name/Port (`wikijs:3000`) müssen zum Deployment passen.
|
||||
|
||||
```yaml
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: wiki-axion1337-chat-cert
|
||||
namespace: matrix
|
||||
spec:
|
||||
secretName: wiki-axion1337-chat-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- wiki.axion1337.chat
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: wikijs
|
||||
namespace: matrix
|
||||
spec:
|
||||
entryPoints: [websecure]
|
||||
tls:
|
||||
secretName: wiki-axion1337-chat-tls
|
||||
routes:
|
||||
- match: Host(`wiki.axion1337.chat`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: wikijs
|
||||
port: 3000
|
||||
```
|
||||
|
||||
Neue Datei in die Kustomization des `production`-Ordners aufnehmen. DNS: A-Record
|
||||
`wiki.axion1337.chat → 49.13.132.245` ist von sorb angelegt (Propagation läuft).
|
||||
|
||||
## Teil 2 — Authentik-OIDC-Provider (Blueprint)
|
||||
|
||||
Als Dokument in `apps/authentik/authentik-blueprints.yaml`, Muster wie
|
||||
`matrix-oidc-provider`. **Bewusst eigener Name/Slug** (`wiki-js`), damit es
|
||||
**parallel** zum Guide-09-Proxy-Provider „ThreadNet Wiki"/App `wiki` läuft; beim
|
||||
Umschalten auf die Suite werden die Guide-09-Objekte (Proxy-Provider, App `wiki`,
|
||||
Outpost, ggf. Gruppe `wiki-zugang`) **stillgelegt**.
|
||||
|
||||
```yaml
|
||||
wiki-oidc-provider.yaml: |
|
||||
# yaml-language-server: $schema=https://goauthentik.io/blueprints/schema.json
|
||||
version: 1
|
||||
metadata:
|
||||
name: wiki-oidc-provider
|
||||
labels:
|
||||
blueprints.goauthentik.io/instantiate: "true"
|
||||
entries:
|
||||
- model: authentik_providers_oauth2.oauth2provider
|
||||
state: present
|
||||
identifiers:
|
||||
name: ThreadNet Wiki (Wiki.js)
|
||||
id: wiki_oidc_provider
|
||||
attrs:
|
||||
client_type: confidential
|
||||
client_id: !Env AUTHENTIK_WIKI_OIDC_CLIENT_ID
|
||||
client_secret: !Env AUTHENTIK_WIKI_OIDC_CLIENT_SECRET
|
||||
# Aus Wiki.js übernehmen (Teil 3 zeigt die Callback-URL nach Anlegen
|
||||
# der Strategy). Erst danach hier eintragen:
|
||||
redirect_uris:
|
||||
- matching_mode: strict
|
||||
url: https://wiki.axion1337.chat/login/PROVIDERKEY/callback
|
||||
sub_mode: hashed_user_id
|
||||
include_claims_in_id_token: true
|
||||
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
|
||||
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
||||
property_mappings:
|
||||
- !Find [authentik_core.propertymapping, [managed, "goauthentik.io/providers/oauth2/scope-openid"]]
|
||||
- !Find [authentik_core.propertymapping, [managed, "goauthentik.io/providers/oauth2/scope-email"]]
|
||||
- !Find [authentik_core.propertymapping, [managed, "goauthentik.io/providers/oauth2/scope-profile"]]
|
||||
# + Gruppen-Claim: entweder das mitgelieferte Groups-Scope-Mapping
|
||||
# (falls vorhanden) oder ein eigenes Scope-Mapping, das "groups"
|
||||
# zurückgibt — nötig für Rollen/Abschottung (#0049).
|
||||
|
||||
- model: authentik_core.application
|
||||
state: present
|
||||
identifiers:
|
||||
slug: wiki-js
|
||||
attrs:
|
||||
name: ThreadNet Wiki
|
||||
provider: !KeyOf wiki_oidc_provider
|
||||
meta_description: Internes Wiki (Betrieb/Anwender), Zugriff nach Gruppe
|
||||
policy_engine_mode: any
|
||||
open_in_new_tab: false
|
||||
```
|
||||
|
||||
`client_id`/`client_secret` sind Credentials → in die `authentik-credentials`-
|
||||
Secret (wie `AUTHENTIK_MAS_OIDC_CLIENT_SECRET`), **nicht** in die ConfigMap. Der
|
||||
ConfigMap-Blueprint liest sie per `!Env`.
|
||||
|
||||
## Teil 3 — Wiki.js-Seite (Authentication → OpenID Connect)
|
||||
|
||||
In Wiki.js *Administration → Authentication → + OpenID Connect*:
|
||||
- **Client ID / Client Secret**: dieselben Werte wie in Teil 2.
|
||||
- **Authorization Endpoint URL**: `https://auth.axion1337.chat/application/o/authorize/`
|
||||
- **Token Endpoint URL**: `https://auth.axion1337.chat/application/o/token/`
|
||||
- **User Info Endpoint URL**: `https://auth.axion1337.chat/application/o/userinfo/`
|
||||
- **Issuer**: `https://auth.axion1337.chat/application/o/wiki-js/`
|
||||
- **Logout URL**: `https://auth.axion1337.chat/application/o/wiki-js/end-session/`
|
||||
- **Scopes**: `openid email profile` (+ das Groups-Scope aus Teil 2).
|
||||
- **Groups Claim**: `groups` → auf Wiki.js-Gruppen/Rollen mappen (Admin schreibt,
|
||||
Anwender read-only, Betrieb/Anwender abgeschottet — #0049).
|
||||
|
||||
⚠️ **Reihenfolge:** Wiki.js zeigt beim Anlegen der Strategy die **Callback-URL**
|
||||
(`https://wiki.axion1337.chat/login/<providerKey>/callback`). Diese `<providerKey>`
|
||||
in die `redirect_uris` von Teil 2 eintragen — vorher passt die Umleitung nicht.
|
||||
|
||||
## Reihenfolge / Abhängigkeiten
|
||||
|
||||
1. Wiki.js-Deployment + Service `wikijs` (#0048) — sonst zeigt die IngressRoute
|
||||
ins Leere.
|
||||
2. Ingress + Cert (Teil 1) — Cert wird erst ausgestellt, wenn der ACME-Challenge
|
||||
über den Ingress erreichbar ist.
|
||||
3. OIDC (Teil 2/3) — Callback-URL aus Wiki.js, dann Blueprint scharf.
|
||||
4. Rollen/Abschottung + Gruppen (#0049) — Gruppen legt sorb an.
|
||||
|
||||
## Braucht sorb
|
||||
|
||||
- **OIDC Client-ID + Secret** (Credential; in `authentik-credentials`).
|
||||
- **Authentik-Gruppen** für #0049 (Admin/Betrieb/Anwender).
|
||||
- Beim Cutover: die **Guide-09-Objekte stilllegen** (Proxy-Provider „ThreadNet
|
||||
Wiki", App `wiki`, Outpost `wiki-forward-auth`).
|
||||
|
||||
## Verifikation
|
||||
|
||||
1. `dig wiki.axion1337.chat` → `49.13.132.245`.
|
||||
2. `curl -sI https://wiki.axion1337.chat` → 200/302 (nicht Cert-Fehler).
|
||||
3. Aufruf → Wiki.js-Login → „Login with Authentik" → `auth.axion1337.chat` →
|
||||
zurück, eingeloggt.
|
||||
4. **Admin**: editieren, sieht Betrieb + Anwender. **Anwender**: read-only,
|
||||
`/betrieb` nicht in Navigation/Suche.
|
||||
@@ -16,7 +16,8 @@ Die Implementierungen wurden in dieser Reihenfolge durchgeführt. Für neue Setu
|
||||
| 6 | Moderationsbot (Draupnir) & Content Scanning | `06-moderation-content-scanning.md` | ✅ Deployed | Matrix Synapse |
|
||||
| 7 | Host-Wartungsbenachrichtigungen (unattended-upgrades) | `07-host-maintenance-notifications.md` | ✅ Deployed | Host-Ebene (kein K8s) |
|
||||
| 8 | @concierge — Gäste-Einladungen mit Ablauf | `08-concierge-gaeste-einladungen.md` | ⏳ Wartet auf Zugangsdaten | Matrix Synapse |
|
||||
| 9 | Docusaurus-Wiki hinter Authentik (Forward-Auth) | `09-wiki-forward-auth.md` | 📝 Vorbereitet, nicht ausgerollt | Authentik + Traefik (Overmind) |
|
||||
| 9 | Docusaurus-Wiki hinter Authentik (Forward-Auth) | `09-wiki-forward-auth.md` | 📝 Vorbereitet, nicht ausgerollt · abgelöst durch 10 (Suite) | Authentik + Traefik (Overmind) |
|
||||
| 10 | Wiki.js: Zugang (wiki.axion1337.chat) + Authentik-OIDC | `10-wiki-js-zugang-und-oidc.md` | 📝 Vorbereitet, nicht ausgerollt | Authentik + Traefik (Suite/k8s) |
|
||||
|
||||
---
|
||||
|
||||
@@ -107,7 +108,15 @@ Zugangsdaten (Matrix-Konto, Authentik-Token, Secret).
|
||||
Statisches Docusaurus-Wiki hinter Authentik: Proxy-Provider (Forward-Auth) + Anwendung +
|
||||
Gruppe `wiki-zugang` als Blueprint, Proxy-Outpost-Container plus Traefik-Middleware auf
|
||||
Overmind. Vorbereitet, nicht ausgerollt — Blueprint als Vorlage im Guide, Outpost-Token
|
||||
und `wiki-zugang`-Mitglieder sind sorbs Schritt; blockiert auf Wiki-Hostname (#0024, DOC-03).
|
||||
und `wiki-zugang`-Mitglieder sind sorbs Schritt. **Entwicklungs-Zwischenstand**, wird beim
|
||||
Suite-Umzug durch Guide 10 (Wiki.js, natives OIDC) abgelöst — ADR-0014.
|
||||
|
||||
### [10-wiki-js-zugang-und-oidc.md](10-wiki-js-zugang-und-oidc.md)
|
||||
Zugang zum Suite-Wiki (Wiki.js, ADR-0014): öffentlich `wiki.axion1337.chat` mit
|
||||
**nativem** Authentik-OIDC (kein Forward-Auth). Fertiges Ingress+Certificate-Manifest
|
||||
(Muster wie authentik), Authentik-OIDC-Provider-Blueprint und die Wiki.js-OIDC-Einstellungen.
|
||||
Vorbereitet, nicht ausgerollt — Client-Secret und Gruppen sind sorbs Schritt; gehört zu
|
||||
#0048 (Ingress/Cert) und #0049 (OIDC/Rollen).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user