google-auth 2.49.0.dev0__tar.gz → 2.49.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_auth-2.49.0.dev0/google_auth.egg-info → google_auth-2.49.1}/PKG-INFO +16 -4
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aio/transport/aiohttp.py +22 -7
- google_auth-2.49.1/google/auth/aio/transport/mtls.py +197 -0
- google_auth-2.49.1/google/auth/aio/transport/sessions.py +576 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/compute_engine/_metadata.py +6 -7
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/environment_vars.py +12 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/iam.py +7 -16
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/_mtls_helper.py +43 -23
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/mtls.py +9 -4
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/version.py +1 -1
- {google_auth-2.49.0.dev0 → google_auth-2.49.1/google_auth.egg-info}/PKG-INFO +16 -4
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google_auth.egg-info/SOURCES.txt +4 -1
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google_auth.egg-info/requires.txt +3 -2
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google_auth.egg-info/top_level.txt +1 -1
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/setup.py +3 -5
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/test__metadata.py +14 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test__python_rsa.py +5 -1
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test_rsa.py +14 -4
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/aio/test_aiohttp.py +4 -3
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/aio/test_sessions.py +15 -0
- google_auth-2.49.1/tests/transport/aio/test_sessions_mtls.py +142 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test__mtls_helper.py +109 -7
- google_auth-2.49.1/tests/transport/test_aio_mtls_helper.py +202 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test_mtls.py +4 -4
- google_auth-2.49.0.dev0/google/auth/aio/transport/sessions.py +0 -268
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/LICENSE +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/MANIFEST.in +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/README.rst +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_agent_identity_utils.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_cache.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_cloud_sdk.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_constants.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_credentials_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_credentials_base.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_default.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_default_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_exponential_backoff.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_helpers.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_jwt_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_oauth2client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_refresh_worker.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/_service_account_info.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aio/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aio/_helpers.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aio/credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aio/transport/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/api_key.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/app_engine.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/aws.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/compute_engine/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/compute_engine/_mtls.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/compute_engine/credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/_cryptography_rsa.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/_helpers.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/_python_rsa.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/base.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/es.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/es256.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/crypt/rsa.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/downscoped.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/exceptions.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/external_account.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/external_account_authorized_user.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/identity_pool.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/impersonated_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/jwt.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/metrics.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/pluggable.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/py.typed +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/_aiohttp_requests.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/_custom_tls_signer.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/_http_client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/_requests_base.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/grpc.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/requests.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/auth/transport/urllib3.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_client_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_credentials_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_id_token_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_reauth_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/_service_account_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/challenges.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/gdch_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/id_token.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/py.typed +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/reauth.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/service_account.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/sts.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/utils.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/webauthn_handler.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/webauthn_handler_factory.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google/oauth2/webauthn_types.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/google_auth.egg-info/dependency_links.txt +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/setup.cfg +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/aio/test__helpers.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/data/smbios_product_name +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/data/smbios_product_name_non_google +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/test__mtls.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/compute_engine/test_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/conftest.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test__cryptography_rsa.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test_crypt.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test_es.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/crypt/test_es256.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/authorized_user.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/authorized_user_cloud_sdk.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/authorized_user_cloud_sdk_with_quota_project_id.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/authorized_user_with_rapt_token.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/client_secrets.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/context_aware_metadata.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/enterprise_cert_invalid.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/enterprise_cert_valid.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/enterprise_cert_valid_provider.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es256_privatekey.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es256_public_cert.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es256_publickey.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es256_service_account.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es384_privatekey.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es384_public_cert.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es384_publickey.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/es384_service_account.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/external_account_authorized_user.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/external_account_authorized_user_non_gdu.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/external_subject_token.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/external_subject_token.txt +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/gdch_service_account.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/impersonated_service_account_authorized_user_source.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/impersonated_service_account_external_account_authorized_user_source.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/impersonated_service_account_service_account_source.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/impersonated_service_account_with_quota_project.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/old_oauth_credentials_py3.pickle +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/other_cert.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/pem_from_pkcs12.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/privatekey.p12 +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/privatekey.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/privatekey.pub +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/public_cert.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/service_account.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/service_account_non_gdu.json +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/trust_chain_with_leaf.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/trust_chain_without_leaf.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/data/trust_chain_wrong_order.pem +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test__client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_challenges.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_gdch_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_id_token.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_reauth.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_service_account.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_sts.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_utils.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_webauthn_handler.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_webauthn_handler_factory.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/oauth2/test_webauthn_types.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__cache.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__cloud_sdk.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__default.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__exponential_backoff.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__helpers.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__oauth2client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__refresh_worker.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test__service_account_info.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_agent_identity_utils.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_api_key.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_app_engine.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_aws.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_credentials_async.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_downscoped.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_exceptions.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_external_account.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_external_account_authorized_user.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_iam.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_identity_pool.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_impersonated_credentials.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_jwt.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_metrics.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_packaging.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_pluggable.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/test_version_warnings.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/__init__.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/compliance.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test__custom_tls_signer.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test__http_client.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test_grpc.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test_requests.py +0 -0
- {google_auth-2.49.0.dev0 → google_auth-2.49.1}/tests/transport/test_urllib3.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: google-auth
|
|
3
|
-
Version: 2.49.
|
|
3
|
+
Version: 2.49.1
|
|
4
4
|
Summary: Google Authentication Library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-auth-library-python
|
|
6
6
|
Author: Google Cloud Platform
|
|
@@ -46,7 +46,6 @@ Provides-Extra: testing
|
|
|
46
46
|
Requires-Dist: grpcio; extra == "testing"
|
|
47
47
|
Requires-Dist: flask; extra == "testing"
|
|
48
48
|
Requires-Dist: freezegun; extra == "testing"
|
|
49
|
-
Requires-Dist: oauth2client; extra == "testing"
|
|
50
49
|
Requires-Dist: pyjwt>=2.0; extra == "testing"
|
|
51
50
|
Requires-Dist: pytest; extra == "testing"
|
|
52
51
|
Requires-Dist: pytest-cov; extra == "testing"
|
|
@@ -62,10 +61,23 @@ Requires-Dist: aioresponses; extra == "testing"
|
|
|
62
61
|
Requires-Dist: pytest-asyncio; extra == "testing"
|
|
63
62
|
Requires-Dist: pyopenssl<24.3.0; extra == "testing"
|
|
64
63
|
Requires-Dist: aiohttp<3.10.0; extra == "testing"
|
|
65
|
-
Requires-Dist: rsa<5,>=3.1.4; extra == "testing"
|
|
66
64
|
Provides-Extra: urllib3
|
|
67
65
|
Requires-Dist: urllib3; extra == "urllib3"
|
|
68
66
|
Requires-Dist: packaging; extra == "urllib3"
|
|
67
|
+
Provides-Extra: rsa
|
|
68
|
+
Requires-Dist: rsa<5,>=3.1.4; extra == "rsa"
|
|
69
|
+
Dynamic: author
|
|
70
|
+
Dynamic: author-email
|
|
71
|
+
Dynamic: classifier
|
|
72
|
+
Dynamic: description
|
|
73
|
+
Dynamic: home-page
|
|
74
|
+
Dynamic: keywords
|
|
75
|
+
Dynamic: license
|
|
76
|
+
Dynamic: license-file
|
|
77
|
+
Dynamic: provides-extra
|
|
78
|
+
Dynamic: requires-dist
|
|
79
|
+
Dynamic: requires-python
|
|
80
|
+
Dynamic: summary
|
|
69
81
|
|
|
70
82
|
Google Auth Python Library
|
|
71
83
|
==========================
|
|
@@ -12,12 +12,11 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
"""Transport adapter for Asynchronous HTTP Requests based on aiohttp.
|
|
16
|
-
"""
|
|
15
|
+
"""Transport adapter for Asynchronous HTTP Requests based on aiohttp."""
|
|
17
16
|
|
|
18
17
|
import asyncio
|
|
19
18
|
import logging
|
|
20
|
-
from typing import AsyncGenerator, Mapping, Optional
|
|
19
|
+
from typing import AsyncGenerator, Mapping, Optional, TYPE_CHECKING, Union
|
|
21
20
|
|
|
22
21
|
try:
|
|
23
22
|
import aiohttp # type: ignore
|
|
@@ -31,6 +30,15 @@ from google.auth import exceptions
|
|
|
31
30
|
from google.auth.aio import _helpers as _helpers_async
|
|
32
31
|
from google.auth.aio import transport
|
|
33
32
|
|
|
33
|
+
if TYPE_CHECKING: # pragma: NO COVER
|
|
34
|
+
from aiohttp import ClientTimeout # type: ignore
|
|
35
|
+
|
|
36
|
+
else:
|
|
37
|
+
try:
|
|
38
|
+
from aiohttp import ClientTimeout
|
|
39
|
+
except (ImportError, AttributeError):
|
|
40
|
+
ClientTimeout = None
|
|
41
|
+
|
|
34
42
|
_LOGGER = logging.getLogger(__name__)
|
|
35
43
|
|
|
36
44
|
|
|
@@ -113,7 +121,7 @@ class Request(transport.Request):
|
|
|
113
121
|
.. automethod:: __call__
|
|
114
122
|
"""
|
|
115
123
|
|
|
116
|
-
def __init__(self, session: aiohttp.ClientSession = None):
|
|
124
|
+
def __init__(self, session: Optional[aiohttp.ClientSession] = None):
|
|
117
125
|
self._session = session
|
|
118
126
|
self._closed = False
|
|
119
127
|
|
|
@@ -123,7 +131,7 @@ class Request(transport.Request):
|
|
|
123
131
|
method: str = "GET",
|
|
124
132
|
body: Optional[bytes] = None,
|
|
125
133
|
headers: Optional[Mapping[str, str]] = None,
|
|
126
|
-
timeout: float = transport._DEFAULT_TIMEOUT_SECONDS,
|
|
134
|
+
timeout: Union[float, ClientTimeout] = transport._DEFAULT_TIMEOUT_SECONDS,
|
|
127
135
|
**kwargs,
|
|
128
136
|
) -> transport.Response:
|
|
129
137
|
"""
|
|
@@ -158,7 +166,10 @@ class Request(transport.Request):
|
|
|
158
166
|
if not self._session:
|
|
159
167
|
self._session = aiohttp.ClientSession()
|
|
160
168
|
|
|
161
|
-
|
|
169
|
+
if isinstance(timeout, aiohttp.ClientTimeout):
|
|
170
|
+
client_timeout = timeout
|
|
171
|
+
else:
|
|
172
|
+
client_timeout = aiohttp.ClientTimeout(total=timeout)
|
|
162
173
|
_helpers.request_log(_LOGGER, method, url, body, headers)
|
|
163
174
|
response = await self._session.request(
|
|
164
175
|
method,
|
|
@@ -176,8 +187,12 @@ class Request(transport.Request):
|
|
|
176
187
|
raise client_exc from caught_exc
|
|
177
188
|
|
|
178
189
|
except asyncio.TimeoutError as caught_exc:
|
|
190
|
+
if isinstance(timeout, aiohttp.ClientTimeout):
|
|
191
|
+
timeout_seconds = timeout.total
|
|
192
|
+
else:
|
|
193
|
+
timeout_seconds = timeout
|
|
179
194
|
timeout_exc = exceptions.TimeoutError(
|
|
180
|
-
f"Request timed out after {
|
|
195
|
+
f"Request timed out after {timeout_seconds} seconds."
|
|
181
196
|
)
|
|
182
197
|
raise timeout_exc from caught_exc
|
|
183
198
|
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Copyright 2026 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""
|
|
16
|
+
Helper functions for mTLS in async for discovery of certs.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import asyncio
|
|
20
|
+
import contextlib
|
|
21
|
+
import logging
|
|
22
|
+
import os
|
|
23
|
+
import ssl
|
|
24
|
+
import tempfile
|
|
25
|
+
from typing import Optional
|
|
26
|
+
|
|
27
|
+
from google.auth import exceptions
|
|
28
|
+
import google.auth.transport._mtls_helper
|
|
29
|
+
import google.auth.transport.mtls
|
|
30
|
+
|
|
31
|
+
_LOGGER = logging.getLogger(__name__)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@contextlib.contextmanager
|
|
35
|
+
def _create_temp_file(content: bytes):
|
|
36
|
+
"""Creates a temporary file with the given content.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
content (bytes): The content to write to the file.
|
|
40
|
+
|
|
41
|
+
Yields:
|
|
42
|
+
str: The path to the temporary file.
|
|
43
|
+
"""
|
|
44
|
+
# Create a temporary file that is readable only by the owner.
|
|
45
|
+
fd, file_path = tempfile.mkstemp()
|
|
46
|
+
try:
|
|
47
|
+
with os.fdopen(fd, "wb") as f:
|
|
48
|
+
f.write(content)
|
|
49
|
+
yield file_path
|
|
50
|
+
finally:
|
|
51
|
+
# Securely delete the file after use.
|
|
52
|
+
if os.path.exists(file_path):
|
|
53
|
+
os.remove(file_path)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def make_client_cert_ssl_context(
|
|
57
|
+
cert_bytes: bytes, key_bytes: bytes, passphrase: Optional[bytes] = None
|
|
58
|
+
) -> ssl.SSLContext:
|
|
59
|
+
"""Creates an SSLContext with the given client certificate and key.
|
|
60
|
+
This function writes the certificate and key to temporary files so that
|
|
61
|
+
ssl.create_default_context can load them, as the ssl module requires
|
|
62
|
+
file paths for client certificates. These temporary files are deleted
|
|
63
|
+
immediately after the SSL context is created.
|
|
64
|
+
Args:
|
|
65
|
+
cert_bytes (bytes): The client certificate content in PEM format.
|
|
66
|
+
key_bytes (bytes): The client private key content in PEM format.
|
|
67
|
+
passphrase (Optional[bytes]): The passphrase for the private key, if any.
|
|
68
|
+
Returns:
|
|
69
|
+
ssl.SSLContext: The configured SSL context with client certificate.
|
|
70
|
+
|
|
71
|
+
Raises:
|
|
72
|
+
google.auth.exceptions.TransportError: If there is an error loading the certificate.
|
|
73
|
+
"""
|
|
74
|
+
with _create_temp_file(cert_bytes) as cert_path, _create_temp_file(
|
|
75
|
+
key_bytes
|
|
76
|
+
) as key_path:
|
|
77
|
+
try:
|
|
78
|
+
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
|
|
79
|
+
context.load_cert_chain(
|
|
80
|
+
certfile=cert_path, keyfile=key_path, password=passphrase
|
|
81
|
+
)
|
|
82
|
+
return context
|
|
83
|
+
except (ssl.SSLError, OSError, IOError, ValueError, RuntimeError) as exc:
|
|
84
|
+
raise exceptions.TransportError(
|
|
85
|
+
"Failed to load client certificate and key for mTLS."
|
|
86
|
+
) from exc
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
async def _run_in_executor(func, *args):
|
|
90
|
+
"""Run a blocking function in an executor to avoid blocking the event loop.
|
|
91
|
+
|
|
92
|
+
This implements the non-blocking execution strategy for disk I/O operations.
|
|
93
|
+
"""
|
|
94
|
+
try:
|
|
95
|
+
# For python versions 3.9 and newer versions
|
|
96
|
+
return await asyncio.to_thread(func, *args)
|
|
97
|
+
except AttributeError:
|
|
98
|
+
# Fallback for older Python versions
|
|
99
|
+
loop = asyncio.get_running_loop()
|
|
100
|
+
return await loop.run_in_executor(None, func, *args)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def default_client_cert_source():
|
|
104
|
+
"""Get a callback which returns the default client SSL credentials.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Awaitable[Callable[[], Tuple[bytes, bytes]]]: A callback which returns the default
|
|
108
|
+
client certificate bytes and private key bytes, both in PEM format.
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
google.auth.exceptions.DefaultClientCertSourceError: If the default
|
|
112
|
+
client SSL credentials don't exist or are malformed.
|
|
113
|
+
"""
|
|
114
|
+
if not google.auth.transport.mtls.has_default_client_cert_source(
|
|
115
|
+
include_context_aware=False
|
|
116
|
+
):
|
|
117
|
+
raise exceptions.MutualTLSChannelError(
|
|
118
|
+
"Default client cert source doesn't exist"
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
async def callback():
|
|
122
|
+
try:
|
|
123
|
+
_, cert_bytes, key_bytes = await get_client_cert_and_key()
|
|
124
|
+
except (OSError, RuntimeError, ValueError) as caught_exc:
|
|
125
|
+
new_exc = exceptions.MutualTLSChannelError(caught_exc)
|
|
126
|
+
raise new_exc from caught_exc
|
|
127
|
+
|
|
128
|
+
return cert_bytes, key_bytes
|
|
129
|
+
|
|
130
|
+
return callback
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def get_client_ssl_credentials(
|
|
134
|
+
certificate_config_path=None,
|
|
135
|
+
):
|
|
136
|
+
"""Returns the client side certificate, private key and passphrase.
|
|
137
|
+
|
|
138
|
+
We look for certificates and keys with the following order of priority:
|
|
139
|
+
1. Certificate and key specified by certificate_config.json.
|
|
140
|
+
Currently, only X.509 workload certificates are supported.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
certificate_config_path (str): The certificate_config.json file path.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Tuple[bool, bytes, bytes, bytes]:
|
|
147
|
+
A boolean indicating if cert, key and passphrase are obtained, the
|
|
148
|
+
cert bytes and key bytes both in PEM format, and passphrase bytes.
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
google.auth.exceptions.ClientCertError: if problems occurs when getting
|
|
152
|
+
the cert, key and passphrase.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
# Attempt to retrieve X.509 Workload cert and key.
|
|
156
|
+
cert, key = await _run_in_executor(
|
|
157
|
+
google.auth.transport._mtls_helper._get_workload_cert_and_key,
|
|
158
|
+
certificate_config_path,
|
|
159
|
+
False,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
if cert and key:
|
|
163
|
+
return True, cert, key, None
|
|
164
|
+
|
|
165
|
+
return False, None, None, None
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
async def get_client_cert_and_key(client_cert_callback=None):
|
|
169
|
+
"""Returns the client side certificate and private key. The function first
|
|
170
|
+
tries to get certificate and key from client_cert_callback; if the callback
|
|
171
|
+
is None or doesn't provide certificate and key, the function tries application
|
|
172
|
+
default SSL credentials.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
client_cert_callback (Optional[Callable[[], (bytes, bytes)]]): An
|
|
176
|
+
optional callback which returns client certificate bytes and private
|
|
177
|
+
key bytes both in PEM format.
|
|
178
|
+
|
|
179
|
+
Returns:
|
|
180
|
+
Tuple[bool, bytes, bytes]:
|
|
181
|
+
A boolean indicating if cert and key are obtained, the cert bytes
|
|
182
|
+
and key bytes both in PEM format.
|
|
183
|
+
|
|
184
|
+
Raises:
|
|
185
|
+
google.auth.exceptions.ClientCertError: if problems occurs when getting
|
|
186
|
+
the cert and key.
|
|
187
|
+
"""
|
|
188
|
+
if client_cert_callback:
|
|
189
|
+
result = client_cert_callback()
|
|
190
|
+
try:
|
|
191
|
+
cert, key = await result
|
|
192
|
+
except TypeError:
|
|
193
|
+
cert, key = result
|
|
194
|
+
return True, cert, key
|
|
195
|
+
|
|
196
|
+
has_cert, cert, key, _ = await get_client_ssl_credentials()
|
|
197
|
+
return has_cert, cert, key
|