add oauth2-proxy
This commit is contained in:
parent
edc0ae4062
commit
31106bdf15
2 changed files with 26 additions and 0 deletions
|
@ -5,6 +5,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
./keycloak.nix
|
||||
./oauth2-proxy.nix
|
||||
];
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
|
25
hosts/auth/oauth2-proxy.nix
Normal file
25
hosts/auth/oauth2-proxy.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
sops.secrets."oauth2-proxy/env" = {
|
||||
owner = config.users.users.oauth2-proxy.name;
|
||||
};
|
||||
|
||||
services.oauth2-proxy = {
|
||||
enable = true;
|
||||
reverseProxy = true;
|
||||
provider = "keycloak-oidc";
|
||||
httpAddress = "0.0.0.0:4180";
|
||||
oidcIssuerUrl = "https://auth.oxapentane.com/realms/0xalab-prod";
|
||||
clientID = "radicale-proxy";
|
||||
redirectURL = "https://dav.oxapentane.com/oauth2/callback";
|
||||
keyFile = config.sops.secrets."oauth2-proxy/env".path;
|
||||
scope = "openid";
|
||||
email.domains = [ "*" ];
|
||||
setXauthrequest = true;
|
||||
cookie = {
|
||||
secure = true;
|
||||
refresh = "48h0m0s";
|
||||
domain = ".oxapentane.com";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue