-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add data source policy #546
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
==========================================
- Coverage 83.81% 83.69% -0.13%
==========================================
Files 95 96 +1
Lines 9103 9130 +27
==========================================
+ Hits 7630 7641 +11
- Misses 1047 1055 +8
- Partials 426 434 +8 ☔ View full report in Codecov by Sentry. |
05bfb1c
to
9157fc7
Compare
Instead of a single |
@rissson resource "authentik_policy_expression" "authentication-flow-password-stage" {
expression = <<EOT
flow_plan = request.context.get("flow_plan")
if not flow_plan:
return True
# If the user does not have a backend attached to it, they haven't
# been authenticated yet and we need the password stage
return not hasattr(flow_plan.context.get("pending_user"), "backend")
EOT
name = "authentication-flow-password-stage"
}
resource "authentik_policy_binding" "my-default-authentication-password_" {
policy = authentik_policy_expression.authentication-flow-password-stage.id
target = authentik_flow_stage_binding.my-default-authentication-password.id
order = 10
} by this one (use the id of a data source)
This is much smarter and needs only the id. This is the same as when using the data source stage for flow bindings which works nicely. |
useful to rebuild default flows with dedicated changes