{"id":34108680,"url":"https://github.com/bdalpe/django-vouch-proxy-auth","last_synced_at":"2026-04-08T17:31:25.665Z","repository":{"id":55330093,"uuid":"326451334","full_name":"bdalpe/django-vouch-proxy-auth","owner":"bdalpe","description":"Django Middleware to enable SSO using Vouch Proxy","archived":false,"fork":false,"pushed_at":"2021-01-11T19:09:21.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-04T15:36:15.686Z","etag":null,"topics":["django","django-middleware","sso","vouch-proxy"],"latest_commit_sha":null,"homepage":"","language":"Python","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/bdalpe.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-03T16:31:52.000Z","updated_at":"2022-05-15T02:05:00.000Z","dependencies_parsed_at":"2022-08-16T07:50:51.648Z","dependency_job_id":null,"html_url":"https://github.com/bdalpe/django-vouch-proxy-auth","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bdalpe/django-vouch-proxy-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdalpe%2Fdjango-vouch-proxy-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdalpe%2Fdjango-vouch-proxy-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdalpe%2Fdjango-vouch-proxy-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdalpe%2Fdjango-vouch-proxy-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdalpe","download_url":"https://codeload.github.com/bdalpe/django-vouch-proxy-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdalpe%2Fdjango-vouch-proxy-auth/sbom","scorecard":{"id":228957,"data":{"date":"2025-08-11","repo":{"name":"github.com/bdalpe/django-vouch-proxy-auth","commit":"798a7a0f03fe64468b9e7406a96bec6f10b88d1e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit_tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/unit_tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit_tests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/bdalpe/django-vouch-proxy-auth/unit_tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pypi.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/pypi.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/unit_tests.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/unit_tests.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/unit_tests.yml:35","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/unit_tests.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-202 / GHSA-ffqj-6fqr-9h24","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"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-17T04:27:25.473Z","repository_id":55330093,"created_at":"2025-08-17T04:27:25.473Z","updated_at":"2025-08-17T04:27:25.473Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31566718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["django","django-middleware","sso","vouch-proxy"],"created_at":"2025-12-14T18:20:52.574Z","updated_at":"2026-04-08T17:31:25.649Z","avatar_url":"https://github.com/bdalpe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-vouch-proxy-auth\nDjango Middleware enabling the use of the [Vouch Proxy](https://github.com/vouch/vouch-proxy) cookie for single sign-on.\n\nThis package subclasses Django's `RemoteUserMiddleware` and `RemoteUserBackend`.\n\n## How it Works\n\n1. The middleware checks for the presence of the Vouch Proxy cookie.\n2. If the cookie exists, it attempts to load a previous validation from Django cache.\n3. If the validation result is not in the Cache, send the contents of the `VouchCookie` cookie to the Vouch Proxy `/validate` endpoint.\n4. If the validation is successful, decode and decompress the cookie and extract the username from the JWT payload.\n5. Save the username in cache with a short expiration and use the SHA256 sum of the `VouchCookie` as the key. (i.e. `VouchCookie_` + `sha256sum(VouchCookie)`)\n\n## Installation and Usage \n\n`pip install django-vouch-proxy-auth` or add `django-vouch-proxy-auth` to your requirements file.\n\nTo enable the middleware, add `django_vouch_proxy_auth.middleware.VouchProxyMiddleware` after Django's `AuthenticationMiddleware`.\n\n```python\nMIDDLEWARE = [\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    ...\n    'django_vouch_proxy_auth.middleware.VouchProxyMiddleware'\n]\n```\n\nThis middleware is also dependent on the `VouchProxyUserBackend` Authentication Backend. Add anywhere in your `AUTHENTICATION_BACKENDS`.\n\n```python\nAUTHENTICATION_BACKENDS = (\n    'django_vouch_proxy_auth.backends.VouchProxyUserBackend'\n)\n```\n\nFinally, you MUST tell the middleware where the `/validate` endpoint is. Add the `VOUCH_PROXY_VALIDATE_ENDPOINT` to your Django `settings.py` file.\n\n```python\nVOUCH_PROXY_VALIDATE_ENDPOINT = 'https://login.avacado.lol/validate'\n```\n\n## Settings\n### `VOUCH_PROXY_VALIDATE_ENDPOINT`\nLocation of the Vouch Proxy validation endpoint. You MUST provide this value, or the Middleware will raise an `ImproperlyConfigured` exception.\n\n### `VOUCH_PROXY_VERIFY_SSL`\nDefault: `True`\n\nSet this to False to ignore verification of the Vouch Proxy SSL certificate.\n\n### `VOUCH_PROXY_COOKIE_NAME`\nDefault: `VouchCookie`\n\nChange this setting if you are using a custom Vouch Proxy cookie name.\n\n### `VOUCH_PROXY_CACHE_TIMEOUT`\nDefault: `300` (seconds)\n\nThis middleware will cache the username if a successful response from the `/validate` query is returned. To reduce the load on Vouch Proxy, the middleware will only validate the cookie every 300 seconds (5 minutes) by default.\n\nSet this value to a positive integer if you want to change the cache timeout.\n\nSet this to `0` if you want Django to query the Vouch Proxy `/validate` endpoint on every request.\n\n### `VOUCH_PROXY_CACHE_PREFIX`\nDefault: defaults to the configured value for `VOUCH_PROXY_COOKIE_NAME` plus underscore (i.e. `VouchCookie_`)\n\nSet this value if you want to change the prefix for the CacheKey.\n\n### `VOUCH_PROXY_CACHE_BACKEND`\nDefault: `default`\n\nSet this value if you want to store cached results in a different cache.\n\n### `VOUCH_PROXY_DISABLED_PATHS`\nDefault: `[]`\n\nSet this value (as an array) to full paths that you want to disable the middleware. \n\nFor example, if you have other middleware that causes conflict:\n```python\nVOUCH_PROXY_DISABLED_PATHS = ['/oidc/authenticate/', '/oidc/callback/']\n```\n\n### `VOUCH_PROXY_CREATE_UNKNOWN_USER`\nDefault: `True`\n\nSet this to False if you do not want the middleware to automatically create a user entry on first login. You must use the `VouchProxyUserBackend` for this setting to be honored.\n\n### `VOUCH_PROXY_FORCE_LOGOUT_IF_NO_COOKIE`\nDefault: `False`\n\nSet this to `True` if you want Django to logout the user if the Vouch Cookie is not present.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdalpe%2Fdjango-vouch-proxy-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdalpe%2Fdjango-vouch-proxy-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdalpe%2Fdjango-vouch-proxy-auth/lists"}