1
0
forked from c3d2/nix-config

grafana: fix ldap group seeding

This commit is contained in:
Sandro - 2023-07-02 05:49:20 +02:00
parent e12024d668
commit 999999920e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 7 additions and 11 deletions

View File

@ -220,6 +220,12 @@
internalIp4 = hosts4.auth; internalIp4 = hosts4.auth;
internalIp6 = hosts6.up4.auth; internalIp6 = hosts6.up4.auth;
ldapPreset = true; ldapPreset = true;
seedSettings.groups = lib.singleton {
long_name = "Grafana Administrators";
name = "grafana-admins";
dont_manage_members = true;
permissions = {};
};
}; };
postgresql.upgrade = { postgresql.upgrade = {

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let
ldapGroup = "grafana-admins";
in
{ {
microvm.mem = 4096; microvm.mem = 4096;
c3d2.deployment.server = "server10"; c3d2.deployment.server = "server10";
@ -61,7 +58,7 @@ in
icon = "signin"; icon = "signin";
name = "auth.c3d2.de"; name = "auth.c3d2.de";
oauth_auto_login = true; # redirect automatically to the only oauth provider oauth_auto_login = true; # redirect automatically to the only oauth provider
role_attribute_path = "contains(groups[*], '${ldapGroup}') && 'Admin'"; role_attribute_path = "contains(groups[*], 'grafana-admins') && 'Admin'";
# https://dexidp.io/docs/custom-scopes-claims-clients/ # https://dexidp.io/docs/custom-scopes-claims-clients/
scopes = "openid email groups profile offline_access"; scopes = "openid email groups profile offline_access";
token_url = "https://auth.c3d2.de/dex/token"; token_url = "https://auth.c3d2.de/dex/token";
@ -108,13 +105,6 @@ in
}; };
}; };
}; };
portunus.seedingSettings.groups = lib.singleton {
long_name = "Grafana Administrators";
name = ldapGroup;
dont_manage_members = true;
permissions = {};
};
}; };
sops = { sops = {