okta-pysaml2-example | Example SAML Service Provider for Python/Flask | Authentication library
kandi X-RAY | okta-pysaml2-example Summary
kandi X-RAY | okta-pysaml2-example Summary
This is an example SAML SP service written using Flask and pysaml2.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a SAML client for the given IDP .
- Authorize an IDP .
- Redirect to a SAML request .
- Initialize user info .
- Log out the user .
- Load user .
- Render the main page .
- Show the user .
- Redirect to the user .
okta-pysaml2-example Key Features
okta-pysaml2-example Examples and Code Snippets
Community Discussions
Trending Discussions on okta-pysaml2-example
QUESTION
Since Google AppEngine 2.7 doesn't allow for 3rd party libraries using C lib extensions, I've been looking for alternatives to set up a backend simliar to what is shown in the repo: https://github.com/jpf/okta-pysaml2-example. It is basically saml for python that will run alongside my GAE standard environment.
Google cloud functions seems to almost be a great fit but I don't see a way to install Brew dependencies. Is this not possible?
...ANSWER
Answered 2018-Nov-02 at 21:07It's not possible to install system-level dependencies for Cloud Functions or the App Engine Standard environments (2.7 or 3.7).
Instead, you'll need to create an App Engine Flex custom runtime, and manually define a Dockerfile
which installs the dependencies, with a line something like this:
QUESTION
I am trying to implement SSO with Okta in Python Flask but I don't see anywhere in their docs where I could pass in a parameter and retrieve it back in a successful login response. I currently 2 endpoints modeled after https://github.com/jpf/okta-pysaml2-example/blob/master/app.py.
A SP initiated method which gets the parameter I'm passing in and sends a SAML request to Okta.
An IDP initiated method, where on a valid login, Okta sends a SAML response and I redirect to a URL where I want to append the initial parameter passed in. Is this possible?
...ANSWER
Answered 2018-Nov-30 at 05:15Where the user goes post sign-in is determined by the Relay State. It's an opaque value, so any parameter you want to set can be part of that. For simplicity, Relay State could be an encoded URL. Alternatively, it could be something your SP knows how to translate/decrypt to redirect the user to the next state (i.e., page).
For SP-initiated requests, you (the SP) provide the Relay State.
For IDP-initiated requests, you should be able to set the default relay state. Specifically for okta, set the Default Relay State under Application - Settings - Sign On Methods for the application in question.
(If you want okta to send you to different places, say "main" vs. "admin console" part of your SP application, you either need multiple okta applications, or you send the user to the same place & your SP figures out where to send them "next", perhaps based on logged in user name, or via an Attribute Value Assertion included with the authentication response.)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install okta-pysaml2-example
You can use okta-pysaml2-example like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page