Skip to main content

Implementation of mod_auth_pubtkt as Django middleware

Project description

django-auth-pubtkt

Author: Alexander Vyushkov

Implementation of mod_auth_pubtkt: a pragmatic Web Single Sign-On (SSO) solution as Django middleware. This version was tested on Python == 2.7, Django == 1.5

Please refer to https://neon1.net/mod_auth_pubtkt/index.html for additional details.

Installation:

django-auth-pubtkt uses M2Crypto library. Installation instructions for different platforms are below. When M2Crypto is installed, django-auth-pubtkt can be installed using pip pip install django-auth-pubtkt or using setuptools ./setup.py install

Windows

Use binary package available on http://chandlerproject.org/Projects/MeTooCrypto#Downloads

CentOS/RedHat/Fedora

Fedora Core (and RedHat, CentOS etc.) have made changes to OpenSSL configuration compared to many other Linux distributions. If you can not build M2Crypto normally, try the fedora_setup.sh script included with M2Crypto sources.

pip install –download=/tmp M2Crypto cd /tmp tar -zxf /tmp/M2Crypto-0.21.1.tar.gz cd M2Crypto-0.21.1 ./fedora_setup.sh install

Configuration

Add ‘django_auth_pubtkt.DjangoAuthPubtkt’ to MIDDLEWARE_CLASSES Change LOGIN_URL to “/sso/” Set TKT_AUTH_LOGIN_URL to the address of SSO login page Add piece of code below to urls.py from django_auth_pubtkt.views import redirect_to_sso url(‘^sso/’, redirect_to_sso),

OR Change LOGIN_URL to the address of SSO login page Configure your SSO to use ‘next’ as redirect field name or use @method_decorator(login_required(redirect_field_name=”back”))

Configuration variables (settings.py)

TKT_AUTH_PUBLIC_KEY Default: None Filename of DSA public key in .pem format. It is used to verify ticket signature.

TKT_AUTH_COOKIE_NAME Default: “auth_pubtkt” Name of the authentication cookie to use.

TKT_AUTH_USE_GROUPS Default: False Treat tokens as group names. Create groups if they don’t exist yet.

TKT_AUTH_LOGIN_URL Default: None URL that users without a valid ticket will be redirected to

TKT_AUTH_BACK_ARG_NAME Default: “back” Name of the GET argument with the originally requested URL (when redirecting to the login page)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-auth-pubtkt-1.1.0.zip (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django-auth-pubtkt-1.1.0.win32.exe (207.6 kB view details)

Uploaded Source

File details

Details for the file django-auth-pubtkt-1.1.0.zip.

File metadata

File hashes

Hashes for django-auth-pubtkt-1.1.0.zip
Algorithm Hash digest
SHA256 d60ca8e02b60a8b00cf20509c02d8883055d4622a1a7d50b5b9f36d62e98adcd
MD5 97d6c2a54decfed0d7f661547159a6f7
BLAKE2b-256 f67eb9e9607f756e8531010fe926dd6aa84936a8edfa3556d95d16ec5627c1a2

See more details on using hashes here.

File details

Details for the file django-auth-pubtkt-1.1.0.win32.exe.

File metadata

File hashes

Hashes for django-auth-pubtkt-1.1.0.win32.exe
Algorithm Hash digest
SHA256 126cb6bd94ba2a704f2a0edfe970059fd9b4cc1f55d7206e691ae3b40cc6737e
MD5 8eef66412630a27267cdb1e486c70afe
BLAKE2b-256 befa68493d4e37711f515fb4159f6dcfdc80da32c30249723b968fee92cdb636

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page