Skip to main content
https://github.com/kiwitcms/python-social-auth-kerberos/workflows/integration%20test/badge.svg https://coveralls.io/repos/github/kiwitcms/python-social-auth-kerberos/badge.svg?branch=master Tidelift Become a sponsor Kiwi TCMS on Twitter

This package provides Kerberos backend for Python Social Auth. It can be used to enable passwordless authentication inside a Django app or any other application that supports Python Social Auth. This is a pure Python implementation which doesn’t depend on Apache mod_auth_kerb.

Installation

To install:

pip install social-auth-kerberos

WARNING: you will need gcc, Python and kerberos devel packages to build the gssapi dependency because it doesn’t provide binary packages. Try dnf install gcc krb5-devel python3-devel (Red Hat/Fedora) or apt-get install gcc libkrb5-dev libpython3-dev (Debian/Ubuntu).

Configuration

Configure Python Social Auth and then make sure you have the following settings enabled:

AUTHENTICATION_BACKENDS = [
    'social_auth_kerberos.backend.KerberosAuth',
    'django.contrib.auth.backends.ModelBackend',
]

SOCIAL_AUTH_KRB5_KEYTAB = '/Kiwi/your-application.keytab'

IMPORTANT:

The principal name for your Kiwi TCMS web service must be HTTP/<fqdn.example.com>@REALM.EXAMPLE.COM where fqdn.example.com is the domain name of the Kiwi TCMS server and REALM.EXAMPLE.COM is the Kerberos realm that is used in your organization.

/Kiwi/your-application.keytab is the keytab file for your web app principal! If you install this inside a Docker container make sure to chown 1001:root!

Pipeline configuration

Python Social Auth, and by extension this plugin, will create new user accounts upon first access of the web interface. In Kiwi TCMS users need to either be in the special group Tester or have sufficient permissions to add/edit/delete objects.

You can automatically assign new accounts to the Tester group if you append social_auth_kerberos.pipeline.initiate_defaults to the end of the SOCIAL_AUTH_PIPELINE setting.

WARNING: this is not done for you automatically because some administrators may want to employ different behaviour for newly registered accounts!

Kerberos configuration

For more information about Kerberos see:

or check out tests/Dockerfile.kerberos.

Changelog

v0.3.0 (17 Dec 2023)

  • Update gssapi from 1.6.12 to 1.8.3

  • Update social-auth-core from 4.0.1 to 4.5.1

  • Document the need to compile gssapi. Fixes Issue #3

  • Build and test with Python 3.11, Kiwi TCMS v12.7

  • Remove unused import

v0.2.4 (24 Mar 2020)

  • Add social_auth_kerberos.pipeline with function to initialize default permissions for newly created accounts. See section Pipeline configuration

  • Update README with more information how to configure this plugin

  • Enable integration testing with Kerberos and coverage collection

v0.2.3 (22 Mar 2020)

  • Keep a reference to current user before checking anything else. Resolves a crash for clients which know that the server is Kerberos enabled and directly send the Authorization header

  • Be more tolerant to authorization request headers which don’t match RFC-4459, section 4.2

v0.2.2 (10 Nov 2019)

  • Pin license version to GPLv2 for Tidelift

v0.2.1 (10 Dec 2018)

  • Initial release

Metadata

Release files for social-auth-kerberos 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for social-auth-kerberos 0.3.0
File Size Uploaded
social-auth-kerberos-0.3.0.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for social-auth-kerberos 0.3.0
File Interpreter ABI Platform
social_auth_kerberos-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 kB

Release files / social-auth-kerberos-0.3.0.tar.gz

Download URL social-auth-kerberos-0.3.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1d405dda23fb3263b2385f5d8013e43995b7960222ba8841593161b331011c2a
BLAKE2b-256 checksum
How to use checksums
dc4bfe3b545a293688ac38502a760b6eec98d8429aafeb0412050e0f2567b8a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / social_auth_kerberos-0.3.0-py3-none-any.whl

Download URL social_auth_kerberos-0.3.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd6cad046b7286ce9f25d7ceec406398e31dc0ba3968a7810b31f612d365fbcc
BLAKE2b-256 checksum
How to use checksums
ee729167a131b645ed69212121d3e6244d59b2cd0fbc58fcdc07534c87f53ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page