{"id":21161926,"url":"https://github.com/princetonuniversity/pywsse","last_synced_at":"2025-10-13T21:39:52.199Z","repository":{"id":57458593,"uuid":"66942936","full_name":"PrincetonUniversity/pywsse","owner":"PrincetonUniversity","description":"WSSE authentication implementations for various server backends/clients.","archived":false,"fork":false,"pushed_at":"2018-05-01T23:56:01.000Z","size":95,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-13T21:39:51.470Z","etag":null,"topics":["authentication","django","python","wsse"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pywsse/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrincetonUniversity.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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":"2016-08-30T13:26:53.000Z","updated_at":"2020-02-15T22:19:30.000Z","dependencies_parsed_at":"2022-09-09T22:51:51.163Z","dependency_job_id":null,"html_url":"https://github.com/PrincetonUniversity/pywsse","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PrincetonUniversity/pywsse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2Fpywsse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2Fpywsse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2Fpywsse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2Fpywsse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrincetonUniversity","download_url":"https://codeload.github.com/PrincetonUniversity/pywsse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2Fpywsse/sbom","scorecard":{"id":112159,"data":{"date":"2025-08-11","repo":{"name":"github.com/PrincetonUniversity/pywsse","commit":"1df59b57a5f00193b17e52df5e7fb7cd2c1a9261"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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: GNU Lesser General Public License v3.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":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"}}]},"last_synced_at":"2025-08-15T12:32:37.475Z","repository_id":57458593,"created_at":"2025-08-15T12:32:37.475Z","updated_at":"2025-08-15T12:32:37.475Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017048,"owners_count":26085951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["authentication","django","python","wsse"],"created_at":"2024-11-20T13:19:01.841Z","updated_at":"2025-10-13T21:39:52.144Z","avatar_url":"https://github.com/PrincetonUniversity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pywsse\n-------\n\n.. image:: https://circleci.com/gh/PrincetonUniversity/pywsse.svg?style=svg\n    :target: https://circleci.com/gh/PrincetonUniversity/pywsse\n\n.. image:: https://badge.fury.io/py/pywsse.svg\n    :target: https://badge.fury.io/py/pywsse\n\nAuthors: Rushy Panchal, Naphat Sanguansin, Adam Libresco, Jérémie Lumbroso.\n\nIntroduction\n============\n\n**pywsse** is an all-encompassing package to meet various needs for WSSE\nusage - both as an authentication backend (for various frameworks) and as a\nplug-and-play authentication mechanism for clients.\n\nThe motivation for this package came after dealing with various ambiguities\nin the WSSE protocol - some servers require specific digest algorithms and\nbase64-encode different parts of the token. By utilizing a single library, you\ncan be assured that there the token is generated and verified in the same way\nby both client and server.\n\nFrameworks/Package Support\n==========================\n\nPython versions 2.7, 3.4, 3.5, and 3.6 are supported.\n\nThe following backend frameworks are currently supported:\n\n* `Django REST Framework`_ (versions 3.5 onwards with Django 1.11 onwards)\n\nIn addition, the following client packages are supported:\n\n* `requests`_\n* `coreapi`_\n\nDjango REST Framework\n^^^^^^^^^^^^^^^^^^^^^\n\nTo utilize the Django REST Framework plugin, install the *Django* plugin to\n:code:`settings.INSTALLED_APPS`:\n\n.. code:: python\n\n  INSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.staticfiles',\n    'django.contrib.admin',\n\n    'rest_framework',\n\n    'wsse.server.django.wsse',\n    )\n\nIn addition, add the authentication backend\n(:code:`wsse.server.drf.authentication.WSSEAuthentication`)\nto :code:`settings.REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES']`:\n\n.. code:: python\n\n  REST_FRAMEWORK = {\n    'DEFAULT_AUTHENTICATION_CLASSES': (\n      'rest_framework.authentication.SessionAuthentication',\n      'wsse.server.drf.authentication.WSSEAuthentication'\n      ),\n    }\n\nAlternatively, you can set it for a subset of your views.\n\nPlease refer to the `Django REST Framework: Authentication Documentation \u003chttp://www.django-rest-framework.org/api-guide/authentication/#setting-the-authentication-scheme\u003e`_ for more information.\n\nFinally, set the :code:`NONCE_STORE` and :code:`NONCE_STORE_ARGS` settings\nfor the **pywsse** package:\n\n.. code:: python\n\n  import wsse\n  wsse.settings.NONCE_STORE = 'wsse.server.django.wsse.store.DjangoNonceStore'\n  wsse.settings.NONCE_STORE_ARGS = []\n\n:note: Make sure to run the migrations after setting the nonce store.\n  Particularly, you must run the migrations for the :code:`wsse` app:\n\n  .. code:: bash\n\n    $ python manage.py migrate wsse\n\nrequests\n^^^^^^^^\n\nThe **requests** plugin is an authentication class that will automatically\nattach the appropriate header to the request.\n\nTo do so, import the :code:`wsse.client.requests.auth.WSSEAuth` class and\nattach it to the request:\n\n.. code:: python\n\n  import requests\n  from wsse.client.requests.auth import WSSEAuth\n\n  response = requests.get('http://localhost:8000/api/',\n    auth = WSSEAuth('username', 'password'))\n\nThe :code:`WSSEAuth` class can be reused as it will generate a new token for\neach request:\n\n.. code:: python\n\n  import requests\n  from wsse.client.requests.auth import WSSEAuth\n\n  auth = WSSEAuth('username', 'password')\n\n  response = requests.get('http://localhost:8000/api/1/', auth = auth)\n  next_response = requests.get('http://localhost:8000/api/2/', auth = auth)\n\ncoreapi\n^^^^^^^\n\nThe **coreapi** plugin is just a pluggable transport that automatically\nattaches the appropriate header before sending the request.\n\nTo make use of this transport, import the\n:code:`wsse.client.coreapi.transport.WSSEAuthenticatedHTTPTransport` class\nand add it to your list of transports to :code:`coreapi.Client`:\n\n.. code:: python\n\n  import coreapi\n  from wsse.client.coreapi.transport import WSSEAuthenticatedHTTPTransport\n\n  wsse_transport = WSSEAuthenticatedHTTPTransport('username', 'password')\n  client = coreapi.Client(transports = [wsse_transport])\n\n  schema = client.get('http://api.example.com')\n\nYou can also pass in any of the arguments or keyword arguments to\n:code:`coreapi.transports.HTTPTransport` *after* the username and password.\n\nDevelopment\n===========\n\nTo run the development version of wsse, clone the repository and install the\ntesting requirements in :code:`requirements.txt`. Then, run the test suite\nusing either :code:`tox` or :code:`detox`:\n\n.. code:: bash\n\n  $ git clone git@github.com:PrincetonUniversity/pywsse.git\n  $ cd pywsse\n  $ virtualenv env\n  $ source env/bin/activate\n  $ pip install -r requirements.txt\n  $ detox\n\n:note:\n\n  :code:`detox` is a parallel version of :code:`tox`. It only runs with Python\n  2.6-2.7 (but it can and will run tests for Python 3.x versions).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincetonuniversity%2Fpywsse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincetonuniversity%2Fpywsse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincetonuniversity%2Fpywsse/lists"}