2022-08-05 22:52:12 +00:00
|
|
|
version: 1
|
2022-08-02 22:05:49 +00:00
|
|
|
metadata:
|
|
|
|
name: Default - Source enrollment flow
|
2022-07-31 15:11:44 +00:00
|
|
|
entries:
|
|
|
|
- attrs:
|
|
|
|
designation: enrollment
|
|
|
|
name: Welcome to authentik! Please select a username.
|
|
|
|
title: Welcome to authentik! Please select a username.
|
2022-12-02 15:14:25 +00:00
|
|
|
authentication: none
|
2022-07-31 15:11:44 +00:00
|
|
|
identifiers:
|
|
|
|
slug: default-source-enrollment
|
|
|
|
model: authentik_flows.flow
|
|
|
|
id: flow
|
|
|
|
- attrs:
|
|
|
|
order: 100
|
|
|
|
placeholder: Username
|
|
|
|
placeholder_expression: false
|
|
|
|
required: true
|
|
|
|
type: text
|
|
|
|
field_key: username
|
|
|
|
label: Username
|
2023-01-24 11:23:22 +00:00
|
|
|
identifiers:
|
|
|
|
name: default-source-enrollment-field-username
|
2022-07-31 15:11:44 +00:00
|
|
|
id: prompt-field-username
|
|
|
|
model: authentik_stages_prompt.prompt
|
|
|
|
- attrs:
|
|
|
|
expression: |
|
|
|
|
# Check if we''ve not been given a username by the external IdP
|
|
|
|
# and trigger the enrollment flow
|
2022-08-01 21:05:58 +00:00
|
|
|
return 'username' not in context.get('prompt_data', {})
|
2022-07-31 15:11:44 +00:00
|
|
|
identifiers:
|
|
|
|
name: default-source-enrollment-if-username
|
|
|
|
id: default-source-enrollment-if-username
|
|
|
|
model: authentik_policies_expression.expressionpolicy
|
|
|
|
- attrs:
|
|
|
|
expression: |
|
|
|
|
# This policy ensures that this flow can only be used when the user
|
|
|
|
# is in a SSO Flow (meaning they come from an external IdP)
|
|
|
|
return ak_is_sso_flow
|
|
|
|
identifiers:
|
|
|
|
name: default-source-enrollment-if-sso
|
|
|
|
id: default-source-enrollment-if-sso
|
|
|
|
model: authentik_policies_expression.expressionpolicy
|
2023-01-16 12:18:25 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
name: default-source-enrollment-login
|
|
|
|
id: default-source-enrollment-login
|
|
|
|
model: authentik_stages_user_login.userloginstage
|
|
|
|
- attrs:
|
|
|
|
fields:
|
|
|
|
- !KeyOf prompt-field-username
|
|
|
|
identifiers:
|
|
|
|
name: default-source-enrollment-prompt
|
|
|
|
id: default-source-enrollment-prompt
|
|
|
|
model: authentik_stages_prompt.promptstage
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
name: default-source-enrollment-write
|
|
|
|
id: default-source-enrollment-write
|
|
|
|
model: authentik_stages_user_write.userwritestage
|
2022-12-23 13:12:58 +00:00
|
|
|
attrs:
|
2023-01-05 14:46:20 +00:00
|
|
|
user_creation_mode: always_create
|
2022-07-31 15:11:44 +00:00
|
|
|
- attrs:
|
|
|
|
re_evaluate_policies: true
|
|
|
|
identifiers:
|
|
|
|
order: 0
|
|
|
|
stage: !KeyOf default-source-enrollment-prompt
|
|
|
|
target: !KeyOf flow
|
2022-08-01 21:05:58 +00:00
|
|
|
id: prompt-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: 1
|
|
|
|
stage: !KeyOf default-source-enrollment-write
|
|
|
|
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: 2
|
|
|
|
stage: !KeyOf default-source-enrollment-login
|
|
|
|
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: 0
|
|
|
|
policy: !KeyOf default-source-enrollment-if-sso
|
|
|
|
target: !KeyOf flow
|
|
|
|
model: authentik_policies.policybinding
|
2022-08-05 22:52:12 +00:00
|
|
|
- identifiers:
|
2022-07-31 15:11:44 +00:00
|
|
|
order: 0
|
|
|
|
policy: !KeyOf default-source-enrollment-if-username
|
|
|
|
target: !KeyOf prompt-binding
|
|
|
|
model: authentik_policies.policybinding
|