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

Uploaded Source

Built Distributions

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

Uploaded Python 3

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

Uploaded CPython 3.11 Windows x86-64

pyspnego-0.9.1-cp311-cp311-win32.whl (226.5 kB view details)

Uploaded CPython 3.11 Windows x86

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

Uploaded CPython 3.10 Windows x86-64

pyspnego-0.9.1-cp310-cp310-win32.whl (227.8 kB view details)

Uploaded CPython 3.10 Windows x86

pyspnego-0.9.1-cp39-cp39-win_amd64.whl (246.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyspnego-0.9.1-cp39-cp39-win32.whl (229.8 kB view details)

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.8 Windows x86-64

pyspnego-0.9.1-cp38-cp38-win32.whl (230.2 kB view details)

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.7m Windows x86-64

pyspnego-0.9.1-cp37-cp37m-win32.whl (227.3 kB view details)

Uploaded CPython 3.7m Windows x86

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.9.1.tar.gz
Algorithm Hash digest
SHA256 6eea64f511bdfa192c2f80593ddf124258b0ea560327468953d18420e0ab3597
MD5 7e8628f29501828a8850939ad50ee3e4
BLAKE2b-256 fb3846174701e2a2de8b72e79c980324b034203edafff3c543a4134b2c1ae9af

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6aebe1fdc3990be2c137f3c3e041062243871b8161bc7adf4d269c3b6deda35
MD5 66ae3f102dced5453a0bc71d18af0d95
BLAKE2b-256 81843b3200982e993a197dc3a1f6f7a900d8cd545250d9c382cb6c8cf9f02463

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-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.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e7a92321272e3613c30f55a3324ef6d780bba8b723be8d50c35aac8409fc4028
MD5 bc171049f64754285289e3c2fef043e9
BLAKE2b-256 2cb2517386c6feccca5147c46a91a5a257c75f9cd00460e8ec459df917365066

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp311-cp311-win32.whl
  • Upload date:
  • Size: 226.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 58a17f7ba17f6cee72149911df6cc785ce7072744a386483957b74c62da654d8
MD5 989bd161d159239f284fa550860def9e
BLAKE2b-256 0ab86beb4175d3893052aef79126c6f15e49055482ad99bbf971ed4ca310b96e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-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.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d031a7fa9c9ab3b67725e35affc90f8e6504518fb3ffe21573504e72b5a2fb5e
MD5 c4dbdd7d2b5df232fbd2a9da6d49e9b3
BLAKE2b-256 88a1b66742a05d341224fb6aa29fc925c80d8be6aecaa21c6694b4c4efcdb53f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 227.8 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 aa43f00ed1c3b8e16a658613e2557a3ff9bea26acef867705eb4ee7f5e469ac3
MD5 6c7a8206973289445f01c0cc52fa9731
BLAKE2b-256 4fbfbb3e8333cbd89cd00fc51e12880aeef2163911662a4790c09c0fec4d2774

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 246.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4b79d5ba55ada38833d2421c44ed30a7313c00cbf34fa919dd106049616307d3
MD5 ec0da3f2d0fd4f7c213b62b07506a99c
BLAKE2b-256 fa0725dd6f020a281256b7d69685016e7e1f2f24f19985615d82e84d6bf39272

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 229.8 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 07417f90328fb57c19a383e59b65060d4fc101441b74c34dbe4ba860775b0a3a
MD5 3baf53505d7b98cc2a6021a98da6fe2c
BLAKE2b-256 bf614c0a5323eab384f157c3a12de47e29de55fa9216b3176a41f94124e18b25

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-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.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6366e39ba251889e2573c7d037e7feec8af86aea6c3b32f22a8af33bf88265b6
MD5 f06203fef29d823c4f91a8267a5e9d06
BLAKE2b-256 721b6beacfeef9cbc04479670ec9c4ac3c5bd3f808f2232076a412cef14680e7

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 230.2 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 7515f00418324809eb1adec0afac93da006c03baba6c6fd1a981b5401b798f56
MD5 24e8bec34299396d4f78e04a67a04e8e
BLAKE2b-256 ef715b6455012a8b167ae251256f03fa368b05b2ad773a0312a4b0587af636e6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-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.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ff4fecf488369d6634afb20f9e56eb3b187fb3c883d6551601bbad4f4badab62
MD5 1a2bc483a5c16fad77ede4ff1355d193
BLAKE2b-256 be866c3c258d3298d4cc91b19ccd9016333ef0bddf7cbf941df3baad8c98b80c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pyspnego-0.9.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 227.3 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for pyspnego-0.9.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 87a2c23e640f4f6ae3c391d1f56e287b72908080a0e6376f2f365da5a2117dca
MD5 bf4030a67b1d67146c537521b9601e32
BLAKE2b-256 905c9b8966572cabef14050a37999972ce2f40bba0f568095c69de19b4eed3c8

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