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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyspnego-0.7.0-py3-none-any.whl (130.1 kB view details)

Uploaded Python 3

pyspnego-0.7.0-cp311-cp311-win_amd64.whl (238.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pyspnego-0.7.0-cp311-cp311-win32.whl (223.3 kB view details)

Uploaded CPython 3.11Windows x86

pyspnego-0.7.0-cp310-cp310-win_amd64.whl (240.3 kB view details)

Uploaded CPython 3.10Windows x86-64

pyspnego-0.7.0-cp310-cp310-win32.whl (224.6 kB view details)

Uploaded CPython 3.10Windows x86

pyspnego-0.7.0-cp39-cp39-win_amd64.whl (242.9 kB view details)

Uploaded CPython 3.9Windows x86-64

pyspnego-0.7.0-cp39-cp39-win32.whl (226.6 kB view details)

Uploaded CPython 3.9Windows x86

pyspnego-0.7.0-cp38-cp38-win_amd64.whl (243.8 kB view details)

Uploaded CPython 3.8Windows x86-64

pyspnego-0.7.0-cp38-cp38-win32.whl (227.1 kB view details)

Uploaded CPython 3.8Windows x86

pyspnego-0.7.0-cp37-cp37m-win_amd64.whl (241.1 kB view details)

Uploaded CPython 3.7mWindows x86-64

pyspnego-0.7.0-cp37-cp37m-win32.whl (224.2 kB view details)

Uploaded CPython 3.7mWindows x86

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0.tar.gz
Algorithm Hash digest
SHA256 da78096fd7c9f40e716f6fbe3e30d913103d75fd676f839f98fc3a6fee92fbe3
MD5 93ab1a088d65e6a7c97efdb567ba37b0
BLAKE2b-256 97f3bdf3cd5f4c5a1bf9e1d4bb771c133850ee08241c18cafd90a6d872937a9f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a35976b59e226e6166a69398240edee688ad40c96d5afdc0e07ac1f09fcc5830
MD5 a96d794d4d5aac388353189a24ae6b7a
BLAKE2b-256 ae8f5310e54388fd1a1f484880d36ff181a6eaaabe5cc2d3663e3e5d5dbf0d15

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6cc0bab3737f1323dc9ebc0ca49b48ded6a09009643424f471a909083d298dbf
MD5 c7a8ed9e7838c3f8b36af65d99a1eb8c
BLAKE2b-256 75378f7016ee75c6adabb9173d79afc0c8f27bfa372df3508f5bee65f1674531

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f951ad694b4cc166932736be2756fa84c4dfbda9c4b30733d9fb62464f898f29
MD5 9dba952e83ad90340cb26f8b81332455
BLAKE2b-256 557596310776fc7350a94ce0f8e169b6da90b5b360005ebd4c32f3a21ef7e82a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 247e2d6ad6a6eaeaa6c9239a167ccf8d8c3b3322c684c90c03e6e18504c61d3a
MD5 1b1cb650e8e99abe3ca0ace091ad0a9d
BLAKE2b-256 57a85bed8d9f200305832a9d5a0debed0d917a43182936cbcef5adff2a30c99c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 e6e9664123d5521ecd21c32322f8ceb1575c8282b2f838beb33484ebaf2e66f9
MD5 16b0154e3974d713fab835269e11221c
BLAKE2b-256 9ad5d2ffb8d55f07c2495b244401c2bed7887a6a0eb88faea5ea2290595715fe

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0f43048a26a0c2c9edd8f3906f519022fcc5ae2baac1d2a65cdf9434ce0b761a
MD5 91c095a49fc4c39e90608aede37456de
BLAKE2b-256 a72d711fb0566d619fdee097ef9cf248aca2f258d6188c6c39af1485e2ed6af3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 65705b3763dc696358a5d6f9c74398afe37824a739e110b2b61ab731d617ff75
MD5 17d5299c6b0a2ddbd94890854bb4b0cd
BLAKE2b-256 af408c7c9a5a1f3d8b6b2c950cc2cc303451873916dfd1d39e6ef2068d898eee

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5eb034dc30eba0ec85e9ba02ef7b7d26df8804027ea95e5280838919b5ceecdd
MD5 57c2a8d552c56e759b7a8fdfca5cac58
BLAKE2b-256 4b3e265a372ed06525d29000183f32f0ed3d6d944a5873488dbb8b0201f4dd9b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e7dfcc0c780de04273655a9c3f62ea09e24cd5cd401fe0039eac553b0732e362
MD5 f7525384580d2b9bee89beabc4938768
BLAKE2b-256 0dcd430dd60955b15b11be15482cefd308812ce7ea4e8400c4d8344a9ffdf248

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 64c665f1e88a07cc25b680a475755a393df2b6b2bb62b75b2e79d7059b056109
MD5 d60b1e9ce42519d1d158dd2c242b7be7
BLAKE2b-256 93e5336a1abb55927772aa5d600e64811277ac1fe01bd3304e99711bb2340f63

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyspnego-0.7.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 99c8fb4f4b859ae297c2f6cfed1511e46df574974a556c98a15c004251be0bec
MD5 8271f09981dd164556eb8eb42aff27f2
BLAKE2b-256 a4ec310971b5a2ad1a26ba6f49d02e12a2ab882777386769a4b4d0516f799dff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page