This is an example for italian Spid SAML Service Provider service written using Flask and pysaml2. Only for test purpose.
- Python 3.6+
- Virtualenv
- pip
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.
$ brew install libffi libxmlsec1
$ sudo apt install libffi-devel xmlsec1 xmlsec1-openssl
$ virtualenv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ 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
$ python app.py
The fastest way to test this example SAML SP is to use the spid-testenv2 service.
Here is how:
-
Configure and Start Idp spid-testenv2
-
Start the example Spid Service Provider
$ python app.py
Updates or corrections to this document are very welcome. Feel free
Additionally, comments or questions can be sent to: alessio.gerace@gmail.com
LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
Alessio Gerace 2018