Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Caddy server with caddy-security extension enabled

License

NotificationsYou must be signed in to change notification settings

jamowei/caddy-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image containingcaddy andcaddy-security.

Use Github OIDC

Tutorialand resultingCaddyfile (replacemydomain.com with your domain):

{  order authenticate before respond  order authorize before basicauth  security {    oauth identity provider github {env.GITHUB_CLIENT_ID} {env.GITHUB_CLIENT_SECRET}    authentication portal auth {      crypto default token lifetime 3600      cookie domain mydomain.com      enable identity provider github      ui {        links {          "My Identity" "/whoami" icon "las la-user"        }      }      transform user {        match realm github        action add role authp/user      }      transform user {        match realm github        match sub github.com/<username>        action add role authp/admin      }    }    authorization policy user {      set auth url https://auth.mydomain.com/oauth2/github      allow roles authp/user      validate bearer header      inject headers with claims    }    authorization policy admin {      set auth url https://auth.mydomain.com/oauth2/github      allow roles authp/admin      validate bearer header      inject headers with claims    }  }}auth.mydomain.com {  authenticate with auth}mydomain.com {  authorize with userreverse_proxy user:8080}admin.mydomain.com {  authorize with admin  reverse_proxy admin:8080}

[8]ページ先頭

©2009-2025 Movatter.jp