authentik: refactor groups and proxied apps blueprints
This commit is contained in:
parent
f0a10cc1d2
commit
ee24d69906
@ -4,61 +4,47 @@ metadata:
|
|||||||
blueprints.goauthentik.io/instantiate: "true"
|
blueprints.goauthentik.io/instantiate: "true"
|
||||||
name: Alpina - Proxied Apps
|
name: Alpina - Proxied Apps
|
||||||
entries:
|
entries:
|
||||||
- identifiers:
|
# TODO: Possibly refactor this into a jinja macro (?)
|
||||||
name: arrstack
|
|
||||||
model: authentik_core.group
|
|
||||||
id: arrstack
|
|
||||||
attrs:
|
|
||||||
arrstack_username: "arr"
|
|
||||||
arrstack_password: "{{ arrstack_password }}"
|
|
||||||
|
|
||||||
# TODO: Probably refactor this into a jinja macro
|
|
||||||
{% set apps = {
|
{% set apps = {
|
||||||
"uptime-kuma": {
|
"Uptime Kuma": {
|
||||||
"host": "uptime",
|
"host": "uptime",
|
||||||
"name": "Uptime Kuma",
|
|
||||||
"icon": "https://uptime."~ domain ~"/icon.svg",
|
"icon": "https://uptime."~ domain ~"/icon.svg",
|
||||||
"unauthenticated_paths": "^/icon.svg$",
|
"unauthenticated_paths": "^/icon.svg$",
|
||||||
"group": "Services",
|
"ui_group": "Services",
|
||||||
"create_admin_group": true,
|
"allowed_for_groups": ["admins"],
|
||||||
},
|
},
|
||||||
"qbit": {
|
"qBit": {
|
||||||
"host": "qbit",
|
"host": "qbit",
|
||||||
"name": "qBit",
|
|
||||||
"icon": "https://qbit."~ domain ~"/images/qbittorrent-tray.svg",
|
"icon": "https://qbit."~ domain ~"/images/qbittorrent-tray.svg",
|
||||||
"unauthenticated_paths": "^/images/qbittorrent-tray.svg$",
|
"unauthenticated_paths": "^/images/qbittorrent-tray.svg$",
|
||||||
"group": "Arrstack",
|
"ui_group": "Arrstack",
|
||||||
"create_admin_group": false,
|
"allowed_for_groups": ["arrstack"],
|
||||||
},
|
},
|
||||||
"prowlarr": {
|
"Prowlarr": {
|
||||||
"host": "prowlarr",
|
"host": "prowlarr",
|
||||||
"name": "Prowlarr",
|
|
||||||
"icon": "https://prowlarr."~ domain ~"/Content/Images/logo.svg",
|
"icon": "https://prowlarr."~ domain ~"/Content/Images/logo.svg",
|
||||||
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
||||||
"group": "Arrstack",
|
"ui_group": "Arrstack",
|
||||||
"create_admin_group": false,
|
"allowed_for_groups": ["arrstack"],
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"Sonarr": {
|
||||||
"host": "sonarr",
|
"host": "sonarr",
|
||||||
"name": "Sonarr",
|
|
||||||
"icon": "https://sonarr."~ domain ~"/Content/Images/logo.svg",
|
"icon": "https://sonarr."~ domain ~"/Content/Images/logo.svg",
|
||||||
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
||||||
"group": "Arrstack",
|
"ui_group": "Arrstack",
|
||||||
"create_admin_group": false,
|
"allowed_for_groups": ["arrstack"],
|
||||||
},
|
},
|
||||||
"radarr": {
|
"Radarr": {
|
||||||
"host": "radarr",
|
"host": "radarr",
|
||||||
"name": "Radarr",
|
|
||||||
"icon": "https://radarr."~ domain ~"/Content/Images/logo.svg",
|
"icon": "https://radarr."~ domain ~"/Content/Images/logo.svg",
|
||||||
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
"unauthenticated_paths": "^/Content/Images/logo.svg$",
|
||||||
"group": "Arrstack",
|
"ui_group": "Arrstack",
|
||||||
"create_admin_group": false,
|
"allowed_for_groups": ["arrstack"],
|
||||||
},
|
},
|
||||||
} -%}
|
} -%}
|
||||||
|
|
||||||
{% for app in apps.keys() -%}
|
{% for app in apps.keys() -%}
|
||||||
- identifiers:
|
- identifiers:
|
||||||
name: {{ apps[app]["name"] }}
|
name: {{ app }}
|
||||||
model: authentik_providers_proxy.proxyprovider
|
model: authentik_providers_proxy.proxyprovider
|
||||||
id: {{ app }}
|
id: {{ app }}
|
||||||
attrs:
|
attrs:
|
||||||
@ -68,39 +54,26 @@ entries:
|
|||||||
skip_path_regex: "{{ apps[app]["unauthenticated_paths"] }}"
|
skip_path_regex: "{{ apps[app]["unauthenticated_paths"] }}"
|
||||||
|
|
||||||
- identifiers:
|
- identifiers:
|
||||||
slug: {{ app }}
|
slug: {{ app | lower | replace(" ", "-") }}
|
||||||
model: authentik_core.application
|
model: authentik_core.application
|
||||||
|
id: app-{{ app }}
|
||||||
attrs:
|
attrs:
|
||||||
name: {{ apps[app]["name"] }}
|
name: {{ app }}
|
||||||
group: {{ apps[app]["group"] }}
|
group: {{ apps[app]["ui_group"] }}
|
||||||
meta_description: "Hello, I'm {{ apps[app]["name"] }}!"
|
meta_description: "Hello, I'm {{ app }}!"
|
||||||
meta_publisher: Alpina
|
meta_publisher: Alpina
|
||||||
icon: "{{ apps[app]["icon"] }}"
|
icon: "{{ apps[app]["icon"] }}"
|
||||||
open_in_new_tab: true
|
open_in_new_tab: true
|
||||||
provider: !KeyOf {{ app }}
|
provider: !KeyOf {{ app }}
|
||||||
|
|
||||||
{% if apps[app]["create_admin_group"] -%}
|
{% for group in apps[app]["allowed_for_groups"] -%}
|
||||||
- identifiers:
|
- identifiers:
|
||||||
name: "{{ apps[app]["name"] }} Admins"
|
group: !Find [authentik_core.group, [name, {{ group }}]]
|
||||||
model: authentik_core.group
|
target: !KeyOf app-{{ app }}
|
||||||
id: "{{ app }} Admins"
|
|
||||||
|
|
||||||
- identifiers:
|
|
||||||
group: !KeyOf "{{ app }} Admins"
|
|
||||||
target: !Find [authentik_core.application, [ slug, {{ app }}] ]
|
|
||||||
model: authentik_policies.policybinding
|
model: authentik_policies.policybinding
|
||||||
attrs:
|
attrs:
|
||||||
order: 0
|
order: 10
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if apps[app]["group"] == "Arrstack" -%}
|
|
||||||
- identifiers:
|
|
||||||
group: !KeyOf arrstack
|
|
||||||
target: !Find [authentik_core.application, [slug, {{ app }}]]
|
|
||||||
model: authentik_policies.policybinding
|
|
||||||
attrs:
|
|
||||||
order: 0
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
version: 1
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
blueprints.goauthentik.io/instantiate: "true"
|
||||||
|
name: Alpina - Default Groups
|
||||||
|
entries:
|
||||||
|
- identifiers:
|
||||||
|
name: "admins"
|
||||||
|
model: authentik_core.group
|
||||||
|
id: "admins"
|
||||||
|
|
||||||
|
- identifiers:
|
||||||
|
name: "users"
|
||||||
|
model: authentik_core.group
|
||||||
|
id: "users"
|
||||||
|
|
||||||
|
- identifiers:
|
||||||
|
name: "arrstack"
|
||||||
|
model: authentik_core.group
|
||||||
|
id: "arrstack"
|
||||||
|
attrs:
|
||||||
|
arrstack_username: "arr"
|
||||||
|
arrstack_password: "{{ arrstack_password }}"
|
Loading…
x
Reference in New Issue
Block a user