2022-08-05 22:52:12 +00:00
|
|
|
version: 1
|
2022-08-02 22:05:49 +00:00
|
|
|
metadata:
|
|
|
|
name: Default - Authentication flow
|
2022-07-31 15:11:44 +00:00
|
|
|
entries:
|
2022-08-29 19:20:58 +00:00
|
|
|
- model: authentik_blueprints.metaapplyblueprint
|
|
|
|
attrs:
|
|
|
|
identifiers:
|
|
|
|
name: Default - Password change flow
|
|
|
|
required: false
|
2022-07-31 15:11:44 +00:00
|
|
|
- attrs:
|
|
|
|
designation: authentication
|
|
|
|
name: Welcome to authentik!
|
|
|
|
title: Welcome to authentik!
|
2023-02-23 14:26:41 +00:00
|
|
|
authentication: none
|
2022-07-31 15:11:44 +00:00
|
|
|
identifiers:
|
|
|
|
slug: default-authentication-flow
|
|
|
|
model: authentik_flows.flow
|
|
|
|
id: flow
|
|
|
|
- attrs:
|
2022-08-19 13:51:50 +00:00
|
|
|
backends:
|
|
|
|
- authentik.core.auth.InbuiltBackend
|
|
|
|
- authentik.sources.ldap.auth.LDAPBackend
|
|
|
|
- authentik.core.auth.TokenBackend
|
2022-07-31 15:11:44 +00:00
|
|
|
configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]
|
|
|
|
identifiers:
|
|
|
|
name: default-authentication-password
|
|
|
|
id: default-authentication-password
|
|
|
|
model: authentik_stages_password.passwordstage
|
2022-08-19 11:01:01 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
name: default-authentication-mfa-validation
|
|
|
|
id: default-authentication-mfa-validation
|
|
|
|
model: authentik_stages_authenticator_validate.authenticatorvalidatestage
|
2022-08-19 13:51:50 +00:00
|
|
|
- attrs:
|
|
|
|
user_fields:
|
|
|
|
- email
|
|
|
|
- username
|
|
|
|
identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
name: default-authentication-identification
|
|
|
|
id: default-authentication-identification
|
|
|
|
model: authentik_stages_identification.identificationstage
|
2023-01-16 12:18:25 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
name: default-authentication-login
|
|
|
|
id: default-authentication-login
|
|
|
|
model: authentik_stages_user_login.userloginstage
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
order: 10
|
|
|
|
stage: !KeyOf default-authentication-identification
|
|
|
|
target: !KeyOf flow
|
|
|
|
model: authentik_flows.flowstagebinding
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
order: 20
|
|
|
|
stage: !KeyOf default-authentication-password
|
|
|
|
target: !KeyOf flow
|
2023-08-29 22:08:04 +00:00
|
|
|
attrs:
|
|
|
|
re_evaluate_policies: true
|
2023-07-31 11:42:35 +00:00
|
|
|
id: default-authentication-flow-password-binding
|
2022-07-31 15:11:44 +00:00
|
|
|
model: authentik_flows.flowstagebinding
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
order: 30
|
|
|
|
stage: !KeyOf default-authentication-mfa-validation
|
|
|
|
target: !KeyOf flow
|
|
|
|
model: authentik_flows.flowstagebinding
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
order: 100
|
|
|
|
stage: !KeyOf default-authentication-login
|
|
|
|
target: !KeyOf flow
|
|
|
|
model: authentik_flows.flowstagebinding
|
2023-07-31 11:42:35 +00:00
|
|
|
- model: authentik_policies_expression.expressionpolicy
|
|
|
|
id: default-authentication-flow-password-optional
|
|
|
|
identifiers:
|
|
|
|
name: default-authentication-flow-password-stage
|
|
|
|
attrs:
|
|
|
|
expression: |
|
2023-08-29 22:08:04 +00:00
|
|
|
flow_plan = request.context.get("flow_plan")
|
|
|
|
if not flow_plan:
|
|
|
|
return True
|
2023-07-31 11:42:35 +00:00
|
|
|
# If the user does not have a backend attached to it, they haven't
|
|
|
|
# been authenticated yet and we need the password stage
|
2023-08-29 22:08:04 +00:00
|
|
|
return not hasattr(flow_plan.context.get("pending_user"), "backend")
|
2023-07-31 11:42:35 +00:00
|
|
|
- model: authentik_policies.policybinding
|
|
|
|
identifiers:
|
|
|
|
order: 10
|
|
|
|
target: !KeyOf default-authentication-flow-password-binding
|
|
|
|
policy: !KeyOf default-authentication-flow-password-optional
|