# Authentik blueprint from https://exe.dev/deploy/authentik. # Superusers can sign in only through the private port (:8080, behind exe.dev # login). On the public address, the login flow stops right after the username, # before any password is checked. Everyone else signs in as usual. version: 1 metadata: name: exe.dev - admins sign in on the private port labels: blueprints.goauthentik.io/description: Deny superuser logins on the public address entries: - model: authentik_blueprints.metaapplyblueprint attrs: identifiers: name: Default - Authentication flow required: true - model: authentik_policies_expression.expressionpolicy id: policy identifiers: name: exe-dev-admin-on-public-address attrs: expression: | user = request.context.get("pending_user") req = request.http_request if not (user and user.pk and user.is_superuser and req): return False return not req.get_host().endswith(":8080") - model: authentik_stages_deny.denystage id: deny identifiers: name: exe-dev-deny-admin-public attrs: deny_message: Administrators sign in at the private address, on port 8080. - model: authentik_flows.flowstagebinding id: binding identifiers: target: !Find [authentik_flows.flow, [slug, default-authentication-flow]] stage: !KeyOf deny attrs: order: 15 evaluate_on_plan: false re_evaluate_policies: true - model: authentik_policies.policybinding identifiers: target: !KeyOf binding policy: !KeyOf policy attrs: order: 0