Skip to main content

Python GSSAPI Wrapper

Project description

https://travis-ci.org/pythongssapi/python-gssapi.svg?branch=master 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 master can be found at https://pythongssapi.github.io/python-gssapi/latest.

Requirements

Basic

  • A working implementation of GSSAPI (such as from MIT Kerberos) which includes header files

  • a C compiler (such as GCC)

  • either the enum34 Python package or Python 3.4+

  • the six and decorator python packages

Compiling from Scratch

To compile from scratch, you will need Cython >= 0.21.1.

For Running the Tests

  • the nose package (for tests)

  • the shouldbe package (for 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 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)

  • Solly Ross (@directxman12)

  • Robbie Harwood (@frozencemetery)

  • Simo Sorce (@simo5)

  • Hugh Cole-Baker (@sigmaris)

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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gssapi-1.6.5-cp38-cp38-win_amd64.whl (697.4 kB view details)

Uploaded CPython 3.8Windows x86-64

gssapi-1.6.5-cp37-cp37m-win_amd64.whl (684.6 kB view details)

Uploaded CPython 3.7mWindows x86-64

gssapi-1.6.5-cp36-cp36m-win_amd64.whl (683.8 kB view details)

Uploaded CPython 3.6mWindows x86-64

File details

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

File metadata

  • Download URL: gssapi-1.6.5.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for gssapi-1.6.5.tar.gz
Algorithm Hash digest
SHA256 9971eb9771215164ae6ff4af6e020a13cb8d5a55bc834a329be53594d2d1250a
MD5 802a0a1217d0bdba11b0d74917b63d08
BLAKE2b-256 2fe669c936ede359d00b6afb5e795cd21e6c406ea8a79c5daab21e3f20befc96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gssapi-1.6.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 697.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for gssapi-1.6.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 20ba38e92639c54612cf07053a3c4b7284127a8b86e9d786c3a54b1c15dcc870
MD5 cae551c23bd1cd444a4fac4c833001d1
BLAKE2b-256 ec4eb40c76932e43ed31c609e95598a484cb76cf962f06cbbea32d45bd21b1d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gssapi-1.6.5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 684.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for gssapi-1.6.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ab89d287091143e7b5a25955758416bc79df28a3d845f2df7389e9ff5fb72c30
MD5 3a150f5f5b0cc08e118e22a18a8cd3f5
BLAKE2b-256 0329fde9d9d63b84a12b68a0e451c665fc56ceccda929d86147787def2899eac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gssapi-1.6.5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 683.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8

File hashes

Hashes for gssapi-1.6.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fb0d453a3ae316d852f05fd1d5e6059537b9f629c9cd64c2fc662b4a0dfa49ba
MD5 b2a323c8e0510c369c27878b64edfef4
BLAKE2b-256 d9cecc7acceb4cb7e5a55df58dce195b4acfb1c5907b0cec3ab2ec0bc7d4dd20

See more details on using hashes here.

Supported by

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