diff options
author | robot-piglet <[email protected]> | 2024-01-26 13:18:00 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2024-01-26 14:37:14 +0300 |
commit | 7e48de06a66dff1e3f73e186f64b6d155dffa086 (patch) | |
tree | edd6494ecf7cfca5285dbf4e5c386a20ab58e970 /contrib/python/google-auth/py3 | |
parent | 9b8da54607431b12327615568180adf77cca95c8 (diff) |
Intermediate changes
Diffstat (limited to 'contrib/python/google-auth/py3')
6 files changed, 27 insertions, 3 deletions
diff --git a/contrib/python/google-auth/py3/.dist-info/METADATA b/contrib/python/google-auth/py3/.dist-info/METADATA index 21345a05554..2820e8856dd 100644 --- a/contrib/python/google-auth/py3/.dist-info/METADATA +++ b/contrib/python/google-auth/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-auth -Version: 2.26.1 +Version: 2.26.2 Summary: Google Authentication Library Home-page: https://github.com/googleapis/google-auth-library-python Author: Google Cloud Platform diff --git a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py index 55230103f43..526588f7e85 100644 --- a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py +++ b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py @@ -342,6 +342,7 @@ class Credentials( revoke_url=info.get("revoke_url"), quota_project_id=info.get("quota_project_id"), scopes=info.get("scopes"), + universe_domain=info.get("universe_domain", _DEFAULT_UNIVERSE_DOMAIN), **kwargs ) diff --git a/contrib/python/google-auth/py3/google/auth/version.py b/contrib/python/google-auth/py3/google/auth/version.py index 1c94c2f5f61..6d53c4c4118 100644 --- a/contrib/python/google-auth/py3/google/auth/version.py +++ b/contrib/python/google-auth/py3/google/auth/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.26.1" +__version__ = "2.26.2" diff --git a/contrib/python/google-auth/py3/tests/data/external_account_authorized_user_non_gdu.json b/contrib/python/google-auth/py3/tests/data/external_account_authorized_user_non_gdu.json new file mode 100644 index 00000000000..b82854c7437 --- /dev/null +++ b/contrib/python/google-auth/py3/tests/data/external_account_authorized_user_non_gdu.json @@ -0,0 +1,10 @@ +{ + "type": "external_account_authorized_user", + "audience": "//iam.fake_universe_domain/locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID", + "refresh_token": "refreshToken", + "token_url": "https://sts.fake_universe_domain/v1/oauth/token", + "token_info_url": "https://sts.fake_universe_domain/v1/instrospect", + "client_id": "clientId", + "client_secret": "clientSecret", + "universe_domain": "fake_universe_domain" +} diff --git a/contrib/python/google-auth/py3/tests/test__default.py b/contrib/python/google-auth/py3/tests/test__default.py index d619614790c..aaf892f6d04 100644 --- a/contrib/python/google-auth/py3/tests/test__default.py +++ b/contrib/python/google-auth/py3/tests/test__default.py @@ -158,6 +158,10 @@ EXTERNAL_ACCOUNT_AUTHORIZED_USER_FILE = os.path.join( DATA_DIR, "external_account_authorized_user.json" ) +EXTERNAL_ACCOUNT_AUTHORIZED_USER_NON_GDU_FILE = os.path.join( + DATA_DIR, "external_account_authorized_user_non_gdu.json" +) + MOCK_CREDENTIALS = mock.Mock(spec=credentials.CredentialsWithQuotaProject) MOCK_CREDENTIALS.with_quota_project.return_value = MOCK_CREDENTIALS @@ -577,6 +581,15 @@ def test_load_credentials_from_file_external_account_authorized_user(): assert project_id is None +def test_load_credentials_from_file_external_account_authorized_user_non_gdu(): + credentials, _ = _default.load_credentials_from_file( + EXTERNAL_ACCOUNT_AUTHORIZED_USER_NON_GDU_FILE, request=mock.sentinel.request + ) + + assert isinstance(credentials, external_account_authorized_user.Credentials) + assert credentials.universe_domain == "fake_universe_domain" + + def test_load_credentials_from_file_external_account_authorized_user_bad_format(tmpdir): filename = tmpdir.join("external_account_authorized_user_bad.json") filename.write(json.dumps({"type": "external_account_authorized_user"})) diff --git a/contrib/python/google-auth/py3/ya.make b/contrib/python/google-auth/py3/ya.make index 75848da9710..976b926bffa 100644 --- a/contrib/python/google-auth/py3/ya.make +++ b/contrib/python/google-auth/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.26.1) +VERSION(2.26.2) LICENSE(Apache-2.0) |