google app engine - python SAML in GAE -
is there library can use saml authentication in app engine using python?
i've looked @ pysaml2 it's pure python implementation. however, it's using subprocess.popen cannot used within app engine , fail @ point.
you can use python-saml on gae if use flex environment custom runtime built off of standard python27 runtime provided google. got onelogin's python-saml flask-demo working approach using following settings:
dockerfile:
from gcr.io/google_appengine/python label python_version=python run virtualenv /env -p python # install system packages onelogin dependencies not included in runtime run apt-get update && apt-get --yes --quiet install python2.7-dev libxmlsec1-dev # set virtualenv environment variables. equivalent running # source /env/bin/activate env virtual_env /env env path /env/bin:$path add requirements.txt /app/ run pip install -r requirements.txt add . /app/ cmd python index.py
app.yaml
runtime: custom env: flex entrypoint: python index.py api_version: 1 threadsafe: true
requirements.txt
flask==0.10.1 python-saml
then gcloud app deploy app.yaml --version v1
Comments
Post a Comment