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 software using this library. Forget those complicated libraries and use the open source library provided and supported by OneLogin Inc.

This version supports Python3, There is a separate version that only support Python2: python-saml (https://pypi.python.org/pypi/python-saml)

Warning!

Update python3-saml to >= 1.2.1, 1.2.0 had a bug on signature validation process (when using wantAssertionsSigned and wantMessagesSigned). [CVE-2016-1000251](https://github.com/distributedweaknessfiling/DWF-Database-Artifacts/blob/master/DWF/2016/1000251/CVE-2016-1000251.json)

1.2.0 version includes a security patch that contains extra validations that will prevent signature wrapping attacks.

python3-saml < v1.2.0 is vulnerable and allows signature wrapping!

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 // python 3.3

  • xmlsec Python bindings for the XML Security Library. library (depends on python-dev libxml2-dev libxmlsec1-dev)

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

Review the setup.py file to know the version of the library that python3-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 python3-saml package at https://pypi.python.org/pypi/python3-saml

You can install it executing:

pip install python3-saml

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

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

python3-saml-1.2.3.tar.gz (56.1 kB view details)

Uploaded Source

Built Distributions

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

python3_saml-1.2.3-py3-none-any.whl (69.2 kB view details)

Uploaded Python 3

python3_saml-1.2.3-py2.7.egg (127.0 kB view details)

Uploaded Egg

python3_saml-1.2.3-py2-none-any.whl (69.2 kB view details)

Uploaded Python 2

File details

Details for the file python3-saml-1.2.3.tar.gz.

File metadata

  • Download URL: python3-saml-1.2.3.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python3-saml-1.2.3.tar.gz
Algorithm Hash digest
SHA256 08ca078d3ba52c5f0035791a0e15737eb0f7e527284ea5a02421b55f405b7c7a
MD5 06adc2a58566ec71d0b305cbb4e89729
BLAKE2b-256 76ad913fd2f80e8a0b7dfca29aaa1712040c1c13b0f7b74ee01985df49c68024

See more details on using hashes here.

File details

Details for the file python3_saml-1.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_saml-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3960e310cbc6e39a9af65c97def6612de56273d55ec81158ddcf33a91ca3e09c
MD5 1f54da7b3eb1869adaecbd45904bcfec
BLAKE2b-256 011c5e288a5f4b6ddbd1a34eeef3a96d6e1cd26f575dc5c33944a78fc7d8e065

See more details on using hashes here.

File details

Details for the file python3_saml-1.2.3-py2.7.egg.

File metadata

File hashes

Hashes for python3_saml-1.2.3-py2.7.egg
Algorithm Hash digest
SHA256 eb4e80e0b9eb6f1d86a36c735cb1bfa7a4632b1fe197594818bac365a941932f
MD5 abfe35d50b314e490bd82c89827a9dbc
BLAKE2b-256 44668f46c044e550ad2269c830684520a8050590249b65fbdea8ae3b11e1ec10

See more details on using hashes here.

File details

Details for the file python3_saml-1.2.3-py2-none-any.whl.

File metadata

File hashes

Hashes for python3_saml-1.2.3-py2-none-any.whl
Algorithm Hash digest
SHA256 01dd43709764260d7c465ad9c63ec2914f9dcba4016bcbe8c0e7cac0d7a5be6e
MD5 1ffa9397def36f205373fe8658929daa
BLAKE2b-256 40e522f42ef340344b9e294bc748150e96dd439f83efc419b4d3445f5d6b6ae1

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