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.7+ (older releases support older versions, but are unsupported)

  • the decorator python package

Compiling from Scratch

To compile from scratch, you will need Cython >= 0.29.29 which is automatically installed by pip in an isolated build virtual environment.

For Running the 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
$ pip 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 4178 (GSS-API Negotiation Mechanism)

  • RFC 5587 (Extended GSS Mechanism Inquiry APIs)

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

  • RFC 5801 (GSS-API SASL Extensions)

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

  • Kerberos specific extensions

The Team

(GitHub usernames in parentheses)

  • Jordan Borean (@jborean93) - current maintainer and developer

  • Simo Sorce (@simo5) - developer

  • Robbie Harwood (@frozencemetery) - author emeritus

  • 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.8.1.tar.gz (94.3 kB view details)

Uploaded Source

Built Distributions

gssapi-1.8.1-cp310-cp310-win_amd64.whl (676.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

gssapi-1.8.1-cp310-cp310-win32.whl (610.1 kB view details)

Uploaded CPython 3.10 Windows x86

gssapi-1.8.1-cp310-cp310-macosx_11_0_arm64.whl (550.1 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

gssapi-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl (595.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

gssapi-1.8.1-cp39-cp39-win_amd64.whl (705.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

gssapi-1.8.1-cp39-cp39-win32.whl (633.7 kB view details)

Uploaded CPython 3.9 Windows x86

gssapi-1.8.1-cp39-cp39-macosx_11_0_arm64.whl (568.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

gssapi-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl (622.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

gssapi-1.8.1-cp38-cp38-win_amd64.whl (707.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

gssapi-1.8.1-cp38-cp38-win32.whl (634.3 kB view details)

Uploaded CPython 3.8 Windows x86

gssapi-1.8.1-cp38-cp38-macosx_11_0_arm64.whl (561.1 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

gssapi-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl (611.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

gssapi-1.8.1-cp37-cp37m-win_amd64.whl (702.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

gssapi-1.8.1-cp37-cp37m-win32.whl (626.2 kB view details)

Uploaded CPython 3.7m Windows x86

gssapi-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl (603.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: gssapi-1.8.1.tar.gz
  • Upload date:
  • Size: 94.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1.tar.gz
Algorithm Hash digest
SHA256 893aa38ae769d1febe89963aa9f59194a966736ade2263fe14e0081126d64a72
MD5 df0b065078acc2e9f702e959b864ffc9
BLAKE2b-256 1802c6e3d025f279c3ef15f382180010b67f1b141e72480e0d46a97191f3adbf

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.8.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 676.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a30a5e39772eb3db0c87471c48bd04d44f20b3b15472e5b40a29fa227b206aa6
MD5 3d727ec762abc74eab153510ee9ee7a0
BLAKE2b-256 443af0a163124a84d3d92a6e48fa268566267dabaac007c450fa0f240573c6ce

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp310-cp310-win32.whl.

File metadata

  • Download URL: gssapi-1.8.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 610.1 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 783f4d816f439e050a83ad682bea57507d5c452ed2f9ea4fcb600a9371ffd940
MD5 5eb50f75e3c52751193e501b912230c0
BLAKE2b-256 f00f2b474272ac4718727e628faefca2dd46d1de1862f551047558f23b3ace6c

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8dd2b036a596f2f87bfd18242c438a11aef1ed78a6a345c2677d0a150897f33f
MD5 cfd12f4163e803ea0c5fd42e1d478dd5
BLAKE2b-256 952043945b5fb92e5b6a36e4586dded88eb69a2b1c79a289134c3f874a60f553

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 35909a2daa31170dca54ce0815e7166eff67b6cb77594806055552c96ff8829b
MD5 75f15f942a2cddab3b265817359fcc86
BLAKE2b-256 24e5457db51bd6099243e67b3d68f98f59a1920ad3276dbf0cde2dde3e822a5f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 705.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 39f75364ab86cba3defc13bbac359aac3cdf7ea081f704b73c0af85834f1e36e
MD5 802bbb2033e348b7f47cdcae460aad68
BLAKE2b-256 77a26df0fd7ec0a713ae72cafa12fb593dea86d2ef2515832c24789fc21b9cfd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 633.7 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 ef1cca01e099771e21328228cd1683ec284d8ec983ad18c9ba82e91a455687bb
MD5 8518198aa7de3fab8cfd6cddefb36d70
BLAKE2b-256 b212ff598eddfe35583a483c66e29744b2586f8e8e5dcc253cb43f7a4a07d175

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56488a179a3fd346fd2e16c979299da67e6207ecc22ff918d431e05d5c5dfe1f
MD5 695351fa98d9986d603cc844ee324c1a
BLAKE2b-256 77974140956b3af8cd8a710d351975dd8416cfbda5e5d028344de264754009e6

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec6ee12b0ac1c649c4d6693277025c3a23f6586c3dea01cf9e7067d0f713bd63
MD5 9a77e462326d8bb551a5a01726f7e9da
BLAKE2b-256 db0e990da75fd86740cacc469c8978ade302c5b887d232e17e68ea7b885f5d41

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 707.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2e85f72d2fa6933d4f3aff26c66638c17ce4fe23e9e2d64b81264a4425fb776f
MD5 b0f94f78af2242bad9472980c262f113
BLAKE2b-256 a1905cb31f6f042e99a130ec844111c8db91243d4c3b5f02e2977638573bac54

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 634.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 d84b084033af2a3c5beadafba3a793dcb2f8f139239f59f165eaaa6a40b3b058
MD5 1ecc4e5106559dd016d4128fdec3d35a
BLAKE2b-256 2ac2b638553ccee15db0e7ab88ab8d067c2a3d2dc4d2dba59f49e51cacbd580b

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eaf1e9cb5eec54509466847df7f8246876a9b809274305042bdbcada69623df9
MD5 c4984c06351d2f4e00e373ebb7f63362
BLAKE2b-256 59a1ccdf356489d67decf69cc815ef904baf61a23ba60f5cb6f641e1979d71e1

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 59d9e3b1dc481026e3590da8b79969bf1c48de58a039958efc0b395941679d9c
MD5 62ceb091e2aacfee7cd9fa54f5366c49
BLAKE2b-256 4fe3c8104817b373a6fccc0dfc9195928efc9840eab2a03b102e7b5d1dc3b6e0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 702.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 eafb54fea882f7d8b0796a5a7830ad76742511101202923cb6e0bdb7becfee5f
MD5 f6f1c65fd35a15c8d088dbf651518858
BLAKE2b-256 a15decfd29feea5519e4d65bff411827aa8e32647c8718724954bc72ac096167

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gssapi-1.8.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 626.2 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for gssapi-1.8.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 1dca47b430e0222cc38e326a6c34c81c6351ba5bd286ee4499e0a59fe0a9b016
MD5 b10a11e236f79e8a0e1a16e1a312d086
BLAKE2b-256 20ddfef51acc3d4008279087b8208593970ef9b2f70f60e65f1388787fc45ca3

See more details on using hashes here.

Provenance

File details

Details for the file gssapi-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 721a365d4f6bfdced10e60c82301894e6d6c607c177272f70c3e6e03daad92b3
MD5 ae47ddf0d73e0b3f2e0ddd1d45f50483
BLAKE2b-256 73d5cfb77c9f3582355481d3afbea24c552b155f7a54d2af8928a79b6c33f563

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