forked from pool/python-pyspnego
* Add `usage` argument for `tls.default_tls_context` to control whether the
context is for a initiator or acceptor
* Add type annotations and include `py.typed` in the package for downstream
library use
* Expose the `ContextProxy` class for type annotation use
* Added `get_extra_info` to `ContextProxy` to expose a common way to retrieve
context specific information, this is currently used by CredSSP to retrieve
* `client_credential`: The delegated client credential for acceptors
once the context is complete
* `sslcontext`: The SSL context used to create the TLS object
* `ssl_object`: The TLS object used during the CredSSP exchange
* The `client_credential` property on `CredSSP` has been removed in
favour of `context.get_extra_info('client_credential')
* Added support for custom credential types
* Can be used to for things like NTLM authentication with NT/LM hashes,
Kerberos with a keytab or from an explicit CCache, etc
* Support calling SSPI through `pyspnego`'s Negotiate proxy context
* This allows users on Windows to still use Negotiate auth but with a
complex set of credentials
* Also opens up the ability to use Negotiate but only with Kerberos auth
* The `username` and `password` property on the auth context object are
deprecated and will return `None` until it is removed in a future release
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyspnego?expand=0&rev=15
83 lines
2.5 KiB
RPMSpec
83 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-pyspnego
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-pyspnego
|
|
Version: 0.4.0
|
|
Release: 0
|
|
Summary: Python SPNEGO authentication library
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/jborean93/pyspnego
|
|
Source: https://github.com/jborean93/pyspnego/archive/v%{version}.tar.gz#/pyspnego-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module dataclasses if %python-base < 3.7}
|
|
BuildRequires: %{python_module cryptography}
|
|
BuildRequires: %{python_module pytest-mock}
|
|
BuildRequires: %{python_module pytest}
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-cryptography
|
|
%if 0%{python_version_nodots} < 37
|
|
Requires: python-dataclasses
|
|
%endif
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
Suggests: python-gssapi >= 1.5.0
|
|
Suggests: python-ruamel.yaml
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
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.
|
|
|
|
%prep
|
|
%setup -q -n pyspnego-%{version}
|
|
sed -i '1{/^#!/ d}' src/spnego/__main__.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/pyspnego-parse
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%post
|
|
%python_install_alternative pyspnego-parse
|
|
|
|
%postun
|
|
%python_uninstall_alternative pyspnego-parse
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc CHANGELOG.md README.md
|
|
%python_alternative %{_bindir}/pyspnego-parse
|
|
%{python_sitelib}/spnego
|
|
%{python_sitelib}/pyspnego-%{version}*-info
|
|
|
|
%changelog
|