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

Uploaded Source

Built Distributions

pyspnego-0.9.2-py3-none-any.whl (132.9 kB view details)

Uploaded Python 3

pyspnego-0.9.2-cp312-cp312-win_amd64.whl (241.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

pyspnego-0.9.2-cp312-cp312-win32.whl (227.4 kB view details)

Uploaded CPython 3.12 Windows x86

pyspnego-0.9.2-cp311-cp311-win_amd64.whl (241.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyspnego-0.9.2-cp311-cp311-win32.whl (226.7 kB view details)

Uploaded CPython 3.11 Windows x86

pyspnego-0.9.2-cp310-cp310-win_amd64.whl (243.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.9.2-cp310-cp310-win32.whl (227.9 kB view details)

Uploaded CPython 3.10 Windows x86

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

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.9.2-cp39-cp39-win32.whl (229.9 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.9.2-cp38-cp38-win_amd64.whl (247.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.9.2-cp38-cp38-win32.whl (230.3 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.9.2-cp37-cp37m-win_amd64.whl (244.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.9.2-cp37-cp37m-win32.whl (227.4 kB view details)

Uploaded CPython 3.7m Windows x86

File details

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

File metadata

  • Download URL: pyspnego-0.9.2.tar.gz
  • Upload date:
  • Size: 233.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2.tar.gz
Algorithm Hash digest
SHA256 0e16cb331f1bd9c85f9b80e2be04bb5da2ecaff678cc0342f68b45e4667d7966
MD5 1d1400f0e52cfa41bdd482f91f04804c
BLAKE2b-256 5d486e1d700165da513d76c3115779d207d79cb2d7a5a0a54112f791e2c8665c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 132.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 866f140d5e8f57d1a9d1c1a24ea142ff94f9c8dfc3018219204b0999844f1ebe
MD5 ecdb729972cd22381472541ac5991c4e
BLAKE2b-256 a38aefd2bf4da0938d7ee8eea0d7ab13e340473390d182b9eaa3d2cd1ad824a5

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.9.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyspnego-0.9.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 241.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 075fd5950d69dd2fca8aa41ecfb1d54cb155228000cb1f9e76916df2dee7812b
MD5 f918e92f0ea6ffa84e33fc3cf2c809c2
BLAKE2b-256 1746716ceda51b5ef9691af5b3529685df08656284bca71a858d16e3bc405952

See more details on using hashes here.

Provenance

File details

Details for the file pyspnego-0.9.2-cp312-cp312-win32.whl.

File metadata

  • Download URL: pyspnego-0.9.2-cp312-cp312-win32.whl
  • Upload date:
  • Size: 227.4 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 e68fa2cdd7dcc1e4d0b2b42c23ba3a8d2daef2e02f88ecff3fb7c1e6351c8fec
MD5 50e688c0f32fb4916cc3fd8e97c9d531
BLAKE2b-256 23bb70678dc1627bb1a0350cc181bedc87aa3129741bd9dc6f1a945b8403cf16

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 241.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 efa3a5edf2fd5343fdc1d3fbfe02a7166f0747e3c63800a2f241320b78e3fb1d
MD5 6a8b694f84e24a9b4d9578b2b4750664
BLAKE2b-256 0e6cbd57202a5162a9abc7b0b6deda7284f9088a5af5d2c254f2844eb7e6f161

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp311-cp311-win32.whl
  • Upload date:
  • Size: 226.7 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c3ad732037b46ed3e8a001884510323167aee15ad8c80feb5c324f4dd46c511c
MD5 11f1b99c96948d9b8d000f1709522d2a
BLAKE2b-256 7dce3b0d52c3e315e6cae1087ab44ff12795479325a4fb100bf1b2a3e91ede31

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 243.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b9ecc00b23eb1cfb0fe2cd10c5819751c9294895fe7c03a176768a51d0b78277
MD5 dbd34921dee3e1063f040161a90fca25
BLAKE2b-256 f0921d6487d0af56dc3e90d499b0692a8ed11b59dddd84812865576c0b79006c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp310-cp310-win32.whl
  • Upload date:
  • Size: 227.9 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 dc9664a32ff1d7b9942573b9568216876d582612f12f9ec7bba312fb0065252d
MD5 6d964e8a88994d58f58667db0fc10187
BLAKE2b-256 8137f90d9d2d86633e7a767dbc9af02a87a867bbdfdc62cdb7518ef01ff1af25

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-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.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 964749e145b66d5dbba6419960f6a1f23661daf96175f69f9583fb2b3ad7b699
MD5 87e400101859a1e24e5a276c2f661e05
BLAKE2b-256 7818e4de3577a743f820a71fdb7e9eb73e1c6ce87d553e2ed545084e530b7437

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 229.9 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 0fb120259c58b8cc6371908980f7cfa6c7ffc187ac43b782a4112bda8a06163b
MD5 4685d266f6eba483329ec9b1c453a8a7
BLAKE2b-256 e4366ba19e0caac63e9339a614bd797e2c71d0c5b28b924b7fe9891729b32435

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 247.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e38d0563433cdea0e88b00c20f7f7ace84778d3c5c7ea3e22acd71cc1e56a284
MD5 79c67e006eef501f9796ceaba690fdd3
BLAKE2b-256 76de96e9349265e6126fe1c67be60f283ac756dfed243ef2534e2d3f8bd3c07f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 230.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e41c415953c0beea0bc1493121e1d2c7d08ccc10a8d28eaa1a3c6420e2917a07
MD5 88e7d5e67f5fcd9b93d1eb452720cff9
BLAKE2b-256 5444a9a9b0a5a5e52065637ed97a842423d6f16d8fe6cf9c51c318c65fb56dd2

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.9.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b696b07564492db7b80533a79e298fb4fcf8ca35cad520c595fef7045507cb51
MD5 d18959a24e5e2862f0bf3983dc93b2d6
BLAKE2b-256 a213e25abdd5c157d8ed8c1e5f99ba6d741de660f22d51c24098180cf07b617e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 227.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyspnego-0.9.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 bd020e1d5b761aa668c066917e1af7a039bbe5985aeb2119ba3e2956f52ec12d
MD5 905e6b13793774c0c17de7e15d498a55
BLAKE2b-256 90a9aa9df39eb6b82b7f9088bac4bc142c67e039de7c96df1804fb1444d2c185

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