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 can be found at https://pythongssapi.github.io/python-gssapi/.

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

  • the decorator python package

Compiling from Scratch

To compile from scratch, you will need Cython (see [pyproject.toml](pyproject.toml) for the version) 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

Python Free-Threading (PEP 779)

This library supports Python Free-Threading and will build free-threading-compatible extension files if installed under a free-threading interpreter. Python 3.14t is tested in CI and a wheel will be created for 3.14t+. Python 3.13t is not officially tested or supported but may or may not work. There is limited testing for free-threading in this library and it does not aim to be thread safe out of the box. If you encounter any issues or problems with this scenario please raise an issue and we can look at possible options to fix this.

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.

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.11.1.tar.gz (95.2 kB view details)

Uploaded Source

Built Distributions

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

gssapi-1.11.1-cp314-cp314t-win_amd64.whl (981.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

gssapi-1.11.1-cp314-cp314t-win32.whl (868.6 kB view details)

Uploaded CPython 3.14tWindows x86

gssapi-1.11.1-cp314-cp314t-macosx_11_0_arm64.whl (734.1 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

gssapi-1.11.1-cp314-cp314t-macosx_10_15_x86_64.whl (714.4 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

gssapi-1.11.1-cp311-abi3-win_amd64.whl (781.6 kB view details)

Uploaded CPython 3.11+Windows x86-64

gssapi-1.11.1-cp311-abi3-win32.whl (699.8 kB view details)

Uploaded CPython 3.11+Windows x86

gssapi-1.11.1-cp311-abi3-macosx_11_0_arm64.whl (642.8 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

gssapi-1.11.1-cp311-abi3-macosx_10_9_x86_64.whl (611.7 kB view details)

Uploaded CPython 3.11+macOS 10.9+ x86-64

gssapi-1.11.1-cp310-cp310-win_amd64.whl (831.7 kB view details)

Uploaded CPython 3.10Windows x86-64

gssapi-1.11.1-cp310-cp310-win32.whl (749.6 kB view details)

Uploaded CPython 3.10Windows x86

gssapi-1.11.1-cp310-cp310-macosx_11_0_arm64.whl (687.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gssapi-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl (680.1 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

gssapi-1.11.1-cp39-cp39-win_amd64.whl (836.1 kB view details)

Uploaded CPython 3.9Windows x86-64

gssapi-1.11.1-cp39-cp39-win32.whl (753.1 kB view details)

Uploaded CPython 3.9Windows x86

gssapi-1.11.1-cp39-cp39-macosx_11_0_arm64.whl (693.4 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

gssapi-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl (685.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: gssapi-1.11.1.tar.gz
  • Upload date:
  • Size: 95.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1.tar.gz
Algorithm Hash digest
SHA256 2049ee4b1d0c363163a1344b7282a363f9f4094e51d2c36de0cf01d4735e0ae2
MD5 70a141343b95b3e7d97a174b9ab52488
BLAKE2b-256 2352c1e90623c259a42ab0587078bb04f959867b970add46ff66750ead8fc7c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1.tar.gz:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.11.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 981.1 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 da43c0e0ae84bb9f04c4e016eac6d3826c6357f827183042ba990ccedeeab052
MD5 44c4344d805be39b29195e9031c731e9
BLAKE2b-256 10031b71feddb85f945101c3cdc07242805c5e9b48da546f8a922129ad8299e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp314-cp314t-win_amd64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp314-cp314t-win32.whl.

File metadata

  • Download URL: gssapi-1.11.1-cp314-cp314t-win32.whl
  • Upload date:
  • Size: 868.6 kB
  • Tags: CPython 3.14t, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 b17875d236b8b030a777ee3f3ece55f3d316a91937c37abbc771afe1493703cf
MD5 5e251ba9b3b22ad4b1ca972da720ba70
BLAKE2b-256 b234733a6f3372040992befd1fe62288cafea9fe25acdcf8b663ec8a7857cb69

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp314-cp314t-win32.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gssapi-1.11.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb0250f27d288d4217d7f606d3b68ecb9a10fce9391106129cada96434a685b0
MD5 66630381613be89adb8d1c71b21ea655
BLAKE2b-256 ca77f34fd81bbccf2e682073964a1b1b0a383e70d02946e472f78881d50cec6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.11.1-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 82fba401e9514ad21749b8d8954e2de1c617b0a73204c8598ee84630e23c5810
MD5 0b8c03c9288691621afb57c55a45dc72
BLAKE2b-256 7b799148636b75ca5741ddc9c57c4b256adec422e3a89bca14306d53b48caac9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp314-cp314t-macosx_10_15_x86_64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: gssapi-1.11.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 781.6 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 96a102ad1ec266e2d843468bf03149982969fc70344f303f81ea20197b80d7a1
MD5 284aa1a625e2e1398ffecea8190f84dc
BLAKE2b-256 54ca7f839880baf7c365768884161c246a3b6201738722fc7581a995190ec431

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp311-abi3-win_amd64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp311-abi3-win32.whl.

File metadata

  • Download URL: gssapi-1.11.1-cp311-abi3-win32.whl
  • Upload date:
  • Size: 699.8 kB
  • Tags: CPython 3.11+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp311-abi3-win32.whl
Algorithm Hash digest
SHA256 9738fe0ba163c28ccf521de7520640bde4b135c1b6e87a5ac5a90435369e89c0
MD5 1204b8b8cba5baf2b0a41845ea7cd563
BLAKE2b-256 f897f4ea9248bfdf5fcde2c5bf0bc0e573d212748724a32a5aa1002e11edb760

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp311-abi3-win32.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gssapi-1.11.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b60b1f8d8d3e36c025bd3494105de1dfccee578e8de001f423cc094468e3022
MD5 62f46008544c243d9933d44b32fd5036
BLAKE2b-256 81f9ac0f8c43c209d56c89655f80cd4ae43379f88370d01a7e11f264f081eef5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gssapi-1.11.1-cp311-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gssapi-1.11.1-cp311-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2298e5909a8f2d27c29352885a24e4026cfd3fa24fc38d4a0a3743fa5a3e7667
MD5 93d7e746376609b99074e620cdc5bee5
BLAKE2b-256 48753cc18f2d084d19fbba38dc684588cf5f674c647e754f9cf1625bd78c39f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp311-abi3-macosx_10_9_x86_64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: gssapi-1.11.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 831.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e8b4d76801f2a8f8e6d85746cb9048d47341c6706800b357c61ba09e4741c03
MD5 af60a4361b8f9aacda790cd81cb9516e
BLAKE2b-256 d3bf37a3359ba24d9e422094b749e031116e6613fd038ec0d4c633d210ba314e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp310-cp310-win_amd64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: gssapi-1.11.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 749.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 e5d01ac02df8fe67c32cd1684c0954e935d50158ebb956fdffbf9aad7695a3b3
MD5 c0721a2e29d4842087f7d3517b839f21
BLAKE2b-256 4857391fb8511e0e9bd2f86ed342ba65d1d1dbc0bd77d54f1f75ff4e4616df49

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp310-cp310-win32.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gssapi-1.11.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25b3bcf75a0dd5638f02f939a9c40d1c907682ccca69ea1d05ea81ad58ea1022
MD5 d928dfe810e99adc4975044bc79b357b
BLAKE2b-256 0b25e668f8bfebdaf132b29a26bbc4cc50c5a624a83c5271e83e69c62c2ac5d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gssapi-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 126352502e15dc42f786a4635e5fb4dc8ae4bbc89354e85ab094c478a9e49beb
MD5 7cbd167eb8fed5857e28100c05a1fd13
BLAKE2b-256 d8d8dfd7632e42f3028b27fdae1dea0fd967bcee1d9164e0a9fa3946490e6c7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: gssapi-1.11.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 836.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4aa2a483eb7fe5dbee1313a262b18f336c4c2034b0a9ccc0e5bec1cc711ddb7f
MD5 c722a988396e302c55a7948be2ffe197
BLAKE2b-256 a591ccf653f0648de3dfcebcd2dc3df355490701216a3228d7c46c02f32287f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp39-cp39-win_amd64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: gssapi-1.11.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 753.1 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gssapi-1.11.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 ca58947db846d1454dc9a48e1610f51521955b749497363d8b2e31482a0669da
MD5 6f6793904e9de172a3d3b87629fb9d37
BLAKE2b-256 1dac5d36d690d6fbb5d15ee84b80a33ffc2e1c9a0e89510047850b5d43549259

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp39-cp39-win32.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gssapi-1.11.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8bbefb4d0356803fab14623c075c63e038470228e6f572e07240b5ab9b4a6ff2
MD5 a27e150cf1c50b968366ac1cc2d21487
BLAKE2b-256 09eb645cc413c494e7f1f15a9721b984b40a3f25499966ddbe9b6590272a5ee3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gssapi-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2982ca375bba548f7b2f6013ff55343f1a9f356b7e78426347ebe2b61f824b75
MD5 dc047ec70c4366076732be64385ba659
BLAKE2b-256 439cd1ae8549a99666ee7b57e70ef2b3020a98e5f35e505610add34460c7e37b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gssapi-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: ci.yml on pythongssapi/python-gssapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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