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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

File details

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

File metadata

  • Download URL: gssapi-1.6.14.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.14.tar.gz
Algorithm Hash digest
SHA256 1bb0a41c9985ad78b973aa3c9f1fa200b543013e3a1b2a24463c2e5d8d1afaf1
MD5 32388e00f7dd7fb5537babdee0187dc3
BLAKE2b-256 b587f12db218b0cfba2e31ae791d65c8109ee1f25c77f29dfa174fa000684eb9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-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.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a2d2883cdf04d16070c7bca209f7366ac07e382d025bc9f164fb3e99ab3306b3
MD5 5632eaae5cb5ad2b0015a8febf0177b0
BLAKE2b-256 512bfeb2edaf89784f551e1e9e8e395220d1fbea1f10cce3a7947d9834dd8c87

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-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.14-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 68f772f4ef757ae9a7a7126cba118bf995159a2d5f66846bd351cf4690ec8279
MD5 9da77cddcbb2ab22c719ea4acea1a55c
BLAKE2b-256 022c261135fc4b2a3bf8abfdc146fadfbddbdeb1ce74465d0f1b5db19fd4436a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 676.1 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.14-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 dac4dae90416f89a3c4924ce365f0fdb7adfeaf68a997341d9c74a779837ab39
MD5 fbd3e674b1e48c3ae041c1e55a76336f
BLAKE2b-256 c85ad3d81fad159b3bb2fab04a9134f464f112fc2acc8cd2ab3c64ec229b7e05

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-cp38-cp38-win32.whl
  • Upload date:
  • Size: 588.1 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.14-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 d7ddd253c49b27753809401e4136dabff75389d326707899ae616da4abcd3ca6
MD5 6d39f4e1292ddb22a502b48e421386a3
BLAKE2b-256 5aac2e5aeebf2b048bbd830b444020ed98f37ef6e596ea497bdc1031042d6379

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-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.14-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7b4ee387d6d61291be699c56e77504facd4dca9804d12a1359ef8a1635d6d782
MD5 2d6a170234a2f5400d73b0c1a2b1dffb
BLAKE2b-256 0f80de736c97274f4b90d35bc803b6b2c18709ba48905a8529dfa722e7fc44d0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-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.14-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c0d339e593494a3c0cb347711ea50ff806529da30fb2fdb9165c8127c91d4f8e
MD5 3fa94a1330991137b8a03d06619913d9
BLAKE2b-256 2ffe46558c32ba7fca815ad21c83d2303df529bcca22e2ee07708415ec3c8d61

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-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.14-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 20cc2873798d123ca6726365c706854cb589297ceabfabf30589b2c298bca8aa
MD5 ecf23d6564ac4cd15b0f8e14dc89f8bb
BLAKE2b-256 6dd61840c64bffe21a957a6283ad58a1bec540af59503aa2c661c43943a5f61e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.14-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 572.3 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.14-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 12bfda5634fb542e649c5d13afea683a1256d54296fecea940e3275b79242a02
MD5 28d1f0e929f96919c626704ab238c8b7
BLAKE2b-256 b105f2f8a80985e73e393701ed699ab8b6032e45be76dedba376ab7c3f59db3b

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