pyspnego


Namepyspnego JSON
Version 0.10.2 PyPI version JSON
download
home_page
SummaryWindows Negotiate Authentication Client and Server
upload_time2023-10-03 16:48:22
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2020 Jordan Borean, Red Hat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords windows spnego negotiate ntlm kerberos sspi gssapi auth
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Python SPNEGO Library

[![Test workflow](https://github.com/jborean93/pyspnego/actions/workflows/ci.yml/badge.svg)](https://github.com/jborean93/pyspnego/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/jborean93/pyspnego/branch/main/graph/badge.svg)](https://codecov.io/gh/jborean93/pyspnego)
[![PyPI version](https://badge.fury.io/py/pyspnego.svg)](https://badge.fury.io/py/pyspnego)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jborean93/pyspnego/blob/master/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](#how-to-install) for more details

* CPython 3.8+
* [cryptography](https://github.com/pyca/cryptography)
* [sspilib](https://github.com/jborean93/sspilib) - Windows only

### Optional Requirements

The following Python libraries can be installed to add extra features that do not come with the base package:

* [python-gssapi](https://github.com/pythongssapi/python-gssapi) and [pykrb5](https://github.com/jborean93/pykrb5) for Kerberos authentication on Linux
* [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) for YAML output support on `pyspnego-parse`


## How to Install

To install pyspnego with all basic features, run

```bash
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

```bash
# 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

```bash
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](docs/examples) 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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyspnego",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "windows,spnego,negotiate,ntlm,kerberos,sspi,gssapi,auth",
    "author": "",
    "author_email": "Jordan Borean <jborean93@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3a/c3/401a5ae889b51f80e91474b6acda7dae8d704c6fe8424fd40e0ff0702812/pyspnego-0.10.2.tar.gz",
    "platform": null,
    "description": "# Python SPNEGO Library\n\n[![Test workflow](https://github.com/jborean93/pyspnego/actions/workflows/ci.yml/badge.svg)](https://github.com/jborean93/pyspnego/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/jborean93/pyspnego/branch/main/graph/badge.svg)](https://codecov.io/gh/jborean93/pyspnego)\n[![PyPI version](https://badge.fury.io/py/pyspnego.svg)](https://badge.fury.io/py/pyspnego)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jborean93/pyspnego/blob/master/LICENSE)\n\nLibrary to handle SPNEGO (Negotiate, NTLM, Kerberos) and CredSSP authentication. Also includes a packet parser that can\nbe used to decode raw NTLM/SPNEGO/Kerberos tokens into a human readable format.\n\n\n## Requirements\n\nSee [How to Install](#how-to-install) for more details\n\n* CPython 3.8+\n* [cryptography](https://github.com/pyca/cryptography)\n* [sspilib](https://github.com/jborean93/sspilib) - Windows only\n\n### Optional Requirements\n\nThe following Python libraries can be installed to add extra features that do not come with the base package:\n\n* [python-gssapi](https://github.com/pythongssapi/python-gssapi) and [pykrb5](https://github.com/jborean93/pykrb5) for Kerberos authentication on Linux\n* [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) for YAML output support on `pyspnego-parse`\n\n\n## How to Install\n\nTo install pyspnego with all basic features, run\n\n```bash\npip install pyspnego\n```\n\n### Kerberos Authentication\n\nWhile pyspnego supports Kerberos authentication on Linux, it isn't included by default due to its reliance on system\npackages to be present.\n\nTo install these packages, run the below\n\n```bash\n# Debian/Ubuntu\napt-get install gcc python3-dev libkrb5-dev\n\n# Centos/RHEL\nyum install gcc python-devel krb5-devel\n\n# Fedora\ndnf install gcc python-devel krb5-devel\n\n# Arch Linux\npacman -S gcc krb5\n```\n\nOnce installed you can install the Python packages with\n\n```bash\npip install pyspnego[kerberos]\n```\n\nKerberos also needs to be configured to talk to the domain but that is outside the scope of this page.\n\n## How to Use\n\nSee [the examples section](docs/examples) for examples on how to use the authentication side of the library.\n\n_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._\n\n\n### CredSSP Authentication\n\nSince version 0.2.0, pyspnego can be used for CredSSP authentication. While this isn't part of the SPNEGO/Negotiate\nprotocol it uses common features and code like ASN.1 structures and even Negotiate auth as part of the CredSSP process.\nBoth `initiate` and `accept` usages are supported when specifying `protocol='credssp'` but there are no guarantees the\nacceptor is free of any bugs so use with caution.\n\n\n## Backlog\n\n* Add support for anonymous authentication\n* See if `pywinrm` wants to use this\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Jordan Borean, Red Hat  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Windows Negotiate Authentication Client and Server",
    "version": "0.10.2",
    "project_urls": {
        "homepage": "https://github.com/jborean93/pyspnego"
    },
    "split_keywords": [
        "windows",
        "spnego",
        "negotiate",
        "ntlm",
        "kerberos",
        "sspi",
        "gssapi",
        "auth"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ccfd06a7618de50ad13b7e85115bd1e42c1625e3365313a4c971898386781f89",
                "md5": "0eaefbe561f4a1c6a06a1a6f477e5100",
                "sha256": "3d5c5c28dbd0cd6a679acf45219630254db3c0e5ad4a16de521caa0585b088c0"
            },
            "downloads": -1,
            "filename": "pyspnego-0.10.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0eaefbe561f4a1c6a06a1a6f477e5100",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 129852,
            "upload_time": "2023-10-03T16:48:20",
            "upload_time_iso_8601": "2023-10-03T16:48:20.847059Z",
            "url": "https://files.pythonhosted.org/packages/cc/fd/06a7618de50ad13b7e85115bd1e42c1625e3365313a4c971898386781f89/pyspnego-0.10.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ac3401a5ae889b51f80e91474b6acda7dae8d704c6fe8424fd40e0ff0702812",
                "md5": "b633cab73a1481c5dbc2d6f6857569d0",
                "sha256": "9a22c23aeae7b4424fdb2482450d3f8302ac012e2644e1cfe735cf468fcd12ed"
            },
            "downloads": -1,
            "filename": "pyspnego-0.10.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b633cab73a1481c5dbc2d6f6857569d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 222036,
            "upload_time": "2023-10-03T16:48:22",
            "upload_time_iso_8601": "2023-10-03T16:48:22.442677Z",
            "url": "https://files.pythonhosted.org/packages/3a/c3/401a5ae889b51f80e91474b6acda7dae8d704c6fe8424fd40e0ff0702812/pyspnego-0.10.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 16:48:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jborean93",
    "github_project": "pyspnego",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pyspnego"
}
        
Elapsed time: 0.14062s