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

Uploaded Source

Built Distributions

pyspnego-0.8.0-py3-none-any.whl (130.7 kB view details)

Uploaded Python 3

pyspnego-0.8.0-cp311-cp311-win_amd64.whl (239.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyspnego-0.8.0-cp311-cp311-win32.whl (224.3 kB view details)

Uploaded CPython 3.11 Windows x86

pyspnego-0.8.0-cp310-cp310-win_amd64.whl (241.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.8.0-cp310-cp310-win32.whl (225.6 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.8.0-cp39-cp39-win_amd64.whl (244.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.8.0-cp39-cp39-win32.whl (227.5 kB view details)

Uploaded CPython 3.9 Windows x86

pyspnego-0.8.0-cp38-cp38-win_amd64.whl (245.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.8.0-cp38-cp38-win32.whl (228.0 kB view details)

Uploaded CPython 3.8 Windows x86

pyspnego-0.8.0-cp37-cp37m-win_amd64.whl (242.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.8.0-cp37-cp37m-win32.whl (225.1 kB view details)

Uploaded CPython 3.7m Windows x86

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e0499cc066c56762f8a315bb053243d34240cb85e384afc6b87b4fa0142543df
MD5 33e8dd703ac6310d4eb09ced3a7d3fe5
BLAKE2b-256 97b72ca5b546fc91d6c41e1796e49d0615fe7dfb4845d088da8a938934b3d63c

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55b9bc76efb2ef335640f1bfe6922651c31d21a4c989b0def889eaa2f4865711
MD5 600d9cb8db063a8210f90a42025b839f
BLAKE2b-256 3ef835c3ff144c803536c61acecc24dfdb68ffe83f65f4ad82b125491dc8056a

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ff546dc4a56c92aae253c04c8999baf4357919a523665c8daa65788567a52fe3
MD5 87ea244ac8e512837bc6b6d50bfbba2d
BLAKE2b-256 67cc338662c3f33fc63cf636f3f5cd2bd3b711322b3fa4a50621c20a15221bdb

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 e15d7ecf70cb70f09ec80a7efd57086886380dcfbe0c31b1808f3349484f0b96
MD5 93547da72bbab59accd1b0ad7ce15432
BLAKE2b-256 ad41f74291f9f82c9b6159641496613577c4021e35d7033f936942ec4630b891

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2df21796b15e73b99a4b4bbe91e4ecd3fdaa888b7255c4ab697ccb6615dbd6e3
MD5 a20559d94fee4e9e2f725bab3a2a7a12
BLAKE2b-256 18fbabe161133e5b8cff5a6b7a9087ff8b3840cbe154eeb7c6f06aa2750acae2

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9dbbd3aec5240aa8b75a5baa0b8a78d3b4ec16638c5fe299cd849b2390cfd2ec
MD5 bd6538d7c876dda473086bb61f463872
BLAKE2b-256 2ed35fc8a12ba6c0ead1b46de3e2c620d09791db5f6920f897dd8add40af5509

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e2faff077fe942ed7169bd6c84c9396f259f50069237d93de12a5bd5e11bb445
MD5 cc73ec75a6ddd87c92999f07c47c3b09
BLAKE2b-256 eb087e0b62929241dd3e6ee50ed1a74fb15acf5d3abe41f946ba0c7de0b6a403

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 3e49fddd34c19d6bd1d534501769de5e2b0716ce9b6f26d50f2f0600158780c9
MD5 6bad910ba1c508979dfec9dba1edc0e1
BLAKE2b-256 826c3b24c88d25f339dae8d778510d2d7a741ce1dc6a9556fdbcd441e13e7446

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 92501106898b4fa60f454dc9445b8006c133e177c859d49b3c7f260985449cad
MD5 6e70f3838232c3e80b4d2412178a4804
BLAKE2b-256 2a106f849adca8af000b2d9dcc54b6fa446879ea0642000ad8ea6d5e4637b921

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 cf8bd2bd2cadc825e7fc7ff86a57eb158d898d30c0f7670940178c48ebe78e31
MD5 aec6fc877ecea19364f0fb3f2ca3fde6
BLAKE2b-256 f5458e56c2ceeee066ace3c8c8c1baf1b1f80d9433b9788795f30cc4a7707b49

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1f76a924866040cece4600e1973bfdb20656f9a3ceb2935ed6be1f932c990b19
MD5 39e65b096e693bed2ac2a3e8439e883b
BLAKE2b-256 1a57ce189ed91089e0da2b2936a600f4091174a9249e88c4be53eb781488f287

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.8.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c3cb9d9da79f1d38e8a268988c5af7520f25dc8f6c7bc97444260f8ce3d1efe9
MD5 986014916bd62a90d94cc1baae1e3fd1
BLAKE2b-256 eb7060c131b941aa232e6e741497303b6f9b56aae3851b5b5b8ed3573d733217

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