grafana: add Grafana on monitoring02 with Kanidm OIDC
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Deploy Grafana test instance on monitoring02 with: - Kanidm OIDC authentication (admins -> Admin role, others -> Viewer) - Declarative datasources for Prometheus and Loki on monitoring01 - Local Caddy for TLS termination via internal ACME CA - DNS CNAME grafana-test.home.2rjus.net Terraform changes add OAuth2 client secret and AppRole policies for kanidm01 and monitoring02. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,16 @@
|
||||
};
|
||||
|
||||
# Regular users (persons) are managed imperatively via kanidm CLI
|
||||
|
||||
# OAuth2/OIDC clients for service authentication
|
||||
systems.oauth2.grafana = {
|
||||
displayName = "Grafana";
|
||||
originUrl = "https://grafana-test.home.2rjus.net/login/generic_oauth";
|
||||
originLanding = "https://grafana-test.home.2rjus.net/";
|
||||
basicSecretFile = config.vault.secrets.grafana-oauth2.outputDir;
|
||||
preferShortUsername = true;
|
||||
scopeMaps.users = [ "openid" "profile" "email" "groups" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -53,6 +63,15 @@
|
||||
group = "kanidm";
|
||||
};
|
||||
|
||||
# Vault secret for Grafana OAuth2 client secret
|
||||
vault.secrets.grafana-oauth2 = {
|
||||
secretPath = "services/grafana/oauth2-client-secret";
|
||||
extractKey = "password";
|
||||
services = [ "kanidm" ];
|
||||
owner = "kanidm";
|
||||
group = "kanidm";
|
||||
};
|
||||
|
||||
# Note: Kanidm does not expose Prometheus metrics
|
||||
# If metrics support is added in the future, uncomment:
|
||||
# homelab.monitoring.scrapeTargets = [
|
||||
|
||||
Reference in New Issue
Block a user