Skip to main content
https://badge.fury.io/gh/pythongssapi%2Fpython-gssapi.svg https://badge.fury.io/py/gssapi.svg

Python-GSSAPI provides both low-level and high level wrappers around the GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should also be useable with other GSSAPI mechanisms.

Documentation for the latest released version (including pre-release versions) can be found at https://pythongssapi.github.io/python-gssapi/stable.

Documentation for the latest commit on main can be found at https://pythongssapi.github.io/python-gssapi/latest.

Requirements

Basic

  • A working implementation of GSSAPI (such as from MIT Kerberos) which supports delegation and includes header files

  • a C compiler (such as GCC)

  • Python 3.6+ (older releases support older versions, but are unsupported)

  • the decorator python package

Compiling from Scratch

To compile from scratch, you will need Cython >= 0.21.1.

For Running the Tests

  • the nose package

  • the k5test package

To install test dependencies using pip:

$ pip install -r test-requirements.txt # Optional, for running test suite

Installation

Easy Way

$ pip install gssapi

From the Git Repo

After being sure to install all the requirements,

$ git clone https://github.com/pythongssapi/python-gssapi.git
$ python setup.py build
$ python setup.py install

Tests

The tests for for Python-GSSAPI live in gssapi.tests. In order to run the tests, you must have an MIT Kerberos installation (including the KDC). The tests create a self-contained Kerberos setup, so running the tests will not interfere with any existing Kerberos installations.

Structure

Python-GSSAPI is composed of two parts: a low-level C-style API which thinly wraps the underlying RFC 2744 methods, and a high-level, Pythonic API (which is itself a wrapper around the low-level API). Examples may be found in the examples directory.

Low-Level API

The low-level API lives in gssapi.raw. The methods contained therein are designed to match closely with the original GSSAPI C methods. All relevant methods and classes may be imported directly from gssapi.raw. Extension methods will only be imported if they are present. The low-level API follows the given format:

  • Names match the RFC 2744 specification, with the gssapi_ prefix removed

  • Parameters which use C int constants as enums have enum.IntEnum classes defined, and thus may be passed either the enum members or integers

  • In cases where a specific constant is passed in the C API to represent a default value, None should be passed instead

  • In cases where non-integer constants would be used in the API (i.e. OIDs), enum-like objects have been defined containing named references to values specified in RFC 2744.

  • Major and minor error codes are returned by raising gssapi.raw.GSSError. The major error codes have exceptions defined in in gssapi.raw.exceptions to make it easier to catch specific errors or categories of errors.

  • All other relevant output values are returned via named tuples.

High-Level API

The high-level API lives directly under gssapi. The classes contained in each file are designed to provide a more Pythonic, Object-Oriented view of GSSAPI. The exceptions from the low-level API, plus several additional exceptions, live in gssapi.exceptions. The rest of the classes may be imported directly from gssapi. Only classes are exported by gssapi – all functions are methods of classes in the high-level API.

Please note that QoP is not supported in the high-level API, since it has been deprecated.

Extensions

In addition to RFC 2743/2744, Python-GSSAPI also has support for:

  • RFC 4178 (GSS-API Negotiation Mechanism)

  • RFC 5587 (Extended GSS Mechanism Inquiry APIs)

  • RFC 5588 (GSS-API Extension for Storing Delegated Credentials)

  • RFC 5801 (GSS-API SASL Extensions)

  • (Additional) Credential Store Extension

  • Services4User

  • Credentials import-export

  • RFC 6680 (GSS-API Naming Extensions)

  • DCE and IOV MIC extensions

  • acquire_cred_with_password and add_cred_with_password

  • GGF Extensions

  • Kerberos specific extensions

The Team

(GitHub usernames in parentheses)

  • Robbie Harwood (@frozencemetery) - current maintainer and developer

  • Simo Sorce (@simo5) - developer

  • Solly Ross (@directxman12) - author emeritus

  • Hugh Cole-Baker (@sigmaris) - author emeritus

Get Involved

We welcome new contributions in the form of Issues and Pull Requests on Github. If you would like to join our discussions, you can find us on libera.chat IRC, channel #python-gssapi.

