Skip to main content

Windows Negotiate Authentication Client and Server

Project description

Python SPNEGO Library

Build Status

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

Uploaded Source

Built Distributions

pyspnego-0.2.0-py2.py3-none-any.whl (121.8 kB view details)

Uploaded Python 2 Python 3

pyspnego-0.2.0-cp39-cp39-win_amd64.whl (363.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.2.0-cp39-cp39-win32.whl (343.9 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.2.0-cp38-cp38-win_amd64.whl (363.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.2.0-cp38-cp38-win32.whl (344.9 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.2.0-cp37-cp37m-win_amd64.whl (361.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.2.0-cp37-cp37m-win32.whl (341.6 kB view details)

Uploaded CPython 3.7m Windows x86

pyspnego-0.2.0-cp36-cp36m-win_amd64.whl (361.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyspnego-0.2.0-cp36-cp36m-win32.whl (341.8 kB view details)

Uploaded CPython 3.6m Windows x86

File details

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

File metadata

  • Download URL: pyspnego-0.2.0.tar.gz
  • Upload date:
  • Size: 107.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1ca9f6720da219f3f7d793a975be2c54e16509b4a85b2d85b359e96a1d7bdf4d
MD5 43b83a228b1eee6c6ee47d680470892d
BLAKE2b-256 8682949635dbbebae0fd0d75c8b392703a2f461526cb16e50466a2525a9fe663

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 121.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8691881997865882950c0843b62e4e153920e17496dd7ed58f610c06e49dfa8b
MD5 18fb66ec7de9f84bec490721a5fd3037
BLAKE2b-256 3e1d0724612b4f8aabd262098842c9e9b6d21fe581db57b49500cc8040ffb811

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 363.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a100ab53bc552a6c1f382eea0728153ef2d023176c8fc890aaeb9bee8eff7224
MD5 40c97ec7884cc3c4650912bceb626fad
BLAKE2b-256 f2001f7bb930e2a028197df93e2ad8dcf78dd56161e7a81974a05e83192a94b3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 343.9 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 14a6f7e39168748fc7a6e800449aad0a7a6317036e2a8baee5e20f6044d3115a
MD5 d1fa12e112c3b9c38934e1e8e89d3655
BLAKE2b-256 1c4561c746e108c56498e3a60401260f929ae09d8173decbb9ba4eeb4bb4dfbf

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 363.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0d9916fffee507fe38d84a86c97d687408769d079c969852da5ec866564c466d
MD5 1f7a612a33df76756da9a9afb332b891
BLAKE2b-256 d7e28ba6c96abe4299d55fe4a76820b8b8c1414566687a034843f28ffc68df1b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 344.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 617c07328241e9e6b5fc7c632c03bab16d57a048641106daeede7b58fa1eae75
MD5 2f3485fab9f37188f0dc8480ce27b6aa
BLAKE2b-256 2ca6560589a40f7b5bba7d30f057c4ce1c0f42536953f9d675fcbb131e4d0c28

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 361.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 fb4b052636be4237204272b61f6e346d9eadecc55a7e9d1ad12703a9321acd20
MD5 8e8b90bf7777715b77cb1cadd970461f
BLAKE2b-256 2750bfbb6d9622fc309d6c1d3a979eb91ca516d0dcf6b4b6414f95a4ce845460

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 341.6 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 b9fcd419ee6686a3026069b8bfa70406c821ece7d57ff4b94d4738963838b640
MD5 8a09c1ae215fb07aa7dfaa2742cda304
BLAKE2b-256 148288f0f7c7ce1f9030f56267922bf5a04b68a3e0ce07c78227661425a7ff29

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 361.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1cf02e202b4c5a56e2267d781b54bd455802acf6fd7f68eb6ea92ed7610b3689
MD5 0c272d6fd19fa431606d117d230297be
BLAKE2b-256 bf8b8499b46002a5a2ded9ca9d940bd62ae72b472717c6a622d640ac54565b40

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.2.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 341.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for pyspnego-0.2.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 0d0946a8972bf8409ff79e24ca2c7aecf82e097f9d3f13571b92493869a5e08e
MD5 1f51a9dfff6774fc9b72214e366427ef
BLAKE2b-256 2be8d216404fc980d5d72c63c1eb4c1cd8412c3562dc3cb7387dd5397d8bfce6

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