1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: patch oauth2-proxy to support scopes as groups

This commit is contained in:
oddlama 2023-06-23 15:20:58 +02:00
parent 1a0378ee5c
commit eb9ee0bf0d
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
7 changed files with 65 additions and 16 deletions

View file

@ -99,12 +99,14 @@ in {
cookie.domain = ".${cfg.cookieDomain}";
cookie.secure = true;
cookie.httpOnly = false;
cookie.refresh = "5m";
# FIXME disabled because of errors. My closest guess is that this
# reuses refresh tokens but kanidm forbids that. Not sure though.
#cookie.refresh = "5m";
cookie.expire = "30m";
reverseProxy = true;
httpAddress = "unix:///run/oauth2_proxy/oauth2_proxy.sock";
redirectURL = "https://${cfg.portalDomain}/oauth2/callback";
setXauthrequest = true;
extraConfig = {
@ -112,12 +114,10 @@ in {
code-challenge-method = "S256";
# Share the cookie with all subpages
whitelist-domain = ".${cfg.cookieDomain}";
redirect-url = "https://${cfg.portalDomain}/oauth2/callback";
set-authorization-header = true;
pass-access-token = true;
skip-jwt-bearer-tokens = true;
upstream = "static://202";
# TODO allowed group?
};
};