{"id":22117453,"url":"https://github.com/terma/api-gateway-cloudfront-login","last_synced_at":"2026-04-05T20:33:03.546Z","repository":{"id":57181436,"uuid":"113722909","full_name":"terma/api-gateway-cloudfront-login","owner":"terma","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-19T19:49:26.000Z","size":23,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T23:20:43.832Z","etag":null,"topics":["api-gateway","aws","cloudfront","lambda","nodejs","openid"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/terma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-10T04:29:18.000Z","updated_at":"2018-02-14T07:46:29.000Z","dependencies_parsed_at":"2022-09-26T17:00:53.094Z","dependency_job_id":null,"html_url":"https://github.com/terma/api-gateway-cloudfront-login","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terma/api-gateway-cloudfront-login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terma%2Fapi-gateway-cloudfront-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terma%2Fapi-gateway-cloudfront-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terma%2Fapi-gateway-cloudfront-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terma%2Fapi-gateway-cloudfront-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terma","download_url":"https://codeload.github.com/terma/api-gateway-cloudfront-login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terma%2Fapi-gateway-cloudfront-login/sbom","scorecard":{"id":874412,"data":{"date":"2025-08-11","repo":{"name":"github.com/terma/api-gateway-cloudfront-login","commit":"cf89269a213d40595472a90623d41e579486ad29"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T05:25:32.177Z","repository_id":57181436,"created_at":"2025-08-24T05:25:32.177Z","updated_at":"2025-08-24T05:25:32.177Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31449442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"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":["api-gateway","aws","cloudfront","lambda","nodejs","openid"],"created_at":"2024-12-01T13:34:06.266Z","updated_at":"2026-04-05T20:33:03.517Z","avatar_url":"https://github.com/terma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# api-gateway-cloudfront-login\n\n[![npm version](https://badge.fury.io/js/api-gateway-cloudfront-login.svg)](https://badge.fury.io/js/api-gateway-cloudfront-login)\n[![Build Status](https://travis-ci.org/terma/api-gateway-cloudfront-login.svg?branch=master)](https://travis-ci.org/terma/api-gateway-cloudfront-login)\n[![Coverage Status](https://coveralls.io/repos/github/terma/api-gateway-cloudfront-login/badge.svg?branch=master)](https://coveralls.io/github/terma/api-gateway-cloudfront-login?branch=master)\n\n## How to use\n\n### Add dependency\n\n```npm i api-gateway-cloudfront-login --save```\n\n### Handler for lambda\n\n```Handler: node_modules/api-gateway-cloudfront-login/index.handler```\n\n### Configuration\n\nFor CloudFormation configure properties as env variables [More](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment)\n\n```\nDOMAIN_NAME string\nCOGNITO_IDENTITY_POOL_ID string\nREGION string - optional default 'us-west-2'\nASSUME_ROLE string - optional if specified additional assume provided role and return credentials\nCLOUD_FRONT_KEY_ID string\nCLOUD_FRONT_PRIVATE_KEY string\nOPEN_ID_DISCOVER_URL string\nOPEN_ID_LOGIN string\nOPEN_ID_CLIENT_ID string\nOPEN_ID_LOGIN_URL string\nOPEN_ID_TARGET_URL string\nDEBUG boolean - optional by default false\n```\n\n### Example \n\n```yaml\nType: \"AWS::Lambda::Function\"\nProperties: \n  Code:\n    Code\n  Environment:\n    DOMAIN_NAME: X\n    COGNITO_IDENTITY_POOL_ID: pool-id\n    CLOUD_FRONT_KEY_ID: AAA\n    CLOUD_FRONT_PRIVATE_KEY: BBB\n    OPEN_ID_DISCOVER_URL: X\n    OPEN_ID_LOGIN: X\n    OPEN_ID_CLIENT_ID: X\n    OPEN_ID_LOGIN_URL: X\n    OPEN_ID_TARGET_URL: X\n  FunctionName: MyFunction\n  Handler: node_modules/api-gateway-cloudfront-login/index.handler\n```\n\n## Result\n\nAfter successeful login provide cookies:\n\nCloudFront Signed Cookies [More](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html)\nHttpOnly not accessible by JavaScript\n```\nCloudFront-Policy\nCloudFront-Key-Pair-Id\nCloudFront-Signature\n```\n\nCognito User Credentials:\n```\nAWS-Access-Key-Id\nAWS-Secret-Access-Key\nAWS-Session-Token\n```\n\nAssumed role credentials only if ```ASSUME_ROLE``` specified:\n```\nAssume-AWS-Access-Key-Id\nAssume-AWS-Secret-Access-Key\nAssume-AWS-Session-Token  \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterma%2Fapi-gateway-cloudfront-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterma%2Fapi-gateway-cloudfront-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterma%2Fapi-gateway-cloudfront-login/lists"}