@@ -833,7 +833,7 @@ def test_refresh_impersonation_without_client_auth_success(
833833 "Content-Type" : "application/json" ,
834834 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
835835 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
836- "x-identity-trust-boundary " : "0 " ,
836+ "x-allowed-locations " : "0x0 " ,
837837 }
838838 impersonation_request_data = {
839839 "delegates" : None ,
@@ -915,7 +915,7 @@ def test_refresh_workforce_impersonation_without_client_auth_success(
915915 "Content-Type" : "application/json" ,
916916 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
917917 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
918- "x-identity-trust-boundary " : "0 " ,
918+ "x-allowed-locations " : "0x0 " ,
919919 }
920920 impersonation_request_data = {
921921 "delegates" : None ,
@@ -1134,7 +1134,7 @@ def test_refresh_impersonation_with_client_auth_success_ignore_default_scopes(
11341134 "Content-Type" : "application/json" ,
11351135 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
11361136 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
1137- "x-identity-trust-boundary " : "0 " ,
1137+ "x-allowed-locations " : "0x0 " ,
11381138 }
11391139 impersonation_request_data = {
11401140 "delegates" : None ,
@@ -1218,7 +1218,7 @@ def test_refresh_impersonation_with_client_auth_success_use_default_scopes(
12181218 "Content-Type" : "application/json" ,
12191219 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
12201220 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
1221- "x-identity-trust-boundary " : "0 " ,
1221+ "x-allowed-locations " : "0x0 " ,
12221222 }
12231223 impersonation_request_data = {
12241224 "delegates" : None ,
@@ -1274,7 +1274,7 @@ def test_apply_without_quota_project_id(self):
12741274
12751275 assert headers == {
12761276 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1277- "x-identity-trust-boundary " : "0 " ,
1277+ "x-allowed-locations " : "0x0 " ,
12781278 }
12791279
12801280 def test_apply_workforce_without_quota_project_id (self ):
@@ -1291,7 +1291,7 @@ def test_apply_workforce_without_quota_project_id(self):
12911291
12921292 assert headers == {
12931293 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1294- "x-identity-trust-boundary " : "0 " ,
1294+ "x-allowed-locations " : "0x0 " ,
12951295 }
12961296
12971297 def test_apply_impersonation_without_quota_project_id (self ):
@@ -1323,7 +1323,7 @@ def test_apply_impersonation_without_quota_project_id(self):
13231323
13241324 assert headers == {
13251325 "authorization" : "Bearer {}" .format (impersonation_response ["accessToken" ]),
1326- "x-identity-trust-boundary " : "0 " ,
1326+ "x-allowed-locations " : "0x0 " ,
13271327 }
13281328
13291329 def test_apply_with_quota_project_id (self ):
@@ -1340,7 +1340,7 @@ def test_apply_with_quota_project_id(self):
13401340 "other" : "header-value" ,
13411341 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
13421342 "x-goog-user-project" : self .QUOTA_PROJECT_ID ,
1343- "x-identity-trust-boundary " : "0 " ,
1343+ "x-allowed-locations " : "0x0 " ,
13441344 }
13451345
13461346 def test_apply_impersonation_with_quota_project_id (self ):
@@ -1375,7 +1375,7 @@ def test_apply_impersonation_with_quota_project_id(self):
13751375 "other" : "header-value" ,
13761376 "authorization" : "Bearer {}" .format (impersonation_response ["accessToken" ]),
13771377 "x-goog-user-project" : self .QUOTA_PROJECT_ID ,
1378- "x-identity-trust-boundary " : "0 " ,
1378+ "x-allowed-locations " : "0x0 " ,
13791379 }
13801380
13811381 def test_before_request (self ):
@@ -1391,7 +1391,7 @@ def test_before_request(self):
13911391 assert headers == {
13921392 "other" : "header-value" ,
13931393 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1394- "x-identity-trust-boundary " : "0 " ,
1394+ "x-allowed-locations " : "0x0 " ,
13951395 }
13961396
13971397 # Second call shouldn't call refresh.
@@ -1400,7 +1400,7 @@ def test_before_request(self):
14001400 assert headers == {
14011401 "other" : "header-value" ,
14021402 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1403- "x-identity-trust-boundary " : "0 " ,
1403+ "x-allowed-locations " : "0x0 " ,
14041404 }
14051405
14061406 def test_before_request_workforce (self ):
@@ -1418,7 +1418,7 @@ def test_before_request_workforce(self):
14181418 assert headers == {
14191419 "other" : "header-value" ,
14201420 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1421- "x-identity-trust-boundary " : "0 " ,
1421+ "x-allowed-locations " : "0x0 " ,
14221422 }
14231423
14241424 # Second call shouldn't call refresh.
@@ -1427,7 +1427,7 @@ def test_before_request_workforce(self):
14271427 assert headers == {
14281428 "other" : "header-value" ,
14291429 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1430- "x-identity-trust-boundary " : "0 " ,
1430+ "x-allowed-locations " : "0x0 " ,
14311431 }
14321432
14331433 def test_before_request_impersonation (self ):
@@ -1458,7 +1458,7 @@ def test_before_request_impersonation(self):
14581458 assert headers == {
14591459 "other" : "header-value" ,
14601460 "authorization" : "Bearer {}" .format (impersonation_response ["accessToken" ]),
1461- "x-identity-trust-boundary " : "0 " ,
1461+ "x-allowed-locations " : "0x0 " ,
14621462 }
14631463
14641464 # Second call shouldn't call refresh.
@@ -1467,7 +1467,7 @@ def test_before_request_impersonation(self):
14671467 assert headers == {
14681468 "other" : "header-value" ,
14691469 "authorization" : "Bearer {}" .format (impersonation_response ["accessToken" ]),
1470- "x-identity-trust-boundary " : "0 " ,
1470+ "x-allowed-locations " : "0x0 " ,
14711471 }
14721472
14731473 @mock .patch ("google.auth._helpers.utcnow" )
@@ -1495,7 +1495,7 @@ def test_before_request_expired(self, utcnow):
14951495 # Cached token should be used.
14961496 assert headers == {
14971497 "authorization" : "Bearer token" ,
1498- "x-identity-trust-boundary " : "0 " ,
1498+ "x-allowed-locations " : "0x0 " ,
14991499 }
15001500
15011501 # Next call should simulate 1 second passed.
@@ -1509,7 +1509,7 @@ def test_before_request_expired(self, utcnow):
15091509 # New token should be retrieved.
15101510 assert headers == {
15111511 "authorization" : "Bearer {}" .format (self .SUCCESS_RESPONSE ["access_token" ]),
1512- "x-identity-trust-boundary " : "0 " ,
1512+ "x-allowed-locations " : "0x0 " ,
15131513 }
15141514
15151515 @mock .patch ("google.auth._helpers.utcnow" )
@@ -1552,7 +1552,7 @@ def test_before_request_impersonation_expired(self, utcnow):
15521552 # Cached token should be used.
15531553 assert headers == {
15541554 "authorization" : "Bearer token" ,
1555- "x-identity-trust-boundary " : "0 " ,
1555+ "x-allowed-locations " : "0x0 " ,
15561556 }
15571557
15581558 # Next call should simulate 1 second passed. This will trigger the expiration
@@ -1567,7 +1567,7 @@ def test_before_request_impersonation_expired(self, utcnow):
15671567 # New token should be retrieved.
15681568 assert headers == {
15691569 "authorization" : "Bearer {}" .format (impersonation_response ["accessToken" ]),
1570- "x-identity-trust-boundary " : "0 " ,
1570+ "x-allowed-locations " : "0x0 " ,
15711571 }
15721572
15731573 @pytest .mark .parametrize (
@@ -1666,7 +1666,7 @@ def test_get_project_id_cloud_resource_manager_success(
16661666 "x-goog-user-project" : self .QUOTA_PROJECT_ID ,
16671667 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
16681668 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
1669- "x-identity-trust-boundary " : "0 " ,
1669+ "x-allowed-locations " : "0x0 " ,
16701670 }
16711671 impersonation_request_data = {
16721672 "delegates" : None ,
@@ -1720,7 +1720,7 @@ def test_get_project_id_cloud_resource_manager_success(
17201720 "authorization" : "Bearer {}" .format (
17211721 impersonation_response ["accessToken" ]
17221722 ),
1723- "x-identity-trust-boundary " : "0 " ,
1723+ "x-allowed-locations " : "0x0 " ,
17241724 },
17251725 )
17261726
@@ -1792,7 +1792,7 @@ def test_workforce_pool_get_project_id_cloud_resource_manager_success(
17921792 "authorization" : "Bearer {}" .format (
17931793 self .SUCCESS_RESPONSE ["access_token" ]
17941794 ),
1795- "x-identity-trust-boundary " : "0 " ,
1795+ "x-allowed-locations " : "0x0 " ,
17961796 },
17971797 )
17981798
@@ -1842,7 +1842,7 @@ def test_refresh_impersonation_with_lifetime(
18421842 "Content-Type" : "application/json" ,
18431843 "authorization" : "Bearer {}" .format (token_response ["access_token" ]),
18441844 "x-goog-api-client" : IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE ,
1845- "x-identity-trust-boundary " : "0 " ,
1845+ "x-allowed-locations " : "0x0 " ,
18461846 }
18471847 impersonation_request_data = {
18481848 "delegates" : None ,
0 commit comments