refactor(authentik): Seperate blueprint for applications
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: blueprint-wireguard-admin
|
||||
namespace: authentik
|
||||
data:
|
||||
wireguard-admin.yaml: |
|
||||
version: 1
|
||||
metadata:
|
||||
name: WireGuard admin
|
||||
entries:
|
||||
# wg-easy rejects logins unless email_verified is true; the default email
|
||||
# mapping always sends false.
|
||||
- model: authentik_providers_oauth2.scopemapping
|
||||
id: verified-email
|
||||
identifiers:
|
||||
name: wireguard-admin email
|
||||
attrs:
|
||||
scope_name: email
|
||||
expression: |
|
||||
return {
|
||||
"email": request.user.email,
|
||||
"email_verified": True,
|
||||
}
|
||||
- model: authentik_providers_oauth2.oauth2provider
|
||||
id: wireguard-admin-provider
|
||||
identifiers:
|
||||
name: wireguard-admin
|
||||
attrs:
|
||||
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
|
||||
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
||||
client_id: wireguard-admin
|
||||
client_secret: !Env WIREGUARD_CLIENT_SECRET
|
||||
grant_types:
|
||||
- authorization_code
|
||||
- refresh_token
|
||||
redirect_uris:
|
||||
- matching_mode: strict
|
||||
url: https://wg-admin.whyredfire.dev/api/auth/oidc/callback
|
||||
- matching_mode: strict
|
||||
url: https://wg-admin.whyredfire.dev/api/auth/oidc/link
|
||||
signing_key: !Find [authentik_crypto.certificatekeypair, [name, authentik Self-signed Certificate]]
|
||||
property_mappings:
|
||||
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-openid]]
|
||||
- !KeyOf verified-email
|
||||
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-profile]]
|
||||
- model: authentik_core.application
|
||||
id: wireguard-admin
|
||||
identifiers:
|
||||
slug: wireguard-admin
|
||||
attrs:
|
||||
name: WireGuard Admin
|
||||
provider: !KeyOf wireguard-admin-provider
|
||||
meta_launch_url: https://wg-admin.whyredfire.dev
|
||||
# wg-easy makes every user it registers an admin, so only admins may log in.
|
||||
- model: authentik_policies.policybinding
|
||||
identifiers:
|
||||
order: 0
|
||||
target: !KeyOf wireguard-admin
|
||||
attrs:
|
||||
group: !Find [authentik_core.group, [name, admins]]
|
||||
Reference in New Issue
Block a user