forked from pool/python-google-auth
* Add public wrapper for _mtls_helper.check_use_client_cert which
enables mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set,
when the MWID/X.509 cert sources detected (#1859) Add public
wrapper for check_use_client_cert which enables mTLS if
GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, when the MWID/X.509
cert sources detected. Also, fix check_use_client_cert to return
boolean value.
Change #1848 added the check_use_client_cert method that helps know
if client cert should be used for mTLS connection. However, that was
in a private class, thus, created a public wrapper of the same function
so that it can be used by python Client Libraries. Also, updated
check_use_client_cert to return a boolean value instead of existing
string value for better readability and future scope.
* Enable mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, if
the MWID/X.509 cert sources detected (#1848) The Python SDK will
use a hybrid approach for mTLS enablement:
* If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is set
(either true or false), the SDK will respect that setting. This is
necessary for test scenarios and users who need to explicitly control
mTLS behavior.
* If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not
set, the SDK will automatically enable mTLS only if it detects Managed
Workload Identity (MWID) or X.509 Workforce Identity Federation (WIF)
certificate sources. In other cases where the variable is not set, mTLS
will remain disabled.
** This change also adds the helper method `check_use_client_cert` and
it's unit test, which will be used for checking the criteria for setting
the mTLS to true
** This change is only for Auth-Library, other changes will be created
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-google-auth?expand=0&rev=123
91 lines
3.4 KiB
RPMSpec
91 lines
3.4 KiB
RPMSpec
#
|
||
# spec file for package python-google-auth
|
||
#
|
||
# Copyright (c) 2025 SUSE LLC and contributors
|
||
#
|
||
# 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/
|
||
#
|
||
|
||
|
||
%{?sle15_python_module_pythons}
|
||
Name: python-google-auth
|
||
Version: 2.43.0
|
||
Release: 0
|
||
Summary: Google Authentication Library
|
||
License: Apache-2.0
|
||
URL: https://github.com/googleapis/google-auth-library-python
|
||
Source: https://files.pythonhosted.org/packages/source/g/google_auth/google_auth-%{version}.tar.gz
|
||
# https://github.com/googleapis/google-auth-library-python/issues/1055
|
||
Patch1: python-google-auth-no-mock.patch
|
||
BuildRequires: %{python_module Flask}
|
||
BuildRequires: %{python_module PyJWT >= 2.0}
|
||
BuildRequires: %{python_module aiohttp >= 3.6.2}
|
||
BuildRequires: %{python_module aioresponses}
|
||
BuildRequires: %{python_module cachetools >= 2.0.0}
|
||
BuildRequires: %{python_module cryptography}
|
||
BuildRequires: %{python_module freezegun}
|
||
BuildRequires: %{python_module pip}
|
||
BuildRequires: %{python_module pyOpenSSL >= 22.0.0}
|
||
BuildRequires: %{python_module pyasn1-modules >= 0.2.1}
|
||
BuildRequires: %{python_module pytest-asyncio}
|
||
BuildRequires: %{python_module pytest-localserver}
|
||
BuildRequires: %{python_module pytest}
|
||
BuildRequires: %{python_module pyu2f >= 0.1.5}
|
||
BuildRequires: %{python_module requests >= 2.20.0}
|
||
BuildRequires: %{python_module responses}
|
||
BuildRequires: %{python_module rsa >= 3.1.4}
|
||
BuildRequires: %{python_module setuptools >= 40.3.0}
|
||
BuildRequires: %{python_module urllib3}
|
||
BuildRequires: %{python_module wheel}
|
||
BuildRequires: fdupes
|
||
BuildRequires: python-rpm-macros
|
||
Requires: python-cachetools >= 2.0.0
|
||
Requires: python-pyasn1-modules >= 0.2.1
|
||
Requires: python-rsa >= 3.1.4
|
||
Requires: python-urllib3
|
||
Recommends: python-PyJWT >= 2.0
|
||
Recommends: python-aiohttp >= 3.6.2
|
||
Recommends: python-cryptography >= 38.0.3
|
||
Recommends: python-pyOpenSSL >= 22.0.0
|
||
Recommends: python-pyu2f >= 0.1.5
|
||
Recommends: python-requests >= 2.20.0
|
||
BuildArch: noarch
|
||
%python_subpackages
|
||
|
||
%description
|
||
This library simplifies using Google’s various server-to-server authentication mechanisms to access Google APIs.
|
||
|
||
%prep
|
||
%autosetup -p1 -n google_auth-%{version}
|
||
|
||
%build
|
||
%pyproject_wheel
|
||
|
||
%install
|
||
%pyproject_install
|
||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||
|
||
%check
|
||
# don't test deprecated oauth2client utilities if we don't have it anymore
|
||
# deprecated OpenSSL.crypto started dropping functionality: https://github.com/googleapis/google-auth-library-python/issues/1665
|
||
%pytest --ignore tests/test__oauth2client.py -k "not (TestDecryptPrivateKey and test_success)"
|
||
|
||
%files %{python_files}
|
||
%license LICENSE
|
||
%doc README.rst
|
||
%dir %{python_sitelib}/google
|
||
%{python_sitelib}/google/auth
|
||
%{python_sitelib}/google/oauth2
|
||
%{python_sitelib}/google_auth-%{version}*-info
|
||
|
||
%changelog
|