Skip to main content

Python SPNEGO Library

Build Status codecov PyPI version License

Library to handle SPNEGO (Negotiate, NTLM, Kerberos) 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 - Python 2
apt-get install gcc python-dev libkrb5-dev

# Debian/Ubuntu - Python 3
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.

Backlog

  • Add support for anonymous authentication
  • See if pywinrm wants to use this

Release files for pyspnego 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyspnego 0.1.6
File Size Uploaded
pyspnego-0.1.6.tar.gz 94.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyspnego 0.1.6
File
pyspnego-0.1.6-py2.py3-none-any.whl Python 2, Python 3 none any Details
pyspnego-0.1.6-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pyspnego-0.1.6-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
pyspnego-0.1.6-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pyspnego-0.1.6-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details
pyspnego-0.1.6-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
pyspnego-0.1.6-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details
pyspnego-0.1.6-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
pyspnego-0.1.6-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details
pyspnego-0.1.6-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
pyspnego-0.1.6-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
pyspnego-0.1.6-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
pyspnego-0.1.6-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details

Total release size: 4.2 MB

Release files / pyspnego-0.1.6.tar.gz

Download URL pyspnego-0.1.6.tar.gz
Size 94.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0356bccedc033b7266d89503eca50717f81fc9d3b98cb1dd5227bb7c1a9275ae
BLAKE2b-256 checksum
How to use checksums
31671e34ece99b804bd26b0043d584ffb5bc789e34001ac1612eeb073b5c283f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-py2.py3-none-any.whl

Download URL pyspnego-0.1.6-py2.py3-none-any.whl
Size 107.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5be3fa80bc81a11b9254e3800aa350db06b2eb1b9d830f7770a1baadae415185
BLAKE2b-256 checksum
How to use checksums
a217ac83738eb7eb1cad20ba12d78b39f1b3fd886e2a21ee786f98785aaeb513
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp39-cp39-win_amd64.whl

Download URL pyspnego-0.1.6-cp39-cp39-win_amd64.whl
Size 348.0 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
5701dd50597c0a11b4bd1d3921fd1c32ba3b7ec15c3e273c486870efe673dd52
BLAKE2b-256 checksum
How to use checksums
7915fac460763d2afa6234d144222342a0182ff9955fa98f79e5e4844e40652a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp39-cp39-win32.whl

Download URL pyspnego-0.1.6-cp39-cp39-win32.whl
Size 328.8 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
83d52b9e8b55243fa3711d89e77d94935a60b8638e8659b572dee898d359bbe6
BLAKE2b-256 checksum
How to use checksums
2427428769cd2080ef6965fdd2d4a5b8713bbf75841a2d0935c408a793421539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp38-cp38-win_amd64.whl

Download URL pyspnego-0.1.6-cp38-cp38-win_amd64.whl
Size 348.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
cc57132ebe7b6b5d14e940bf4069a1206ad0fe23f51281dee4e7979b34a369d3
BLAKE2b-256 checksum
How to use checksums
80e11a9ae91511f28a7f60e7c1e62b023e7942a25b921da18c1891e350d5fc14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp38-cp38-win32.whl

Download URL pyspnego-0.1.6-cp38-cp38-win32.whl
Size 329.7 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
ed4fece1a834cc29377f43f4ff459ae7eb7c7d937cfd3e4b46676fe9984c8c74
BLAKE2b-256 checksum
How to use checksums
ba38ae4e27692761ad670fa45d49af9f34935bf6e8d4d0cb585d7b7ad868fbaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp37-cp37m-win_amd64.whl

Download URL pyspnego-0.1.6-cp37-cp37m-win_amd64.whl
Size 345.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
d3e7d55447cc353765cef6d77b3c57fd02f77ddc83a4fb3b4b696df92f908ae1
BLAKE2b-256 checksum
How to use checksums
295dd4493540550ccd2ed3f53f009faacaddc6d02bb2a31ba368931aceb19174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp37-cp37m-win32.whl

Download URL pyspnego-0.1.6-cp37-cp37m-win32.whl
Size 325.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
0940e0bdec72c6266ef9604db929ddda86f1dafe2c804ac3d6e30161a53e414d
BLAKE2b-256 checksum
How to use checksums
a9046a80d51025a77039222f38ff1c3883a67e710c99a95a5ac163f43f210fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp36-cp36m-win_amd64.whl

Download URL pyspnego-0.1.6-cp36-cp36m-win_amd64.whl
Size 345.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
e021472424fcb477d9a211437f6a14c2d9cb59e20eeee9ae7992bd7deee50064
BLAKE2b-256 checksum
How to use checksums
7f0df182695de063ad3621e4e5cdb4ad028b981fa5478696d7ea0d0ea39673ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp36-cp36m-win32.whl

Download URL pyspnego-0.1.6-cp36-cp36m-win32.whl
Size 326.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
507809d2e1fc8733a4f0801ee59d01db646b41d3ab8b90a6f3a16a17eef3fc37
BLAKE2b-256 checksum
How to use checksums
5d1cb36e16988e8edb3a3225541de1632e362e3c860bc3e1d1e078b50b521999
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp35-cp35m-win_amd64.whl

Download URL pyspnego-0.1.6-cp35-cp35m-win_amd64.whl
Size 343.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
777c9524e91298b2ec3d728dbb85e44d047ddd857db6c2658d977401fedfcc9c
BLAKE2b-256 checksum
How to use checksums
0cc395c1331206ce5a1cf3b7483cbcadd0b3a699ad1bff3fd729731190f0899f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp35-cp35m-win32.whl

Download URL pyspnego-0.1.6-cp35-cp35m-win32.whl
Size 324.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
c05aa1efcb9b0cf3c6341c48a6b349c3b669b0d7d99ab65a789c0c1071701136
BLAKE2b-256 checksum
How to use checksums
9283c05b8a71ad12747a7e293e1fe311821a1cfcb84ede04f0bf874f674f8d4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp27-cp27m-win_amd64.whl

Download URL pyspnego-0.1.6-cp27-cp27m-win_amd64.whl
Size 333.5 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
44469f7cf2a9435d7115c557db4df6bd6a74ce0056511b88b672b58ff2d477f7
BLAKE2b-256 checksum
How to use checksums
8a624fcca498099892d361a998050fcc6d9b64560b177bd93ff10b14f04c91c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release files / pyspnego-0.1.6-cp27-cp27m-win32.whl

Download URL pyspnego-0.1.6-cp27-cp27m-win32.whl
Size 318.6 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
f90a41f7d31e049f3a2e566f02ce06d86f13bbd2e3796b3af3bdb2be75c6e836
BLAKE2b-256 checksum
How to use checksums
ceacf3c8c9b796feb13bd5c9b6453e79af5212d9fa6690ea6f972ba5e53dfe4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release history Release notifications | RSS feed

0.12.2

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.2

14 release files

0.9.1

12 release files

0.9.0

12 release files

0.8.0

12 release files

0.7.0

12 release files

0.6.2

12 release files

0.6.1

12 release files

0.6.0

10 release files

0.5.4

12 release files

0.5.3

12 release files

0.5.2

12 release files

0.5.1

12 release files

0.5.0

12 release files

0.4.0

12 release files

0.3.1

12 release files

0.3.0

12 release files

0.2.0

10 release files

This release

0.1.6 This release

14 release files

0.1.5

14 release files

0.1.3

14 release files

0.1.2

12 release files

0.1.0

12 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page