From 5ce67a697b5c2883346f147f514a1179cc62e3f6 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 11 Apr 2025 08:57:05 -0400 Subject: [PATCH] feat: Removes caddy security from this image and to primary proxy. --- Caddyfile | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/Caddyfile b/Caddyfile index cacb74a..dcc4e80 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,53 +1,4 @@ -{ - # Port to listen on - http_port 80 - - # Configure caddy-security. - order authenticate before respond - - security { - oauth identity provider generic { - delay_start 3 - realm generic - driver generic - client_id {env.OAUTH_CLIENT_ID} - client_secret {env.OAUTH_CLIENT_SECRET} - scopes openid email profile - base_auth_url https://id.housh.dev - metadata_url https://id.housh.dev/.well-known/openid-configuration - } - - authentication portal myportal { - crypto default token lifetime 3600 # Seconds until you have to re-authenticate - enable identity provider generic - cookie insecure on # Set to "on" if you're not using HTTPS - - transform user { - match realm generic - action add role user - } - } - - authorization policy mypolicy { - set auth url /caddy-security/oauth2/generic - allow roles user - inject headers with claims - } - } -} - http://localhost { - @auth { - path /caddy-security/* - } - - route @auth { - authenticate with myportal - } - - route /* { - authorize with mypolicy root * /app file_server - } }