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.

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

Uploaded Source

Built Distributions

pyspnego-0.9.0-py3-none-any.whl (132.7 kB view details)

Uploaded Python 3

pyspnego-0.9.0-cp311-cp311-win_amd64.whl (241.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyspnego-0.9.0-cp311-cp311-win32.whl (226.4 kB view details)

Uploaded CPython 3.11 Windows x86

pyspnego-0.9.0-cp310-cp310-win_amd64.whl (243.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.9.0-cp310-cp310-win32.whl (227.7 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.9.0-cp39-cp39-win_amd64.whl (246.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.9.0-cp39-cp39-win32.whl (229.7 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.9.0-cp38-cp38-win_amd64.whl (247.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.9.0-cp38-cp38-win32.whl (230.1 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.9.0-cp37-cp37m-win_amd64.whl (244.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.9.0-cp37-cp37m-win32.whl (227.2 kB view details)

Uploaded CPython 3.7m Windows x86

File details

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

File metadata

  • Download URL: pyspnego-0.9.0.tar.gz
  • Upload date:
  • Size: 233.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0.tar.gz
Algorithm Hash digest
SHA256 3f10ca7a2f0d5170c2032bb5d55183384208314032aa44c1684d6920d50e97de
MD5 c84e3c1a7d77b708aef2da3d451167fa
BLAKE2b-256 ee086cd62d64ce42a2eaf433eb41a837d3da2b49ce1cb796a0265cc02652f839

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pyspnego-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 132.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18da3710c383167e54ae2b01f640f269de2cdc0992a8f72928e349441361c21d
MD5 55479747a723a864eb136db1abe2a619
BLAKE2b-256 eea0cea15893da7e70ce9f6276538db2e10157a74039ee73aaf070cb5c9494f8

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.9.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.9.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 241.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8d17f5157c572aa0fc5899211f8092917d1bee2ef84046684d939aa481a958f0
MD5 ceee7ccaf616a9596551b57e230a57ce
BLAKE2b-256 f3cc814b36188aec6082ff10b9cc48bb28044284c9644dc463dd4160abb45aa5

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.9.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: pyspnego-0.9.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 226.4 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 2f2e51c7230f95febe9ff4e00eaa7c24ce64b197ae6c53dc85c7df88aa416d93
MD5 e7022a5362fd89361cfaa2dd2cae3c7c
BLAKE2b-256 5cb880a92574a03df24c873880645d83accdd2628c3b339c8a2f33d53fd19f0c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 243.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f656b22298a3582d210f8dfdd6541b0fb277b0020f9b649b329dea3688ff60da
MD5 bf2118a248a35c1a1f14192c1c7309f3
BLAKE2b-256 7bb9146b193420d1c4601c49623a33aa1fbf06cc0ec7da9a80a3fc63bdbf3be4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 227.7 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 f529b30a0ccfb0219b5b5b996c8a90cf5df0da6bcf19da33262573f9cca4d487
MD5 0f70f2d812ade566a587aeae26875def
BLAKE2b-256 f42173fb1c47eb630a6488cbd382d798242a503b5eedd2dcaa6f0f531f84295f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 246.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 77b965afaed4214b63dddabefdef762f3f9c9796349408d200c64a5921de809b
MD5 fd25177880612e2ad8e03bddf118309e
BLAKE2b-256 374de75815383e6d5ba69ae01816e7d428794489442303c024aee619555fbcd7

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 229.7 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 187aa308fb40be4292753e86f9ee3df1c48500accdb50bcfecb7246b618cd7d8
MD5 9afd3d89f3bb48ec5cb83069792bca05
BLAKE2b-256 11e0aa9fe4aa018993ccd31ced1955473755f44c26f7cd5d3ccc87c54363ba16

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 247.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d498ff81da792ace2eea7f55a103a49a363882b820723f99dc5ccf03ea7f3b3e
MD5 9457eea7810818db0f5dbe4d6aba1df5
BLAKE2b-256 4841d9f7b9d4edf00a9fc83b492c9a4baf584e96462bb0e462fe91d997cf2073

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 230.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 9b9e5a645dcd4645537c7dd38e69124fa524eba501b65fb1ab2825e80038a5dc
MD5 876906eeaac3e9c7badba1d06afc38de
BLAKE2b-256 53e0d1e1d7c2dda40577304ef4cdb5a9140887ac14c604d675b98f60a316c215

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 244.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 44f39ec4c93c8cc51516a6b16365160e9dff622310afef9ee8456626bafda26b
MD5 b3bb04ee7fc87fb190611af89ae3343b
BLAKE2b-256 70901bca81093522ffecae1b139b599ff55a7ee0ff83fe2a691149b13a5e13c0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 227.2 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pyspnego-0.9.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c4111a7584aea4e30b1cd2e0c0b1f8355ed4fb413cce21e2cecef8bfdf0eabcf
MD5 69ff1098da862d1bfcef80b5f257255c
BLAKE2b-256 443b55f1457c13ee49f12d3d2a20ecd6b48fd6267b4362f6d96a815d7aad8637

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