Introduction

This is an example for italian Spid SAML Service Provider service written using Flask and pysaml2. Only for test purpose.

Requirements

You will also need a development environment capable of compiling Python packages and the "libffi" and "libxmlsec1" development libraries, which are needed by PySAML2.

Instructions for installing these development libraries will differ depending on your host operating system.

Mac OS X

$ brew install libffi libxmlsec1

Ubuntu

$ sudo apt install libffi-devel xmlsec1 xmlsec1-openssl

Installation

$ virtualenv venv
$ . venv/bin/activate
$ pip install -r requirements.txt 

Configuration

$ openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout sp.key -out sp.crt
$ cp config.yaml.example config.yaml
$  '0.0.0.0 spid-sp-test' >> /etc/hosts

Running

$ python app.py 

Testing

The fastest way to test this example SAML SP is to use the spid-testenv2 service.

Here is how:

  1. Configure and Start Idp spid-testenv2

    Configure and install spid-testenv2

  2. Start the example Spid Service Provider

    $ python app.py

Contact

Updates or corrections to this document are very welcome. Feel free

Additionally, comments or questions can be sent to: alessio.gerace@gmail.com

License

LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

Author Information

Alessio Gerace 2018