diff --git a/config/Caddyfile b/config/Caddyfile index 3c79bb1..f84728f 100644 --- a/config/Caddyfile +++ b/config/Caddyfile @@ -1,38 +1,5 @@ { email {env.ACME_EMAIL} - - security { - oauth identity provider generic { - delay_start 3 - realm generic - driver generic - client_id 54ac14e4-4e6b-46ce-a870-01b297421e89 - client_secret 54ac14e4-4e6b-46ce-a870-01b297421e89 - scopes openid email profile - base_auth_url http://localhost - metadata_url http://localhost/.well-known/openid-configuration - - } - - authentication portal docsportal { - crypto default token lifetime 3600 # Seconds until you have to reauthenticate - enable identity provider generic - cookie insedure off - transfrom { - match realm generic - action add role user - } - - } - - authorization policy docspolicy { - set auth url /caddy-security/oauth2/generic - allow roles user - inject headers with claims - } - - } - } housh.dev { @@ -107,18 +74,7 @@ housh.dev { @docs host docs.housh.dev handle @docs { - @auth { - path /caddy-security/* - } - - route @auth { - authenticate with docsportal - } - - route /* { - authorize with docspolicy - reverse_proxy docs:80 - } + reverse_proxy docs:80 } @pocket_id host id.housh.dev