From d8a1802b3ed804fb26c50a6f23036aede1ac1182 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 25 Dec 2021 17:06:15 +0300 Subject: feat(whitby): Configure initial Keycloak setup Trialing this as an alternative to CAS that is a little easier to configure and can help us delegate authentication to other OIDC services. Change-Id: Iad63724d349334910af8fed0b148e4ba428f796b Reviewed-on: https://cl.tvl.fyi/c/depot/+/4608 Tested-by: BuildkiteCI Autosubmit: tazjin Reviewed-by: lukegb --- ops/modules/www/auth.tvl.fyi.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ops/modules/www/auth.tvl.fyi.nix (limited to 'ops/modules/www/auth.tvl.fyi.nix') diff --git a/ops/modules/www/auth.tvl.fyi.nix b/ops/modules/www/auth.tvl.fyi.nix new file mode 100644 index 0000000000..e0c031bf70 --- /dev/null +++ b/ops/modules/www/auth.tvl.fyi.nix @@ -0,0 +1,24 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."auth.tvl.fyi" = { + serverName = "auth.tvl.fyi"; + enableACME = true; + forceSSL = true; + + extraConfig = '' + location / { + proxy_pass http://localhost:${config.services.keycloak.httpPort}; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Host $host; + } + ''; + }; + }; +} -- cgit 1.4.1