{"id":16902010,"url":"https://github.com/jpf/okta-pysaml2-example","last_synced_at":"2025-03-22T10:30:59.233Z","repository":{"id":29964952,"uuid":"33511804","full_name":"jpf/okta-pysaml2-example","owner":"jpf","description":"Example SAML Service Provider for Python/Flask using PySAML2","archived":false,"fork":false,"pushed_at":"2019-04-10T01:07:50.000Z","size":111,"stargazers_count":74,"open_issues_count":9,"forks_count":38,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-17T19:56:21.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-06T23:47:18.000Z","updated_at":"2024-11-29T08:48:35.000Z","dependencies_parsed_at":"2022-09-06T19:21:19.075Z","dependency_job_id":null,"html_url":"https://github.com/jpf/okta-pysaml2-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-pysaml2-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-pysaml2-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-pysaml2-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-pysaml2-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpf","download_url":"https://codeload.github.com/jpf/okta-pysaml2-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244943679,"owners_count":20536278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T18:03:28.234Z","updated_at":"2025-03-22T10:30:58.844Z","avatar_url":"https://github.com/jpf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis is an example SAML SP service written using [Flask](http://flask.pocoo.org/) and [pysaml2](https://github.com/rohe/pysaml2).\n\n# Requirements\n\n-   [Python](https://www.python.org/) 2.7+\n-   [Virtualenv](https://virtualenv.pypa.io/en/latest/)\n-   [pip](https://pip.pypa.io/en/stable/)\n\nYou will also need a development environment capable of compiling\nPython packages and the \"libffi\" and \"libxmlsec1\" development\nlibraries, which are needed by PySAML2.\n\nInstructions for installing these development libraries will differ\ndepending on your host operating system.\n\n## Mac OS X\n\n```shell\n$ brew install libffi libxmlsec1\n```\n\n## RHEL\n\n```shell\n$ sudo yum install libffi-devel xmlsec1 xmlsec1-openssl\n```\n\n# Installation\n\n```shell\n$ virtualenv venv\n$ source venv/bin/activate\n$ pip install -r requirements.txt \n```\n\n# Running\n\n ```shell\n$ python app.py \n ```\n\n# Testing\n\nThe fastest way to test this example SAML SP is to use the [saml.oktadev.com](http://saml.oktadev.com/) service.\n\nHere is how:\n\n1.  Edit the \"app.py\" file and uncomment the line in the \"test\" line in \"metadata\\_url\\_for\" dictionary.\n    \n    ```shell\n    $ $EDITOR app.py\n    ```\n    \n    Change this line:\n    \n    ```shell\n    # 'test': 'http://idp.oktadev.com/metadata',                                                                                                \n    ```\n    \n    To this:\n    \n    ```shell\n    'test': 'http://idp.oktadev.com/metadata',\n    ```\n2.  Start the example SAML SP\n    \n    ```shell\n    $ python app.py\n    ```\n3.  Start ngrok on the port that the example SAML SP is running on. By default, the example SAML SP runs on TCP 5000.\n    \n    ```shell\n    $ ngrok http 5000\n    ```\n    \n    You will need to [install ngrok](https://ngrok.com/download) if you haven't already.\n    \n    Here is what it should look like:\n    \n    ![img](./docs/_static/ngrok.png \"A screenshot of ngrok 2.0 running\")\n4.  Run [saml.oktadev.com](http://saml.oktadev.com) to test this example SAML SP\n    -   Load [saml.oktadev.com](http://saml.oktadev.com) in your browser and fill out as follows:\n        \n        **Issuer:** \"urn:example:idp\"\n        \n        **SAML ACS URL:** \"\u003chttp://REPLACE_ME.ngrok.com/saml/sso/test\u003e\"\n        \n        **SAML Audience URI:** \"\u003chttp://REPLACE_ME.ngrok.com/saml/sso/test\u003e\"\n        \n        Be sure to replace the string \"REPLACE\\_ME\" with the sub-domain that ngrok selected for you!\n    -   Click the \"Submit\" button.\n    -   Your output should look like the image below:\n        ![img](./docs/_static/validation-success.png)\n\n# Testing the security of your SAML SP\n\nAfter successfully completing the steps in the \"Testing\" section\nabove, select the \"Run security validation\" option to have\nsaml.oktadev.com run an extended series of security tests against\nyour SAML SP.\n\n# Contact\n\nUpdates or corrections to this document are very welcome. Feel free\nto send [pull requests](https://help.github.com/articles/using-pull-requests/) with suggestions.\n\n\nAdditionally, comments or questions can be sent to:\n\u0026#x64;\u0026#x65;\u0026#x76;\u0026#x65;\u0026#x6C;\u0026#x6F;\u0026#x70;\u0026#x65;\u0026#x72;\u0026#x73;\u0026#x40;\u0026#x6F;\u0026#x6B;\u0026#x74;\u0026#x61;\u0026#x2E;\u0026#x63;\u0026#x6F;\u0026#x6D;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpf%2Fokta-pysaml2-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpf%2Fokta-pysaml2-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpf%2Fokta-pysaml2-example/lists"}