blueprints: add required password stage backends
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
070714abe4
commit
0ab8f4eed7
|
@ -183,8 +183,6 @@ class Format(YAMLTag):
|
||||||
|
|
||||||
def resolve(self, entry: BlueprintEntry, blueprint: Blueprint) -> Any:
|
def resolve(self, entry: BlueprintEntry, blueprint: Blueprint) -> Any:
|
||||||
try:
|
try:
|
||||||
print(self.format_string)
|
|
||||||
print(self.args)
|
|
||||||
return self.format_string % tuple(self.args)
|
return self.format_string % tuple(self.args)
|
||||||
except TypeError as exc:
|
except TypeError as exc:
|
||||||
raise EntryInvalidError(exc)
|
raise EntryInvalidError(exc)
|
||||||
|
|
|
@ -15,6 +15,7 @@ def update_default_backends(apps: Apps, schema_editor: BaseDatabaseSchemaEditor)
|
||||||
if not stages.exists():
|
if not stages.exists():
|
||||||
return
|
return
|
||||||
stage = stages.first()
|
stage = stages.first()
|
||||||
|
if BACKEND_APP_PASSWORD not in stage.backends:
|
||||||
stage.backends.append(BACKEND_APP_PASSWORD)
|
stage.backends.append(BACKEND_APP_PASSWORD)
|
||||||
stage.save()
|
stage.save()
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ entries:
|
||||||
model: authentik_flows.flow
|
model: authentik_flows.flow
|
||||||
id: flow
|
id: flow
|
||||||
- attrs:
|
- attrs:
|
||||||
|
backends:
|
||||||
|
- authentik.core.auth.InbuiltBackend
|
||||||
|
- authentik.sources.ldap.auth.LDAPBackend
|
||||||
|
- authentik.core.auth.TokenBackend
|
||||||
configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]
|
configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]
|
||||||
identifiers:
|
identifiers:
|
||||||
name: default-authentication-password
|
name: default-authentication-password
|
||||||
|
@ -20,7 +24,11 @@ entries:
|
||||||
name: default-authentication-mfa-validation
|
name: default-authentication-mfa-validation
|
||||||
id: default-authentication-mfa-validation
|
id: default-authentication-mfa-validation
|
||||||
model: authentik_stages_authenticator_validate.authenticatorvalidatestage
|
model: authentik_stages_authenticator_validate.authenticatorvalidatestage
|
||||||
- identifiers:
|
- attrs:
|
||||||
|
user_fields:
|
||||||
|
- email
|
||||||
|
- username
|
||||||
|
identifiers:
|
||||||
name: default-authentication-identification
|
name: default-authentication-identification
|
||||||
id: default-authentication-identification
|
id: default-authentication-identification
|
||||||
model: authentik_stages_identification.identificationstage
|
model: authentik_stages_identification.identificationstage
|
||||||
|
|
Reference in New Issue