This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pysamlsp is a Python library for implementing a Service Provider within a SAML2.0 SSO environment.

This package is under active development but is currently incomplete. Please don’t try to use it.

Requirements

Python packages

  • python-setuptools
  • python 2.7
  • lxml

and for tests:

  • nose
  • expecter
  • dingus

Non-Python packages

  • xmlsec1
  • openssl (though xmlsec1 may be built with GnuTLS, Libgcrypt, or NSS)
  • libxml2
  • libxslt

Installation

At this point in development, I have not uploaded to Pypi. Once I have, installation will be as easy as:

pip install pysqlsp

In the meantime you can clone this repository and run:

python setup.py install

Usage

Initialize the class with a configuration dictionary:

sp_config = dict( ... )

The configuration dictionary may have the following entries:

  • ‘assertion_consumer_service_url’: The URL of the SSO provider.
  • ‘issuer’: A unique identifier for the service provider; probably should match the entityID attribute of the SP metadata.
  • ‘private_key’: A path for the private key PEM file, required for signing AuthnRequests.
  • ‘sign_authnrequests’: True / False flag to indicate whether AuthnRequests should be signed.
  • ‘certificate’: A path for the certificate file against which a SAMLResponse signature can be verified.

Create a redirect URL with the SAMLRequest query parameter:

sp = Pysamlsp(sp_config)
redirect_url = sp.redirect_for_idp()

The identity provider will post to the address specified in the service providers metadata.xml. The posted field “SAMLResponse” will contain a (base64encoded, gzip’d) XML response:

saml_response = query['SAMLResponse']
if sp.idp_response_is_valid(saml_response):
  ...

Signed AuthnRequests

If you are signing your AuthnRequests, you’ll need an RSA private key. Here is a procedure for creating the keys using openssl.

Create a private key, good for 10 years:

openssl req -x509 -days 3650 -newkey rsa:1024 -keyout saml_key_pw.pem -out saml.crt

Remove the passphrase from your new key. This library does not currently support keys with passphrases:

openssl rsa -in saml_key_pw.pem -out saml_key.pem

Create a public key from the private key. You’ll need this for metadata:

openssl rsa -in saml_key.pem -pubout > saml.pub
Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pysamlsp-0.1.4.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source May 7, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting