Skip to main content

Onelogin Python Toolkit. Add SAML support to your Python software using this library

Project description

Add SAML support to your Python softwares using this library. Forget those complicated libraries and use that open source library provided and supported by OneLogin Inc.

This version supports Python2, exists an alternative version compatible with Python 3: python3-saml (https://github.com/onelogin/python3-saml)

Warning!

Update python-saml to 2.2.0, this version includes a security patch that contains extra validations that will prevent signature wrapping attacks. CVE-2016-1000252 (https://github.com/distributedweaknessfiling/DWF-Database-Artifacts/blob/master/DWF/2016/1000252/CVE-2016-1000252.json)

python-saml < v2.2.0 is vulnerable and allows signature wrapping!

Security Guidelines

If you believe you have discovered a security vulnerability in this toolkit, please report it at https://www.onelogin.com/security with a description. We follow responsible disclosure guidelines, and will work with you to quickly find a resolution

Why add SAML support to my software?

SAML is an XML-based standard for web browser single sign-on and is defined by the OASIS Security Services Technical Committee. The standard has been around since 2002, but lately it is becoming popular due its advantages:

  • Usability - One-click access from portals or intranets, deep linking, password elimination and automatically renewing sessions make life easier for the user.

  • Security - Based on strong digital signatures for authentication and integrity, SAML is a secure single sign-on protocol that the largest and most security conscious enterprises in the world rely on.

  • Speed - SAML is fast. One browser redirect is all it takes to securely sign a user into an application.

  • Phishing Prevention - If you don’t have a password for an app, you can’t be tricked into entering it on a fake login page.

  • IT Friendly - SAML simplifies life for IT because it centralizes authentication, provides greater visibility and makes directory integration easier.

  • Opportunity - B2B cloud vendor should support SAML to facilitate the integration of their product.

General description

OneLogin’s SAML Python toolkit let you build a SP (Service Provider) over your Python application and connect it to any IdP (Identity Provider).

Supports:

  • SSO and SLO (SP-Initiated and IdP-Initiated).

  • Assertion and nameId encryption.

  • Assertion signature.

  • Message signature: AuthNRequest, LogoutRequest, LogoutResponses.

  • Enable an Assertion Consumer Service endpoint.

  • Enable a Single Logout Service endpoint.

  • Publish the SP metadata (which can be signed).

Key features:

  • saml2int - Implements the SAML 2.0 Web Browser SSO Profile.

  • Session-less - Forget those common conflicts between the SP and the final app, the toolkit delegate session in the final app.

  • Easy to use - Programmer will be allowed to code high-level and low-level programming, 2 easy to use APIs are available.

  • Tested - Thoroughly tested.

  • Popular - OneLogin’s customers use it. Add easy support to your django/flask web projects.

Installation

Dependences

  • python 2.7

  • dm.xmlsec.binding Cython/lxml based binding for the XML security library (depends on python-dev libxml2-dev libxmlsec1-dev)

  • isodate An ISO 8601 date/time/duration parser and formater

  • defusedxml XML bomb protection for Python stdlib modules

Review the setup.py file to know the version of the library that python-saml is using

Code

Option 1. Download from github

The toolkit is hosted on github. You can download it from:

Copy the core of the library (src/onelogin/saml2 folder) and merge the setup.py inside the python application. (each application has its structure so take your time to locate the Python SAML toolkit in the best place).

Option 2. Download from pypi

The library is hosted in pypi, you can find the python-saml package at https://pypi.python.org/pypi/python-saml

You can install it executing:

pip install python-saml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-saml-2.2.2.tar.gz (56.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_saml-2.2.2-py2-none-any.whl (68.6 kB view details)

Uploaded Python 2

File details

Details for the file python-saml-2.2.2.tar.gz.

File metadata

  • Download URL: python-saml-2.2.2.tar.gz
  • Upload date:
  • Size: 56.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-saml-2.2.2.tar.gz
Algorithm Hash digest
SHA256 3c29d56c9abdde5ce35b077f550d108cdbde234c3132f11bff1798e579e9cfeb
MD5 053b5b2bbbcb8d53b63b960b2e7d279b
BLAKE2b-256 0c4ab9abee3c4884e5089923e04a8893a01524c9647fe076cc35efc50c5f2d11

See more details on using hashes here.

File details

Details for the file python_saml-2.2.2-py2-none-any.whl.

File metadata

File hashes

Hashes for python_saml-2.2.2-py2-none-any.whl
Algorithm Hash digest
SHA256 1f67f9dbec88bc04db8e982b2c82fd8756bd0a4071b3b4eff1cfb4fb0a2b1ffc
MD5 1a0ca1746ef88b0cb07f7796e9dacd89
BLAKE2b-256 8aa7bf2d61c487ba4e6bb7fabc862dbce5d124765e0868a36577a83fa9471f7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page