Skip to content

Latest commit

 

History

History
124 lines (105 loc) · 3.95 KB

README.org

File metadata and controls

124 lines (105 loc) · 3.95 KB

#

Introduction

This is an example SAML SP service written using Flask and pysaml2.

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

“`shell $ brew install libffi libxmlsec1 “`

RHEL

“`shell $ sudo yum install libffi-devel xmlsec1 xmlsec1-openssl “`

Installation

“`shell $ virtualenv venv $ source venv/bin/activate $ pip install -r requirements.txt “`

Running

“`shell $ python app.py “`

Testing

The fastest way to test this example SAML SP is to use the saml.oktadev.com service.

Here is how:

  1. Edit the “app.py” file and uncomment the line in the “test” line in “metadata_url_for” dictionary. “`shell $ $EDITOR app.py “`

    Change this line:

    “`shell

    To this:

    “`shell ‘test’: ‘http://idp.oktadev.com/metadata’, “`
  2. Start the example SAML SP “`shell $ python app.py “`
  3. Start ngrok on the port that the example SAML SP is running on. By default, the example SAML SP runs on TCP 5000. “`shell $ ngrok http 5000 “`

    You will need to install ngrok if you haven’t already.

    Here is what it should look like:

    ./docs/_static/ngrok.png

  4. Run saml.oktadev.com to test this example SAML SP

Testing the security of your SAML SP

After successfully completing the steps in the “Testing” section above, select the “Run security validation” option to have saml.oktadev.com run an extended series of security tests against your SAML SP.

Contact

Updates or corrections to this document are very welcome. Feel free to send pull requests with suggestions.

Additionally, comments or questions can be sent to: developers@okta.com