Python GSSAPI Wrapper
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 can be found at https://pythonhosted.org/gssapi.
enum34Python package or Python 3.4+
To compile from scratch, you will need Cython >= 0.21.1.
nosepackage (for tests)
shouldbepackage (for tests)
$ pip install gssapi
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
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.
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
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
Extension methods will only be imported if they are present. The low-level
API follows the given format:
enum.IntEnumclasses defined, and thus may be passed either the enum members or integers
Noneshould be passed instead
gssapi.raw.GSSError. The major error codes have exceptions defined in in
gssapi.raw.exceptionsto make it easier to catch specific errors or categories of errors.
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
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.
In addition to RFC 2743/2744, Python-GSSAPI also has support for:
(GitHub usernames in parentheses)