Python GSSAPI Wrapper
Project description
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 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)
Jordan Borean (@jborean93) - current maintainer and developer
Simo Sorce (@simo5) - developer
Robbie Harwood (@frozencemetery) - author emeritus
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gssapi-1.7.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2788648b614ac10fdf3df71a15ac04ec256e1721dd0c84ac8e104b71cd5fbac5 |
|
MD5 | 754839df73cd89a6f7abb73fe9952a7f |
|
BLAKE2b-256 | 71ab79433715fabbbb9cee9482507c317aa5a66afad323fc09e4ad7f31ef82dc |
Hashes for gssapi-1.7.3-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee76851059aecfcf2927ae991d74bd8c635de3e958d8e1cd3cd213d566ec7911 |
|
MD5 | 30c07d4e3da5d797131366741bc5391f |
|
BLAKE2b-256 | 22b1d24a40e75e91713abc0037a9f0cedf53c43c9755791aac344097e133472f |
Hashes for gssapi-1.7.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2fd3546303db6ae238764d61b4b639ffb74d615d0eb4735389887af804ff336 |
|
MD5 | 0587c3b2025e6fc1c8e18fa315d2f584 |
|
BLAKE2b-256 | bd002a4c647199efbddeb34223b09c48080fded8cd22319b19a03c56b35b9e5a |
Hashes for gssapi-1.7.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69104cb87205ab6b6ac1e265b2df1c94b661140fdd5db223fefc564f958bcd44 |
|
MD5 | ea348ada2bf8c9b0316cc726d3404e6f |
|
BLAKE2b-256 | f65c359b4b46df33fee0098ff4ed13011043792fa4517b9a1b519541ca97bd2c |
Hashes for gssapi-1.7.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bb1603b24a1f21a0da19df9f2544c122af896b1f28a17b0d45cf87773de58c4 |
|
MD5 | 6299bceab007238d3b49721e169f487c |
|
BLAKE2b-256 | bfb193dfec3952e45008b9321dfa0f0c297c6232ca8b450e6e506af3651bd1e3 |
Hashes for gssapi-1.7.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65221f5bc91f1fa317b48866d1a6da6248195d5c58e743f6c512a80c7c98119 |
|
MD5 | d482ab03aee29f651989ef583edfa245 |
|
BLAKE2b-256 | 8617fba5d17c0ae08eeba9dfd573791c0c8f4094ca6e8f1dade2b615e72cdd04 |
Hashes for gssapi-1.7.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13971279ccad7df0847d6be33ed2ea1c643bd58f065735c4954cd37c6f85d333 |
|
MD5 | 415bf8be99497f9c0609dc99d1162be3 |
|
BLAKE2b-256 | 328525656a74148a519435f6cbff07355d4328b4fe4786fa08fa83bcdb3770a0 |
Hashes for gssapi-1.7.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec25bfa506dbf82e0471f9ffce198b10da8f4b787f1779d52dbe514eb2cda999 |
|
MD5 | 58cff10823c8eeaa25a56e3284332850 |
|
BLAKE2b-256 | 07f75881b65d0039a76521faef03dc3bded754ef4d0033794b8c4a1ac8e65921 |
Hashes for gssapi-1.7.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2d272d6df0cdbc934d06a0e299fcfb8d7dff211b63d43ce291dcc8055a598ac |
|
MD5 | 7d3aef3a0359e53f9d300a9242776ea2 |
|
BLAKE2b-256 | 614c6e44dc91180ad6aa2c12430ae81fadda6c0f6556e4d5b6e1364f03980cb9 |
Hashes for gssapi-1.7.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7a9c9af5c96bfb95daa9b7166ae071549c8e6a01fbbdf9a589856d60677a823 |
|
MD5 | 6ce7cd33a45d96405d6a0d84d5c0d7a1 |
|
BLAKE2b-256 | cb7302bf2282d8f9d89ada6d5e4e802234978caa2c9ebeab648e4d872ed23f70 |
Hashes for gssapi-1.7.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ae0564140ef3cd53034bdb0e4236e00f69dd2b0e3680c41263025d40d02c9d |
|
MD5 | fdddfb6eb2acad9a50aaa60f6dce0d78 |
|
BLAKE2b-256 | 6026cc3f118583dffe382be298d9de16efc446900a2348c3686ef7e31f878fa7 |
Hashes for gssapi-1.7.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e62981c96b4c138684e8b9dd932a4d52dcc7cc185cf8ac10aae9dd3db23d7e2 |
|
MD5 | 832102568bf4795132849eb7dbd26022 |
|
BLAKE2b-256 | 2427c2e3de57ebf962c1d162d592b60b30aaae4ee1f5ee139f0d2eb4439217f2 |
Hashes for gssapi-1.7.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35dcddb6915dc7c5ae73afacaa6bb1e2da79c24668ad5a3cf2d7890d9c149d3e |
|
MD5 | 4e3e7afa757ca47cf4e86d3f442ca663 |
|
BLAKE2b-256 | b76af12e802cdd0464be06e19b19e3372d99eeb8f1e0fae52e5146e6f90574e3 |
Hashes for gssapi-1.7.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e5a0aae3be78fa5747120f51baa9d070dbc188c105064669ca6b53b75a08c80 |
|
MD5 | d9e5f2a0f4517d41e32d8267f1b13384 |
|
BLAKE2b-256 | d4277799dec71a64e265d090a25ff5e6a924862afe6069d39a88c5fdf03a369f |
Hashes for gssapi-1.7.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eb28405cf3d5171b37796fa7cf5c06bb48eefd6d854b587aafe31b4b4d068db |
|
MD5 | d88a5959e9af5b368fd18d95ea4ab8a9 |
|
BLAKE2b-256 | 7c190345cb57e7e6c82f98a381e693672b64c8eaffd6df890a1ccb47f0a0f344 |
Hashes for gssapi-1.7.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9a47aa3d9c267c9c3677131f305fbf3c3c544450d2999f113af6e3ba738d2c |
|
MD5 | 6ccdc640dc0eb7d102e35f080963f52b |
|
BLAKE2b-256 | cc8876528b23f58b5db83afb7fa925e1f1db4f569c9778d8690bf8f8c34b4fc1 |
Hashes for gssapi-1.7.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e864942c50d0e19608d12052a721745c8f28221c229cba05e534669d7b6225 |
|
MD5 | 7a1d23d0824f2d4656dea6845c060244 |
|
BLAKE2b-256 | 5177cbea512f3887c491c13ff94bf642e09b8797491ef9c5d80d9a46ccab6c47 |
Hashes for gssapi-1.7.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ba691f66e554d9adaf7d6aa8c82f384494d954059bdfcc6be560e7f9122ed3 |
|
MD5 | 2f3ba63e7029594933e4159eaeb08ca3 |
|
BLAKE2b-256 | 53dc286c72a523245b3c66620494ff374848373ff5f7c56c3504ad805925be54 |