Configured Grafana to allow Authentik authentication
This commit is contained in:
parent
9f457f7c8c
commit
bc6ba83d73
7 changed files with 50 additions and 3 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -5,7 +5,8 @@
|
||||||
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/basic.yaml",
|
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/basic.yaml",
|
||||||
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/umm.yaml",
|
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/umm.yaml",
|
||||||
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/dynamic.yaml",
|
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/dynamic.yaml",
|
||||||
"file:///workspace/dev/ansible/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/routers.yaml"
|
"file:///workspace/dev/ansible/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/routers.yaml",
|
||||||
|
"file:///workspaces/minilab/collections/ansible_collections/adhdgirl/minilab/roles/traefik/files/routers.yaml"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -46,3 +46,18 @@ level = {{ grafana_log_level }}
|
||||||
[analytics]
|
[analytics]
|
||||||
reporting_enabled = false
|
reporting_enabled = false
|
||||||
check_for_updates = true
|
check_for_updates = true
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
signout_redirect_url = https://authentik.local.cobb.lgbt/application/o/grafana/end-session/
|
||||||
|
oauth_auto_login = true
|
||||||
|
|
||||||
|
[auth.generic_oauth]
|
||||||
|
name = authentik
|
||||||
|
enabled = true
|
||||||
|
client_id = {{ grafana_authentik_id }}
|
||||||
|
client_secret = {{ grafana_authentik_secret }}
|
||||||
|
scopes = openid email profile entitlements
|
||||||
|
auth_url = https://authentik.local.cobb.lgbt/application/o/authorize/
|
||||||
|
token_url = https://authentik.local.cobb.lgbt/application/o/token/
|
||||||
|
api_url = https://authentik.local.cobb.lgbt/application/o/userinfo/
|
||||||
|
role_attribute_path = contains(entitlements[*], 'Grafana Admins') && 'Admin' || contains(entitlements[*], 'Grafana Editors') && 'Editor' || 'Viewer'
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ grafana_admin_password: !vault |
|
||||||
6165636162363165360a633930643933613264613332333461653765663032626630313563633333
|
6165636162363165360a633930643933613264613332333461653765663032626630313563633333
|
||||||
3331
|
3331
|
||||||
grafana_domain: "grafana.local.cobb.lgbt"
|
grafana_domain: "grafana.local.cobb.lgbt"
|
||||||
|
grafana_root_url: "https://grafana.local.cobb.lgbt/"
|
||||||
grafana_datasources:
|
grafana_datasources:
|
||||||
- name: Prometheus
|
- name: Prometheus
|
||||||
type: prometheus
|
type: prometheus
|
||||||
|
|
@ -23,3 +24,17 @@ grafana_plugins:
|
||||||
- grafana-clock-panel
|
- grafana-clock-panel
|
||||||
- grafana-polystat-panel
|
- grafana-polystat-panel
|
||||||
grafana_secret_key: "4V0H3pCvZAmQ02TDJJoc"
|
grafana_secret_key: "4V0H3pCvZAmQ02TDJJoc"
|
||||||
|
grafana_authentik_id: JIrKG2SuOUKqlWqeV6W0XxpF2NYeQwgY48G7cnhj
|
||||||
|
grafana_authentik_secret: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
63303663646661633366656431326231316338643261626137343335623333653139633932396338
|
||||||
|
3264353532396365346430353434663932323065323032340a363134623732373935313737306332
|
||||||
|
63626365313962633932316230626435313234353535626261333462626161363061656262303236
|
||||||
|
3034323035333837350a643734373636373631323734383166303364646331646336386539356636
|
||||||
|
65383365653237393632643437626166363733346562393533363564626330623938336535613636
|
||||||
|
35373166623862323137653135363264346531656562663534376164306466303663666338656562
|
||||||
|
65663534386532643866303635323433363039663432633334343963646338316366343938623235
|
||||||
|
63373765303539373032353631663266316533613361643336373065306635613832313532636464
|
||||||
|
32363464353761363332646635616136346138336238333536353531643731663334333962326134
|
||||||
|
37316335366164363861333136323734336262363634326130343234303632616562303031303039
|
||||||
|
393331616563303033636261313937383238
|
||||||
|
|
|
||||||
|
|
@ -62,3 +62,14 @@ http:
|
||||||
observability:
|
observability:
|
||||||
metrics: true
|
metrics: true
|
||||||
service: coder@file
|
service: coder@file
|
||||||
|
grafana:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
rule: "Host(`grafana.local.cobb.lgbt`)"
|
||||||
|
tls:
|
||||||
|
certResolver: letsEncrypt
|
||||||
|
observability:
|
||||||
|
metrics: true
|
||||||
|
service: grafana@file
|
||||||
|
middlewares:
|
||||||
|
- known-ips@file
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
traefik_home_assistant_address: "{{ hostvars['home_assistant']['ansible_host'] }}"
|
traefik_home_assistant_address: "{{ hostvars['home_assistant']['ansible_host'] }}"
|
||||||
traefik_frigate_address: "{{ hostvars['curren']['ansible_host'] }}"
|
traefik_frigate_address: "{{ hostvars['curren']['ansible_host'] }}"
|
||||||
traefik_truenas_address: "{{ hostvars['mors']['ansible_host'] }}"
|
traefik_truenas_address: "{{ hostvars['mors']['ansible_host'] }}"
|
||||||
|
traefik_grafana_address: "{{ hostvars['super']['ansible_host'] }}"
|
||||||
cacheable: true
|
cacheable: true
|
||||||
- name: Ensure presense of folders for Traefik
|
- name: Ensure presense of folders for Traefik
|
||||||
tags: packages,docker,traefik
|
tags: packages,docker,traefik
|
||||||
|
|
|
||||||
|
|
@ -28,3 +28,7 @@ http:
|
||||||
serversTransport: insecureTransport
|
serversTransport: insecureTransport
|
||||||
servers:
|
servers:
|
||||||
- url: "https://{{ traefik_frigate_address }}:8971"
|
- url: "https://{{ traefik_frigate_address }}:8971"
|
||||||
|
grafana:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: "http://{{ traefik_grafana_address }}:3000"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ debian_derivatives:
|
||||||
- "Pop!_OS"
|
- "Pop!_OS"
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
global_dns_servers:
|
global_dns_servers:
|
||||||
- 10.69.2.4
|
- 10.69.10.10
|
||||||
- 10.69.10.12
|
- 10.69.10.11
|
||||||
# code: language=ansible
|
# code: language=ansible
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue