{"id":37071405,"url":"https://github.com/mgurdal/aegis","last_synced_at":"2026-01-14T08:21:47.910Z","repository":{"id":34764414,"uuid":"159893688","full_name":"mgurdal/aegis","owner":"mgurdal","description":"Authentication and permission scoping for aiohttp","archived":false,"fork":false,"pushed_at":"2024-12-08T17:54:17.000Z","size":3425,"stargazers_count":12,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-21T23:55:38.173Z","etag":null,"topics":["aiohttp","authentication","basic-authentication","jwt","jwt-authentication","python3"],"latest_commit_sha":null,"homepage":"https://mgurdal.github.io/aegis/","language":"Python","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/mgurdal.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T00:36:12.000Z","updated_at":"2025-12-09T22:18:16.000Z","dependencies_parsed_at":"2023-10-15T11:07:48.087Z","dependency_job_id":"6e4cb530-652a-462d-ac5d-74c6d49bb3b3","html_url":"https://github.com/mgurdal/aegis","commit_stats":{"total_commits":285,"total_committers":5,"mean_commits":57.0,"dds":0.4421052631578948,"last_synced_commit":"c57d1b4c5cbd9acc9a8a0d321d108319d8e0ece4"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mgurdal/aegis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgurdal%2Faegis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgurdal%2Faegis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgurdal%2Faegis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgurdal%2Faegis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgurdal","download_url":"https://codeload.github.com/mgurdal/aegis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgurdal%2Faegis/sbom","scorecard":{"id":639638,"data":{"date":"2025-08-11","repo":{"name":"github.com/mgurdal/aegis","commit":"c57d1b4c5cbd9acc9a8a0d321d108319d8e0ece4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"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":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"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":"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":"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":"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":"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: Apache License 2.0: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 30 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"}},{"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: PYSEC-2024-24 / GHSA-5h86-8mv2-jq9f","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"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T10:20:05.084Z","repository_id":34764414,"created_at":"2025-08-21T10:20:05.084Z","updated_at":"2025-08-21T10:20:05.084Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"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","authentication","basic-authentication","jwt","jwt-authentication","python3"],"created_at":"2026-01-14T08:21:47.196Z","updated_at":"2026-01-14T08:21:47.897Z","avatar_url":"https://github.com/mgurdal.png","language":"Python","readme":"aegis\n=============\n\n|Python 3.6| |pypi| |travis-badge| |coveralls| |codefactor grade| |code-style| |downloads|\n\n.. |Python 3.6| image:: https://img.shields.io/badge/python-3.6-brightgreen.svg\n   :target: https://www.python.org/downloads/release/python-360\n.. |codefactor grade| image:: https://www.codefactor.io/repository/github/mgurdal/aegis/badge\n   :target: https://www.codefactor.io/repository/github/mgurdal/aegis/badge\n.. |travis-badge| image:: https://travis-ci.org/mgurdal/aegis.svg?branch=master\n   :target: https://travis-ci.org/mgurdal/aegis\n.. |coveralls| image:: https://coveralls.io/repos/github/mgurdal/aegis/badge.svg?branch=master\n   :target: https://coveralls.io/github/mgurdal/aegis?branch=master\n.. |pypi| image:: https://badge.fury.io/py/aegis.svg\n    :target: https://badge.fury.io/py/aegis\n.. |downloads| image:: https://img.shields.io/pypi/dm/aegis.svg\n    :target: https://pypi.python.org/pypi/aegis\n.. |code-style| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/python/black\n\n**aegis** allows to **protect endpoints** and also provides\n**authentication scoping**.\n\n--------------\n\nInstallation\n~~~~~~~~~~~~\n.. code:: bash\n\n     pip install aegis\n\n\nSimple Example\n~~~~~~~~~~~~~~\n\n.. code:: python\n\n   from aiohttp import web\n   from aegis import login_required, JWTAuth\n\n\n   class JWTAuthenticator(JWTAuth):\n       jwt_secret = \"\u003csecret\u003e\"\n\n       async def authenticate(self, request: web.Request) -\u003e dict:\n           db = request.app[\"db\"]\n           credentials = await request.json()\n           id_ = credentials[\"id\"]\n           user = db.get(id_)\n           return user\n\n\n   @login_required\n   async def protected(request):\n       return web.json_response({'hello': 'user'})\n\n\n   def create_app():\n       app = web.Application()\n       app[\"db\"] = {\n           5: {\n               \"name\": \"test\"\n           }\n       }\n       app.router.add_get('/protected', protected)\n\n       JWTAuthenticator.setup(app)\n\n       return app\n\n\n   if __name__ == \"__main__\":\n       app = create_app()\n       web.run_app(app)\n\n\nGet access token\n\n.. code:: bash\n\n   curl -X POST http://0.0.0.0:8080/auth -d '{\"id\": 5}'\n\n\n   {\"access_token\": \"\u003caccess_token\u003e\"}\n\nGet user\n\n.. code:: bash\n\n   curl http://0.0.0.0:8080/protected -H 'Authorization: Bearer \u003caccess_token\u003e'\n\n\n   {'hello': 'user'}\n\n\n\nTest\n~~~~~~~~~~~~~~\n\n.. code:: bash\n\n    git clone https://github.com/mgurdal/aegis.git\n    cd aegis\n    make cov\n\nRequirements\n~~~~~~~~~~~~\n\n- Python \u003e= 3.6\n- aiohttp\n- PyJWT\n\nLicense\n~~~~~~~~\n\n``aegis`` is offered under the Apache 2 license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgurdal%2Faegis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgurdal%2Faegis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgurdal%2Faegis/lists"}