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

Uploaded Source

Built Distributions

pyspnego-0.5.3-py2.py3-none-any.whl (124.1 kB view details)

Uploaded Python 2 Python 3

pyspnego-0.5.3-cp310-cp310-win_amd64.whl (233.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.5.3-cp310-cp310-win32.whl (217.7 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.5.3-cp39-cp39-win_amd64.whl (235.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.5.3-cp39-cp39-win32.whl (220.0 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.5.3-cp38-cp38-win_amd64.whl (236.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.5.3-cp38-cp38-win32.whl (220.6 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.5.3-cp37-cp37m-win_amd64.whl (232.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.5.3-cp37-cp37m-win32.whl (217.3 kB view details)

Uploaded CPython 3.7m Windows x86

pyspnego-0.5.3-cp36-cp36m-win_amd64.whl (249.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyspnego-0.5.3-cp36-cp36m-win32.whl (226.9 kB view details)

Uploaded CPython 3.6m Windows x86

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3.tar.gz
Algorithm Hash digest
SHA256 416fd2d67e82b44ba3d2d9062485056e4dde3c141630170e9190379d6b19972a
MD5 4ec9b2c92ad66a0ed6030293e3947306
BLAKE2b-256 b6d6e746aae9fc4d8bbb5a0e2505636de6b5a92e94a6e4c1cd1a032f4272e491

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.5.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 124.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyspnego-0.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2abca03b6d3c71d7ec9678c7b2220d99d9a29ef204b4c52549080169e586310
MD5 3e84a5ea5b7c7db044913304c5d814de
BLAKE2b-256 8ec1be4d94d43f68405c836b7c39c1435f1a891476aba1960134ebf8a2829bb9

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7320539f45da463029e12f3742102085d2a0343bfe77ac550c11d2fdac1d34f5
MD5 19ca299e3d1e8f7108e5cc2d239eaf80
BLAKE2b-256 9c40395d1bb4dc3478873f11aaaadf58b2abca26f82009ba28c5fe990d1bee8c

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 4d1ea987b9c2539457235793014e0d9c5e4766da9e4e028d4b6b596cfbe53828
MD5 23e53c3fab2f77acbde3b8aaa9d10c2a
BLAKE2b-256 0bc11d84eaf974663770d8bc5b568d6a0949c090516e0386ed505468dcd2887a

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1ee612f20c843365fbc6cf7f95c526b4ee8795281641a9bb87083622a2f87939
MD5 7e3626c2f875f28b26ad6d5c7575c39b
BLAKE2b-256 5610d3e9abfe19b56caa29e8616028cfc6381eb2b0b1b095e5d34ab7450c0404

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 77b86002082f278c3f5935d8b428a0d0659ea709e305537294ba95fc49907339
MD5 16a09ba24ac606b9cf781d783a525987
BLAKE2b-256 40b1d7e7c85961a7cdfc488bf5828fb4964d9398be3ffff78ae5f7237990bb68

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f4784d9f8e9c50a36109d715a140150add1990fce16805a56217e8ccaf69d234
MD5 1f7e2057bc8adfafbbadd99929965bd9
BLAKE2b-256 fcd2a0a21677e6e2ee5925b4f70ff9bb0e9609df3423ef1a6947612d712b2dfc

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 725df2030e5d1b1155bb696eca3d684f403164da8e6a6b0bee3eb02f8748f72b
MD5 66909f0a881232da4db6a5d98ab7012f
BLAKE2b-256 0ff3acfc15ba4bcb62eda43ce126c8fa7dd020fc135b88646b0ef9747572c169

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e6645107f200fb7bf6698512d04ea0790b292028861ce169eb97e5ad8eba14ed
MD5 96d761d529424b5c0318cccb1b547013
BLAKE2b-256 1694a7744b601787df3c1ffd753493a329cf9212d91ef7995ec479f58d8f7ade

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 4c1be83e0aca12d64f5eec638259c77eaa8bf552c89ac69f0af2322a3be9afeb
MD5 fbabacd583326ec5bf8aeee2c7961cb0
BLAKE2b-256 d5d5413bafdf31f3e1c46f45b48fdba5f3695867d3046aa4be3ede645aa5737e

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.5.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 aa93d94775d01bf70d16840426d1ddd58c11a6a71c4d0d1d7e529ad541fa0a60
MD5 f26526045e626db145c9959f76f191b9
BLAKE2b-256 cf88eac7f0b563eef5b11696e77fd648d4a863cfa3ce7c6418f6c585caf4afeb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.5.3-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 226.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyspnego-0.5.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 284ca7a6218344bb90aeae02fb1d2ed73e5c991d6e4c16c0df404aeab5eb58a3
MD5 a119c74aa71b025a60ac238e72ba4d0c
BLAKE2b-256 12f0938ada50fe8bea9ee5e257b833a2b67fef5580a9d9014d9ef294b21634a7

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