{"id":23447630,"url":"https://github.com/jamowei/caddy-security","last_synced_at":"2026-03-10T23:23:49.383Z","repository":{"id":268944378,"uuid":"905893808","full_name":"jamowei/caddy-security","owner":"jamowei","description":"Caddy server with caddy-security extension enabled","archived":false,"fork":false,"pushed_at":"2025-12-19T14:25:17.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T18:57:15.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://caddyserver.com","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamowei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-19T18:28:11.000Z","updated_at":"2025-12-19T14:21:24.000Z","dependencies_parsed_at":"2024-12-19T21:31:03.003Z","dependency_job_id":"6b91b187-6507-484f-81a7-fb0926d9a664","html_url":"https://github.com/jamowei/caddy-security","commit_stats":null,"previous_names":["jamowei/caddy-security"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jamowei/caddy-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamowei%2Fcaddy-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamowei%2Fcaddy-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamowei%2Fcaddy-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamowei%2Fcaddy-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamowei","download_url":"https://codeload.github.com/jamowei/caddy-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamowei%2Fcaddy-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30361698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T21:18:39.383Z","updated_at":"2026-03-10T23:23:49.365Z","avatar_url":"https://github.com/jamowei.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caddy Security\n\nDocker image containing [caddy](https://github.com/caddyserver/caddy) and [caddy-security](https://github.com/greenpau/caddy-security).\n\n# Use Github OIDC\n\n[Tutorial](https://docs.authcrunch.com/docs/authenticate/oauth/backend-oauth2-0007-github) \nand resulting `Caddyfile` (replace `mydomain.com` with your domain):\n```\n{\n  order authenticate before respond\n  order authorize before basicauth\n\n  security {\n    oauth identity provider github {env.GITHUB_CLIENT_ID} {env.GITHUB_CLIENT_SECRET}\n\n    authentication portal auth {\n      crypto default token lifetime 3600\n      cookie domain mydomain.com\n      enable identity provider github\n      ui {\n        links {\n          \"My Identity\" \"/whoami\" icon \"las la-user\"\n        }\n      }\n\n      transform user {\n        match realm github\n        action add role authp/user\n      }\n\n      transform user {\n        match realm github\n        match sub github.com/\u003cusername\u003e\n        action add role authp/admin\n      }\n    }\n\n    authorization policy user {\n      set auth url https://auth.mydomain.com/oauth2/github\n      allow roles authp/user\n      validate bearer header\n      inject headers with claims\n    }\n\n    authorization policy admin {\n      set auth url https://auth.mydomain.com/oauth2/github\n      allow roles authp/admin\n      validate bearer header\n      inject headers with claims\n    }\n  }\n}\n\nauth.mydomain.com {\n  authenticate with auth\n}\n\nmydomain.com {\n  authorize with user\n\treverse_proxy user:8080\n}\n\nadmin.mydomain.com {\n  authorize with admin\n  reverse_proxy admin:8080\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamowei%2Fcaddy-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamowei%2Fcaddy-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamowei%2Fcaddy-security/lists"}