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

Uploaded Source

Built Distributions

gssapi-1.6.12-cp39-cp39-win_amd64.whl (670.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

gssapi-1.6.12-cp38-cp38-win_amd64.whl (672.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

gssapi-1.6.12-cp37-cp37m-win_amd64.whl (659.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

gssapi-1.6.12-cp36-cp36m-win_amd64.whl (658.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

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

File metadata

  • Download URL: gssapi-1.6.12.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for gssapi-1.6.12.tar.gz
Algorithm Hash digest
SHA256 16ed3b5d7fc37683be27f34a2a65062cb11d815d019bb2e89ffeb395576e51c8
MD5 376287a9c2d6bbfc392d6828a77149ab
BLAKE2b-256 c2777cba9c5945d4d42d54ed1fb2a0bd8095d629548743198fa47ed6c1167846

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.12-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 670.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for gssapi-1.6.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c2ec22c0d5719e44d4aaabe0e9641b590f9d235e248df902b5517571622ad278
MD5 56d086617168fcf1e23f81ae4defdeed
BLAKE2b-256 dc3329bcb35d3f3db067666a3182d971e8d16b28b3144c27fbbadd70a9795a0d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.12-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 672.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for gssapi-1.6.12-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9b523392315bf9f724b1ab9bee9862f10f90c787e3473574a8d8fc4be2788cd6
MD5 c1d32ecb7311dd758245c768b2a3c468
BLAKE2b-256 243e0fee3c619456edb871ea4d33f0c9e107799eff4b6cbcc4fddaa66f9e8309

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.12-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 659.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for gssapi-1.6.12-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 48f6537ccfc59b4e7fb6d2e69e340b70c3cddc8dc645335686b6d5cfdddaf98a
MD5 58be60b876a876482dba8831229577e5
BLAKE2b-256 801dbc900508b728ab2e5ab199a6a9f3b3726fc1f2b38988edd372a14a5a51a4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.6.12-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 658.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.8

File hashes

Hashes for gssapi-1.6.12-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 18a494c8edb6efb141ca243d77d3781a0e34785f788e47189f1774a765080182
MD5 832523bfaeeaad14a02522229ce4d87d
BLAKE2b-256 1db94b558ef0fbe6482d6e7e0b937c6a39baa43015ed74758a31568967ca2659

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