Release files for gssapi 1.7.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 gssapi 1.7.0
File Size Uploaded
gssapi-1.7.0.tar.gz 1.2 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for gssapi 1.7.0
File
gssapi-1.7.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
gssapi-1.7.0-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
gssapi-1.7.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
gssapi-1.7.0-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details
gssapi-1.7.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
gssapi-1.7.0-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details
gssapi-1.7.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
gssapi-1.7.0-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details

Total release size: 7.0 MB

Release files / gssapi-1.7.0.tar.gz

Download URL gssapi-1.7.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e7b8ae92033f9b487762f7dc7dbf55616b27cf767c1fc0126cdc88414df4111c
BLAKE2b-256 checksum
How to use checksums
2df22a5bf44f878921c92d69f9e8edf6f5f382365e49c34c2764ec2a5bda5639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.12

Release files / gssapi-1.7.0-cp39-cp39-win_amd64.whl

Download URL gssapi-1.7.0-cp39-cp39-win_amd64.whl
Size 774.6 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
97c1e4119ff1ff90480cec2f229dfef0d08edff83cd734c783b486b4e19a98a8
BLAKE2b-256 checksum
How to use checksums
a84f40f85bb6935668710c148064e488e8a0f34d9688ee24e158541d1eaf6ec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / gssapi-1.7.0-cp39-cp39-win32.whl

Download URL gssapi-1.7.0-cp39-cp39-win32.whl
Size 671.2 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
87bb5714aea7c15fefa40ab4742af8babd5f68cdf14da0a637e1df1c72ebaccd
BLAKE2b-256 checksum
How to use checksums
c8e77cb15588f5fc44274f6ba2067b84703e8ede03d52559e1290e4e65cea698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / gssapi-1.7.0-cp38-cp38-win_amd64.whl

Download URL gssapi-1.7.0-cp38-cp38-win_amd64.whl
Size 775.9 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
1ae9a7ad4a2423c5560be849ebcb2d9e61d704d6ee38075c574bdeefb6b29499
BLAKE2b-256 checksum
How to use checksums
7c926e540e2d708433ea7887fca35c8bd1d017bf6ae34294dd2eb67d8217723d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Release files / gssapi-1.7.0-cp38-cp38-win32.whl

Download URL gssapi-1.7.0-cp38-cp38-win32.whl
Size 672.4 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
98c94f5d4019c35d2c4eda4cd2d9e0eae89b7c25c15cdddff1e8ff75a11eb9aa
BLAKE2b-256 checksum
How to use checksums
55075948e382a75fa7bc33409a0cb2faf6469943a7a85ec08a796477570b434d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Release files / gssapi-1.7.0-cp37-cp37m-win_amd64.whl

Download URL gssapi-1.7.0-cp37-cp37m-win_amd64.whl
Size 760.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
ea5f1ea7d1caf27184acaa8b284534db9e19633d6be44143f7c6d34e85189ffb
BLAKE2b-256 checksum
How to use checksums
0927008d05d44c085278890fabf1801384f581c6b7925e01d025134eb5afe1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

Release files / gssapi-1.7.0-cp37-cp37m-win32.whl

Download URL gssapi-1.7.0-cp37-cp37m-win32.whl
Size 656.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
de7543e7572ffba32ebaf14606eb27358e243699ab71db15d67dce662f284c33
BLAKE2b-256 checksum
How to use checksums
3cfb7bb58a8dea60353336f9a1b8357d8da2488b1b7e093dbcbe1402f96088e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

Release files / gssapi-1.7.0-cp36-cp36m-win_amd64.whl

Download URL gssapi-1.7.0-cp36-cp36m-win_amd64.whl
Size 759.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
1e9bba512b7e731a0f90474866119445ffb2ffba9b8a4f2c54ef71263deab849
BLAKE2b-256 checksum
How to use checksums
53c9d3c799ac569ebef78020d83588c7ef647a3176580c6e2b6efb9eb91fae0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.8

Release files / gssapi-1.7.0-cp36-cp36m-win32.whl

Download URL gssapi-1.7.0-cp36-cp36m-win32.whl
Size 655.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
3f8dd4352db5f08f0dea5c2382be70840ebc0f391e3de0d932a158b764be2f4f
BLAKE2b-256 checksum
How to use checksums
08895a8f7da443e85e5cb79e774bbe03cceec28c82e6f117302db66326a95b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.8
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