9ff576c566 | 10 years ago | |
---|---|---|
docs/_static | 10 years ago | |
templates | 10 years ago | |
.gitignore | 10 years ago | |
LICENSE | 10 years ago | |
README.md | 10 years ago | |
README.org | 10 years ago | |
app.py | 10 years ago | |
requirements.txt | 10 years ago |
README.md
Introduction
This is an example SAML SP service written using Flask and pysaml2.
Requirements
- Python 2.7+
- Virtualenv
- pip
Installation
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Running
$ python app.py
Testing
The fastest way to test this example SAML SP is to use the saml.oktadev.com service.
Here is how:
-
Edit the "app.py" file and uncomment the line in the "test" line in "metadata_url_for" dictionary.
$ $EDITOR app.py
Change this line:
# 'test': 'http://idp.oktadev.com/metadata',
To this:
'test': 'http://idp.oktadev.com/metadata',
-
Start the example SAML SP
$ python app.py
-
Start ngrok on the port that the example SAML SP is running on. By default, the example SAML SP runs on TCP 5000.
$ ngrok http 5000
You will need to install ngrok if you haven't already.
Here is what it should look like:
-
Run saml.oktadev.com to test this example SAML SP
-
Load saml.oktadev.com in your browser and fill out as follows:
Issuer: "urn:example:idp"
SAML ACS URL: "http://REPLACE_ME.ngrok.com/saml/sso/test"
SAML Audience URI: "http://REPLACE_ME.ngrok.com/saml/sso/test"
Be sure to replace the string "REPLACE_ME" with the sub-domain that ngrok selected for you!
-
Click the "Submit" button.
-
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