{"id":25146606,"url":"https://github.com/wulfmann/serverless-static-site-password","last_synced_at":"2026-05-03T16:31:36.191Z","repository":{"id":96152094,"uuid":"313741332","full_name":"wulfmann/serverless-static-site-password","owner":"wulfmann","description":"Serverless Static Site Password","archived":false,"fork":false,"pushed_at":"2020-11-18T14:07:16.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T06:34:02.236Z","etag":null,"topics":["aws","cloudfront","jwt","lambda","password","serverless","static-site"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wulfmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-11-17T20:57:01.000Z","updated_at":"2020-11-18T14:15:45.000Z","dependencies_parsed_at":"2023-04-08T05:49:16.319Z","dependency_job_id":null,"html_url":"https://github.com/wulfmann/serverless-static-site-password","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wulfmann/serverless-static-site-password","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fserverless-static-site-password","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fserverless-static-site-password/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fserverless-static-site-password/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fserverless-static-site-password/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wulfmann","download_url":"https://codeload.github.com/wulfmann/serverless-static-site-password/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fserverless-static-site-password/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32577119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["aws","cloudfront","jwt","lambda","password","serverless","static-site"],"created_at":"2025-02-08T20:19:38.564Z","updated_at":"2026-05-03T16:31:36.186Z","avatar_url":"https://github.com/wulfmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Static Site Password\n\nThis repo contains example code for implementing a static site password via AWS lambda@edge and CDK.\n\n## Overview\n\nWhen a request is made to the site, a lambda@edge (Viewer Certificate) is triggered by cloudfront. This lambda checks for the presence of a cookie that contains a signed token. It validates the signature and checks if it is expired. If it's valid, it allows the request. If the token is absent or invalid/expired, the request is redirected to the login page. The login page is configured to send the password to a `/_callback` route. When the lambda is triggered, it checks the request uri to see if it matched `_callback`. If it does, it validates the password and issues a new token. If the password is invalid, the request is blocked. The newly created token is passed back in the aforementioned cookie.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulfmann%2Fserverless-static-site-password","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwulfmann%2Fserverless-static-site-password","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulfmann%2Fserverless-static-site-password/lists"}