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 5587 (Extended GSS Mechanism Inquiry APIs)

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

  • (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

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.6.14a2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

gssapi-1.6.14a2-cp39-cp39-win_amd64.whl (674.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

gssapi-1.6.14a2-cp39-cp39-win32.whl (586.7 kB view details)

Uploaded CPython 3.9 Windows x86

gssapi-1.6.14a2-cp38-cp38-win_amd64.whl (676.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

gssapi-1.6.14a2-cp38-cp38-win32.whl (588.2 kB view details)

Uploaded CPython 3.8 Windows x86

gssapi-1.6.14a2-cp37-cp37m-win_amd64.whl (662.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

gssapi-1.6.14a2-cp37-cp37m-win32.whl (573.9 kB view details)

Uploaded CPython 3.7m Windows x86

gssapi-1.6.14a2-cp36-cp36m-win_amd64.whl (661.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

gssapi-1.6.14a2-cp36-cp36m-win32.whl (572.4 kB view details)

Uploaded CPython 3.6m Windows x86

File details

Details for the file gssapi-1.6.14a2.tar.gz.

File metadata

  • Download URL: gssapi-1.6.14a2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.11

File hashes

Hashes for gssapi-1.6.14a2.tar.gz
Algorithm Hash digest
SHA256 23e8adbc5ce6f92ab120083b5a62bcd4191207fb83523e25528aa02bc2161feb
MD5 eff674d36150c1b649a2ed4fffde5d29
BLAKE2b-256 bdd45d604a4e480c6ea7a0e6a642aecacee8784881d97dc8559d82c86068c618

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 674.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for gssapi-1.6.14a2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c79ec2b326121c1685a61689828a3de19a4bc25d57b49d7b8c47e06cc11cff5e
MD5 c7e47d6b59b0d879551ea12c021b9c2b
BLAKE2b-256 097469777facd6c46ff66f424a780125df35393253ef1fe3c6448f189e32d512

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp39-cp39-win32.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 586.7 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for gssapi-1.6.14a2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 a5147acae2ba90008da7fbb799fd9bf0ffaf4319c3e19b49bb42a93cc308f625
MD5 afc90595dbabc4c237dc7b75fc133494
BLAKE2b-256 faf21cc4fc527376f5807402e4981fcf51b4472de071a134e1e0378cc06be1a4

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 676.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for gssapi-1.6.14a2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f99463ac136764c0d3156357fea32456f6792e402fcc8339687b812b623aa2cc
MD5 fd8c7c2e4b6950af7918a2770aa50a9b
BLAKE2b-256 9805627a85d1c23da03ba018410bc21adfdb664ea5925014d040946e204f2de2

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp38-cp38-win32.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 588.2 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for gssapi-1.6.14a2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 6c47e709a276efb18e6f946fcb85cbe57fb9c599beaf2f4dc2ee4daaad7a4400
MD5 7ef33e2060e2fd18869e8a334cf4c4c3
BLAKE2b-256 a7a90a65c930699493f007ea7a4491125eedc410aed212b42260c5434bd18344

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 662.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.9

File hashes

Hashes for gssapi-1.6.14a2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 697e671e4e0949f49d72c672dec7d492b78e66fc56f96ba5321393ab025ed248
MD5 5d64bfe5766f30cbe43649f5f55f166b
BLAKE2b-256 67d7dfa8aff785f41e9706f6eb07cf2f78c9e2f2e5e717043738bde4d52848e6

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 573.9 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.9

File hashes

Hashes for gssapi-1.6.14a2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 29f7f6739e769553efb42f7f9251a7f8762e9e90e2d082c3eb6e33c28e26c907
MD5 7aa44c92328e39700332cfd2b752f95d
BLAKE2b-256 7d07fc03a43635ff9f6e833109d74f123291f0a075c7a41d4675ed969a87674b

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 661.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for gssapi-1.6.14a2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4acd6d5f87734bddd8d3a9065840ade302e63b1241e2066f96e66931538d9eab
MD5 f717cf1aa81f1470659ab8467ca2cd49
BLAKE2b-256 a6ddea1d363e96911ab4c5f15ce0136eddda01de6176e2f350d02ba6e038ad44

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.6.14a2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: gssapi-1.6.14a2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 572.4 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for gssapi-1.6.14a2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 4423bfb2b9f79822027f511fd03e784be31b96693d049f1ef901199d10bf2009
MD5 eebafbefc1044410f212c221cf169167
BLAKE2b-256 3e16be9b5dbf8c1666f56df046ae5c0090a1c9092e548c90110eac7dffcdc1ca

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