Skip to main content

Python GSSAPI Wrapper

Project description

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.

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

gssapi-1.7.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

gssapi-1.7.0-cp39-cp39-win_amd64.whl (774.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

gssapi-1.7.0-cp39-cp39-win32.whl (671.2 kB view details)

Uploaded CPython 3.9 Windows x86

gssapi-1.7.0-cp38-cp38-win_amd64.whl (775.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

gssapi-1.7.0-cp38-cp38-win32.whl (672.4 kB view details)

Uploaded CPython 3.8 Windows x86

gssapi-1.7.0-cp37-cp37m-win_amd64.whl (760.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

gssapi-1.7.0-cp37-cp37m-win32.whl (656.8 kB view details)

Uploaded CPython 3.7m Windows x86

gssapi-1.7.0-cp36-cp36m-win_amd64.whl (759.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

gssapi-1.7.0-cp36-cp36m-win32.whl (655.1 kB view details)

Uploaded CPython 3.6m Windows x86

File details

Details for the file gssapi-1.7.0.tar.gz.

File metadata

  • Download URL: gssapi-1.7.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0.tar.gz
Algorithm Hash digest
SHA256 e7b8ae92033f9b487762f7dc7dbf55616b27cf767c1fc0126cdc88414df4111c
MD5 9e35c311292a5e276243f7eb4f7ebf9e
BLAKE2b-256 2df22a5bf44f878921c92d69f9e8edf6f5f382365e49c34c2764ec2a5bda5639

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 774.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 97c1e4119ff1ff90480cec2f229dfef0d08edff83cd734c783b486b4e19a98a8
MD5 430d7d748cdc13e8f15dde47aaed1b91
BLAKE2b-256 a84f40f85bb6935668710c148064e488e8a0f34d9688ee24e158541d1eaf6ec1

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 671.2 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 87bb5714aea7c15fefa40ab4742af8babd5f68cdf14da0a637e1df1c72ebaccd
MD5 a166d40eb8f98b09725fb167a0e1ef94
BLAKE2b-256 c8e77cb15588f5fc44274f6ba2067b84703e8ede03d52559e1290e4e65cea698

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 775.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1ae9a7ad4a2423c5560be849ebcb2d9e61d704d6ee38075c574bdeefb6b29499
MD5 4f8fa153cdb0d33c8709a7c8a89063f7
BLAKE2b-256 7c926e540e2d708433ea7887fca35c8bd1d017bf6ae34294dd2eb67d8217723d

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 672.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 98c94f5d4019c35d2c4eda4cd2d9e0eae89b7c25c15cdddff1e8ff75a11eb9aa
MD5 5fe0d8c16f6ae833596dbdc228ddd3ba
BLAKE2b-256 55075948e382a75fa7bc33409a0cb2faf6469943a7a85ec08a796477570b434d

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 760.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ea5f1ea7d1caf27184acaa8b284534db9e19633d6be44143f7c6d34e85189ffb
MD5 297cd44a4b7bc8b88b351e79d2f41527
BLAKE2b-256 0927008d05d44c085278890fabf1801384f581c6b7925e01d025134eb5afe1e6

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 656.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 de7543e7572ffba32ebaf14606eb27358e243699ab71db15d67dce662f284c33
MD5 e93118065c3027a55205748b6798ab49
BLAKE2b-256 3cfb7bb58a8dea60353336f9a1b8357d8da2488b1b7e093dbcbe1402f96088e8

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 759.9 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1e9bba512b7e731a0f90474866119445ffb2ffba9b8a4f2c54ef71263deab849
MD5 9bc432de26969e5243ff316d4de8c1b8
BLAKE2b-256 53c9d3c799ac569ebef78020d83588c7ef647a3176580c6e2b6efb9eb91fae0a

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.7.0-cp36-cp36m-win32.whl.

File metadata

  • Download URL: gssapi-1.7.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 655.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using 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

File hashes

Hashes for gssapi-1.7.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 3f8dd4352db5f08f0dea5c2382be70840ebc0f391e3de0d932a158b764be2f4f
MD5 453492325b32d6404ef34b067cbf4dde
BLAKE2b-256 08895a8f7da443e85e5cb79e774bbe03cceec28c82e6f117302db66326a95b70

See more details on using hashes here.

Provenance

Supported by

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