hosts/plover: update Vouch proxy settings and secrets permissions

This commit is contained in:
Gabriel Arazas 2023-10-14 11:26:33 +08:00
parent ac134281f8
commit 0b253e0553
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -6,9 +6,15 @@ let
authDomain = config.services.kanidm.serverSettings.domain;
in
{
sops.secrets = lib.getSecrets ../../secrets/secrets.yaml {
"vouch-proxy/jwt/secret" = { };
"vouch-proxy/client/secret" = { };
sops.secrets = let
vouchPermissions = rec {
owner = "vouch-proxy";
group = owner;
mode = "0400";
};
in lib.getSecrets ../../secrets/secrets.yaml {
"vouch-proxy/jwt/secret" = vouchPermissions;
"vouch-proxy/client/secret" = vouchPermissions;
};
services.vouch-proxy = {
@ -30,7 +36,7 @@ in
auth_url = "${authDomain}/ui/oauth2";
token_url = "${authDomain}/oauth2/token";
user_info_url = "${authDomain}/oauth2/openid/${client_id}/userinfo";
scopes = [ "login" "email" ];
scopes = [ "openid" "email" "profile" ];
callback_url = "https://${vouchDomain}/auth";
};
};