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

Uploaded Source

Built Distributions

pyspnego-0.6.3-py3-none-any.whl (124.9 kB view details)

Uploaded Python 3

pyspnego-0.6.3-cp311-cp311-win_amd64.whl (233.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyspnego-0.6.3-cp311-cp311-win32.whl (218.1 kB view details)

Uploaded CPython 3.11 Windows x86

pyspnego-0.6.3-cp310-cp310-win_amd64.whl (235.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.6.3-cp310-cp310-win32.whl (219.4 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.6.3-cp39-cp39-win_amd64.whl (237.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.6.3-cp39-cp39-win32.whl (221.4 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.6.3-cp38-cp38-win_amd64.whl (238.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.6.3-cp38-cp38-win32.whl (221.9 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.6.3-cp37-cp37m-win_amd64.whl (235.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.6.3-cp37-cp37m-win32.whl (219.1 kB view details)

Uploaded CPython 3.7m Windows x86

File details

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

File metadata

  • Download URL: pyspnego-0.6.3.tar.gz
  • Upload date:
  • Size: 200.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3.tar.gz
Algorithm Hash digest
SHA256 6060a0e683171090adcf92c9d319ddd334f15117fa199a703d8c9bd094d9f6c0
MD5 67114f5e59c6d5b45fe2b38c128c2140
BLAKE2b-256 ba137b4e7dcff1eb24a13e0a631a4b49eab361678e4490d691c03253ae736da4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 124.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0467587438002274790af754fdabf5f4023529444181ef40aa05a9808c35a222
MD5 16898d73a2614c7f8bb64c38ff21908f
BLAKE2b-256 05e74ce711f6fccb967a04846ba70ca2ff515c24205594b473e72838da8ca881

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 233.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dac7325615ac4e3fafa0fd756f6b7dc38c07e5f86cf99af70e2a6abd2238ddcc
MD5 957e76a57d131384b27ceffe08e4d0ca
BLAKE2b-256 393d7d9bc147b5eddfa7bda0ddfba9fce83e8ec4327ad0c83ea357d9d8e819d1

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp311-cp311-win32.whl
  • Upload date:
  • Size: 218.1 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 74a1122dda12fbd08c670d37f64183d97cb1479ea866472b28dcf86d3aa3f375
MD5 aed85cc0cc2f4089639cade4976a1cf4
BLAKE2b-256 06bf878b155b48923ac85154679b28ae7685f5587845b934b711e1af4a122f67

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 235.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 097f57f0826e43e1062bf2b1ef019fdc0921a78cf231baa55a545ffe486fa757
MD5 1f1cde78cbfb82c5fbd4a4a76435f507
BLAKE2b-256 4e592ec2fe19d5bda7939bb21ff0dffde104d6774ffc0fb753c41a245fb1c1cc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp310-cp310-win32.whl
  • Upload date:
  • Size: 219.4 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 ac883b4a15a0a9a5a4189f64ddec2f81b6b0024eec949dd37bdd2110c49e04bd
MD5 eb1ad4468204f50893bb5477ff98531c
BLAKE2b-256 966a0d19409dd718222c06f9a2e56b57d182ddcc93d74bf193d006d59cae2993

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 237.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf19490c20215da0a00563741566b1a5efc36fa4cdfeac15edf2fe7529d5bff5
MD5 bb40442b3c62d2f2c721996f3aa94d46
BLAKE2b-256 53e3f67a6a994dc9a45e777b228216c76afe44423b9f8e44e85280bbe41855a4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp39-cp39-win32.whl
  • Upload date:
  • Size: 221.4 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 c37a540ba386ee2e3eabe5ea0a8d8087f94f30ddf78a1dcb8121c37414ebb23d
MD5 50f48fa212d57a17ea7b28eef894de24
BLAKE2b-256 e0f8c2ead37e4b19f06be248a4ddfa34fadf9545d203ca9a2cb90e3d96630848

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 238.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4e81a004ec14bb2c05a5006c789d2c394b4f4296e60ed06a14904110ee2bb30c
MD5 59dba2f7576cd89622dff8c08360304a
BLAKE2b-256 0c124f3abf2f61f7f948f540889911b8c0f7d7528bfc8ea1572b5c8c793285d1

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp38-cp38-win32.whl
  • Upload date:
  • Size: 221.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 c899f1217f1793d4dc90a39eed4144cffd1c144defeccf362f7d854923a8f8c2
MD5 55f82844fef673298fe0820fabb7bef9
BLAKE2b-256 d964fa108f09de09383f6899041aa0132f2efc657a76fa8627d314247a5b6bfc

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.6.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 952e00690c1bbae94b6b3a27edcdd18d68a25e4f7164e026da173b1827860262
MD5 3d2fec95e6a79f184c80cc6c19d7c266
BLAKE2b-256 d9c984894e3956e2cb917efd3aa99fc788168c4480a27ac1bc4e891c9a8a40e0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.6.3-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 219.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pyspnego-0.6.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 f8ec0cf43eab661c326a5bb2b62a8f9172eb412877cc00ad0e025b1e78c9881f
MD5 05ae54205e390bf8a0ae5cdca01b1f4a
BLAKE2b-256 3cae47026bfe3b45c57670b5e978b90ebf487a35ced87bfc5f501b91dd47fce1

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