fix(authentik): give the identification stage its required fields

The actual root cause of the failing blueprint, visible only after the KeyOf references were gone: the entry set recovery_flow alone, but the serializer validates the whole object and rejected it with 'When no user fields are selected, at least one source must be selected'.

All other fields are listed on purpose even though they match the model defaults - whatever the serializer does not receive is reset to its default, so a blueprint naming a single field can silently flip unrelated settings. Values are taken from the live database.

Refs axion1337.chat/axion1337.chat-gitops#60
This commit is contained in:
Thore Cimbal
2026-08-07 12:00:00 +00:00
parent 3c6f3645b3
commit f0174decc1
+21 -1
View File
@@ -193,13 +193,33 @@ data:
attrs: attrs:
stage: !Find [authentik_stages_redirect.redirectstage, [name, matrix-invitation-redirect]] stage: !Find [authentik_stages_redirect.redirectstage, [name, matrix-invitation-redirect]]
# Wire the "Forgot password?" link on the real login flow used by MAS # Wire the "Forgot password?" link on the real login flow used by MAS.
#
# ⚠️ Hier reicht recovery_flow allein NICHT. Der Serializer validiert das
# ganze Objekt, nicht nur die angegebenen Felder - ohne user_fields faellt
# er mit "When no user fields are selected, at least one source must be
# selected". Das war die eigentliche Ursache von gitops#60; sichtbar wurde
# sie erst, nachdem die !KeyOf-Verweise weg waren (die haben die Meldung
# ueberdeckt).
#
# Die uebrigen Felder stehen bewusst mit drin, obwohl sie den Model-Defaults
# entsprechen: Was der Serializer nicht bekommt, setzt er auf den Default
# zurueck. Ein Blueprint, der nur ein Feld nennt, kann so still andere
# Einstellungen kippen. Werte sind der Stand aus der Datenbank.
- model: authentik_stages_identification.identificationstage - model: authentik_stages_identification.identificationstage
state: present state: present
identifiers: identifiers:
name: default-authentication-identification name: default-authentication-identification
attrs: attrs:
recovery_flow: !Find [authentik_flows.flow, [slug, matrix-recovery]] recovery_flow: !Find [authentik_flows.flow, [slug, matrix-recovery]]
user_fields:
- email
- username
case_insensitive_matching: true
show_matched_user: true
pretend_user_exists: true
show_source_labels: false
enable_remember_me: false
matrix-mfa-setup-redirect.yaml: | matrix-mfa-setup-redirect.yaml: |
# yaml-language-server: $schema=https://goauthentik.io/blueprints/schema.json # yaml-language-server: $schema=https://goauthentik.io/blueprints/schema.json
version: 1 version: 1