{"id":21934378,"url":"https://github.com/proofrock/caddy_knockknock","last_synced_at":"2025-10-27T23:37:00.806Z","repository":{"id":264202662,"uuid":"892681248","full_name":"proofrock/caddy_knockknock","owner":"proofrock","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-10T16:21:46.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T13:42:32.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proofrock.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}},"created_at":"2024-11-22T15:15:32.000Z","updated_at":"2024-12-10T16:21:42.000Z","dependencies_parsed_at":"2025-01-27T13:11:19.408Z","dependency_job_id":"f0f2b403-048a-417f-828f-e5e1e80b935c","html_url":"https://github.com/proofrock/caddy_knockknock","commit_stats":null,"previous_names":["proofrock/caddy_knockknock"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/proofrock/caddy_knockknock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Fcaddy_knockknock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Fcaddy_knockknock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Fcaddy_knockknock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Fcaddy_knockknock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proofrock","download_url":"https://codeload.github.com/proofrock/caddy_knockknock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proofrock%2Fcaddy_knockknock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281361402,"owners_count":26487881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-29T00:15:40.430Z","updated_at":"2025-10-27T23:37:00.789Z","avatar_url":"https://github.com/proofrock.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caddy Knock Knock\n\nA *simple enough but secure for someone* auth schema for caddy reverse proxies.\n\nBasically, you can forbid access to services until a particular, secret parameter is added to the service's URL. Then a session cookie authorizes the access until the tab/browser is closed.\n\nYou must be aware that this secret parameter is **equivalent to a token and must be protected as a secret**. Don't create a bookmark in the browser. Keep it safe.\n\nAnd yes, in the future I will add a timeout, not just \"forever\". But it's a good POC for now.\n\n## Building\n\n```bash\nxcaddy build --with github.com/proofrock/caddy_knockknock@v0.1.3\n```\n\n## Configuration\n\nFirst of all, decide a key and hash it with argon2, for example using [this site](https://argon2.online) (it doesn't seem to send your key over the internet at the time of writing, but check yourself!)\n\n\u003e Example:\u003cbr/\u003e\n\u003e key: abcdef\u003cbr/\u003e\n\u003e hash: $argon2id$v=19$m=16,t=2,p=1$Y2lhb2dlcm0$llGztGLqY/nSR2ax5vCtIg\n\nThen, suppose you have a site to protect in caddy:\n\n\u003e Example\u003cbr/\u003e\u003chttps://protected.example.com\u003e\n\nYou add a parameter `kkkey` with the secret:\n\n\u003e Example:\u003cbr/\u003e\u003chttps://protected.example.com?kkkey=abcdef\u003e\n\nWhen you do so, your session will be enabled for \u003chttps://protected.example.com\u003e.\n\nThis is the corresponding `Caddyfile`:\n\n```caddyfile\n{\n order caddy_knockknock first\n}\n\nprotected.example.com {\n  caddy_knockknock {\n    key_hash \"$argon2id$v=19$m=16,t=2,p=1$Y2lhb2dlcm0$llGztGLqY/nSR2ax5vCtIg\"\n  }\n  respond \"Authorized!\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofrock%2Fcaddy_knockknock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproofrock%2Fcaddy_knockknock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproofrock%2Fcaddy_knockknock/lists"}