Skip to main content

Windows Negotiate Authentication Client and Server

Project description

Python SPNEGO Library

Test workflow codecov PyPI version License

Library to handle SPNEGO (Negotiate, NTLM, Kerberos) and CredSSP authentication. Also includes a packet parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human readable format.

Requirements

See How to Install for more details

Optional Requirements

The following Python libraries can be installed to add extra features that do not come with the base package:

How to Install

To install pyspnego with all basic features, run

pip install pyspnego

Kerberos Authentication

While pyspnego supports Kerberos authentication on Linux, it isn't included by default due to its reliance on system packages to be present.

To install these packages, run the below

# Debian/Ubuntu
apt-get install gcc python3-dev libkrb5-dev

# Centos/RHEL
yum install gcc python-devel krb5-devel

# Fedora
dnf install gcc python-devel krb5-devel

# Arch Linux
pacman -S gcc krb5

Once installed you can install the Python packages with

pip install pyspnego[kerberos]

Kerberos also needs to be configured to talk to the domain but that is outside the scope of this page.

While NTLM auth works out of the box, it is recommended to install the gss-ntlmssp library for full Negotiate support. This can be done with

# Debian/Ubuntu
apt-get install gss-ntlmssp

# Centos/RHEL
yum install gssntlmssp

# Fedora
dnf install gssntlmssp

# Arch Linux
# AUR package https://aur.archlinux.org/packages/gss-ntlmssp/

How to Use

See the examples section for examples on how to use the authentication side of the library.

Note: While server/acceptor authentication is available for all protocols it is highly recommended you have the system GSSAPI and NTLM system libraries present for acceptor authentication. Pyspnego NTLM acceptor authentication should work but it is not as thoroughly tested as the GSSAPI implementation.

CredSSP Authentication

Since version 0.2.0, pyspnego can be used for CredSSP authentication. While this isn't part of the SPNEGO/Negotiate protocol it uses common features and code like ASN.1 structures and even Negotiate auth as part of the CredSSP process. Both initiate and accept usages are supported when specifying protocol='credssp' but there are no guarantees the acceptor is free of any bugs so use with caution.

Backlog

  • Add support for anonymous authentication
  • See if pywinrm wants to use this

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

pyspnego-0.5.2.tar.gz (328.2 kB view details)

Uploaded Source

Built Distributions

pyspnego-0.5.2-py2.py3-none-any.whl (124.0 kB view details)

Uploaded Python 2 Python 3

pyspnego-0.5.2-cp310-cp310-win_amd64.whl (200.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.5.2-cp310-cp310-win32.whl (190.8 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.5.2-cp39-cp39-win_amd64.whl (200.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.5.2-cp39-cp39-win32.whl (190.7 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.5.2-cp38-cp38-win_amd64.whl (201.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.5.2-cp38-cp38-win32.whl (191.3 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.5.2-cp37-cp37m-win_amd64.whl (199.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.5.2-cp37-cp37m-win32.whl (189.4 kB view details)

Uploaded CPython 3.7m Windows x86

pyspnego-0.5.2-cp36-cp36m-win_amd64.whl (210.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyspnego-0.5.2-cp36-cp36m-win32.whl (195.7 kB view details)

Uploaded CPython 3.6m Windows x86

File details

Details for the file pyspnego-0.5.2.tar.gz.

File metadata

  • Download URL: pyspnego-0.5.2.tar.gz
  • Upload date:
  • Size: 328.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2.tar.gz
Algorithm Hash digest
SHA256 1fed228edc4b1730844da8237b90489be28c55681cf3934cd04fceb2253e55bf
MD5 f520b41f604431aace5e8410b977910b
BLAKE2b-256 05eef48c0427845659b25d6ae6edcd480c5f5e17f9e4006f035bd94a62449908

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pyspnego-0.5.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 124.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb41b970dbda0dfe07b1da6fc83fe9f534a66d8dea38c06c0155377697407d9a
MD5 1540184be94488bb12cabbf7215ff2fa
BLAKE2b-256 9b61e85a9ac794fe1c560b1e8eda62ee6c9f35c4c428a0229f99810e51148668

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 200.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4b9bda51bd964f40322aa1b33dcfc5d68f23b0680b4b5158175f2e9a04119aa9
MD5 f89a7a90745c1c100614dff51f755691
BLAKE2b-256 4c8213d2fa1ad4886819782fda0fbea0bbc8ade8eb3837fc68c96d3eeddc235f

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp310-cp310-win32.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp310-cp310-win32.whl
  • Upload date:
  • Size: 190.8 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9c5bdb9f0207e2ce9e5410ee2205bf016755712018534c711ae6c1daff7fa7db
MD5 5fecb9a9681d4dc23d8ac1860cbdfe19
BLAKE2b-256 26dba2374bcac5608e7fc802493dc35e763ee8e9680b343e9a9efda5a83376c9

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 200.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a5c135d20819db3c48f65054d648317f369a61b7b22dc17b9e5ec9c0169541a0
MD5 fb439d11a11a9d5a2d78f6f82985ece0
BLAKE2b-256 0600a8d85ed85113da76cccdf7ac78f583ec4f21e052cbaebd2f65b791a7154d

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp39-cp39-win32.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 190.7 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 36db7ec38023a23a545114dfd23825639571f135c72fb4b13a1ed559a0a4d93c
MD5 09b3bbf9e1bbc904eb9f0961b281d199
BLAKE2b-256 806347bd8e9d7b59a1f726c8415c3e2a4a8e8e345b6f1815c28ca6235e2a71fc

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 201.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5d6d91e35ee63a5de30eb70716bf25274bf16c2c472b046dd21fad60fe63b0b6
MD5 63167479f86be1f27a92b6999b63ca7a
BLAKE2b-256 124e2ed5952a7a39abdc801101f14b16c6dd3b6f1bd06f5f3f991535bb967dea

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp38-cp38-win32.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 191.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 274b3a2d37e45ad4567bc5754be04b5fefad3f7cdea7d205f739d8a26b5a9189
MD5 7dff694e883d95d82e0fdfdea009e4cf
BLAKE2b-256 632bf2f1b54ac44878fec7c98c76ba8e96fd1b56e88d1e72ecb163c296ca5df3

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 199.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 25fbc90fc6bd16881480316739bab820cc91364765e46340da17f861f89691f1
MD5 2cfe9e246e88d8216228d295f1a3b382
BLAKE2b-256 b056894a75d74a118a1d6222265c2973aa4b60c9a67d8d681b3ddf72ba05719a

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 189.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 3b1ff3c1d5588b66f8e4ebafa3079a7bf0bdcc6fb144b944c5a101e688a5a280
MD5 c411cf8a0367278e6cf486df176288b4
BLAKE2b-256 ba91ba9e3f017c57f3f97ce7bd49cff592040ff7af5b28865a70f11711c52f35

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 210.1 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7562bc640bf402bb2849f325b0bb41260bd2c0cb06e38b9a8c6f7021b452c873
MD5 e102bc42142fee26774fe9b24f8a7d39
BLAKE2b-256 461654f50f9843a0f21c5ac4814e52507b7bf10c03c542a7c1a92f89ff6994cb

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.5.2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pyspnego-0.5.2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 195.7 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyspnego-0.5.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 bd95633e7dce69e267579bdbe992fc081a14310236b4e84c3d179b1cf6439ca5
MD5 8bf1306a2ede475dbb3196e2f85fecfc
BLAKE2b-256 caceb8e0cc37ad225c3778b28e9c0b0b42ae95146d60063a5bd4940e955fe593

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