{"id":47258326,"url":"https://github.com/bugov/aiohttp-basicauth-middleware","last_synced_at":"2026-03-14T21:56:26.117Z","repository":{"id":45504084,"uuid":"122188893","full_name":"bugov/aiohttp-basicauth-middleware","owner":"bugov","description":"🌍👮 Aiohttp middleware for simple http basic auth protection for some urls","archived":false,"fork":false,"pushed_at":"2025-09-25T02:28:22.000Z","size":32,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T01:28:33.595Z","etag":null,"topics":["aiohttp-middleware","basic-authentication","http","middleware","protection","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-20T11:20:49.000Z","updated_at":"2021-12-10T03:17:11.000Z","dependencies_parsed_at":"2022-07-17T02:00:52.583Z","dependency_job_id":null,"html_url":"https://github.com/bugov/aiohttp-basicauth-middleware","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/bugov/aiohttp-basicauth-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugov%2Faiohttp-basicauth-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugov%2Faiohttp-basicauth-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugov%2Faiohttp-basicauth-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugov%2Faiohttp-basicauth-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugov","download_url":"https://codeload.github.com/bugov/aiohttp-basicauth-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugov%2Faiohttp-basicauth-middleware/sbom","scorecard":{"id":257470,"data":{"date":"2025-08-11","repo":{"name":"github.com/bugov/aiohttp-basicauth-middleware","commit":"483b4013c7a632d15e4df8b17660ede77eb0f930"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 1/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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: The Unlicense: LICENSE: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":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-120 / GHSA-45c4-8wx5-qw6w","Warn: Project is vulnerable to: GHSA-5m98-qgg9-wh84","Warn: Project is vulnerable to: GHSA-7gpw-8wmc-pm8g","Warn: Project is vulnerable to: GHSA-8495-4g3g-x7pr","Warn: Project is vulnerable to: PYSEC-2024-26 / GHSA-8qpw-xqxj-h4r2","Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: PYSEC-2023-246 / GHSA-gfw2-4jvh-wgfg","Warn: Project is vulnerable to: GHSA-pjjw-qhg8-p2p9","Warn: Project is vulnerable to: PYSEC-2023-250 / GHSA-q3qx-c6g2-7pw2","Warn: Project is vulnerable to: PYSEC-2023-251 / GHSA-qvrw-v9rv-5rjx","Warn: Project is vulnerable to: PYSEC-2021-76 / GHSA-v6wp-4m6f-gcjg","Warn: Project is vulnerable to: PYSEC-2023-247 / GHSA-xx9p-xxvh-7g8j","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 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-17T10:00:32.306Z","repository_id":45504084,"created_at":"2025-08-17T10:00:32.307Z","updated_at":"2025-08-17T10:00:32.307Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30519069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"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":["aiohttp-middleware","basic-authentication","http","middleware","protection","python","python3"],"created_at":"2026-03-14T21:56:25.583Z","updated_at":"2026-03-14T21:56:26.109Z","avatar_url":"https://github.com/bugov.png","language":"Python","readme":"# aiohttp-basicauth-middleware\n\n[![Build Status](https://travis-ci.org/bugov/aiohttp-basicauth-middleware.svg?branch=master)](https://travis-ci.org/bugov/aiohttp-basicauth-middleware)\n\nAiohttp middleware for simple http basic\nauth protection for some urls.\n\nWorks with Python ≥ 3.6.\n\nWorks with UTF-8 🖖\n\n## Installation\n\n```python\npip install aiohttp-basicauth-middleware\n```\n\n## Usage\n\n```python\napp = web.Application(loop=loop)\n\napp.router.add_route('GET', '/hello', handler_a)\napp.router.add_route('GET', '/admin/hello', handler_b)\n\napp.middlewares.append(\n   basic_auth_middleware(\n      ('/admin',),\n      {'user': 'password'},\n   )\n)\n```\n\n`basic_auth_middleware` has 3 params:\n\n1. list of protected urls. For example `['/admin']` will match\n   with `/admin/user`, but will not match with `/user/admin`.\n2. auth dict – a dict with pairs: login-password.\n3. strategy (optional) for password comparision. For example you can\n   store hashed password in `auth_dict`. See `aiohttp_basicauth_middleware.strategy.BaseStrategy` and\n   `example.strategy` for more information.\n\nExample with md5 password hashing:\n\n```python\napp = web.Application(loop=loop)\n\napp.router.add_route('GET', '/hello', handler_a)\napp.router.add_route('GET', '/admin/hello', handler_b)\n\napp.middlewares.append(\n    basic_auth_middleware(\n        ('/admin',),\n        {'user': '5f4dcc3b5aa765d61d8327deb882cf99'},\n        lambda x: hashlib.md5(bytes(x, encoding='utf-8')).hexdigest(),\n    )\n)\n```\n\n`/admin/...` will be accessed by the same login+password pair ('user', 'password').\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugov%2Faiohttp-basicauth-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugov%2Faiohttp-basicauth-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugov%2Faiohttp-basicauth-middleware/lists"}