@@ -289,6 +289,7 @@ def test_valid_token_url_shall_pass_validation(self):
289
289
"https://us-east-1-sts.googleapis.com" ,
290
290
"https://US-WEST-1-sts.googleapis.com" ,
291
291
"https://us-west-1-sts.googleapis.com/path?query" ,
292
+ "https://sts-us-east-1.p.googleapis.com" ,
292
293
]
293
294
294
295
for url in valid_urls :
@@ -316,6 +317,15 @@ def test_invalid_token_url_shall_throw_exceptions(self):
316
317
"https://us- -1.sts.googleapis.com" ,
317
318
"https://-sts.googleapis.com" ,
318
319
"https://us-east-1.sts.googleapis.com.evil.com" ,
320
+ "https://sts.pgoogleapis.com" ,
321
+ "https://p.googleapis.com" ,
322
+ "https://sts.p.com" ,
323
+ "http://sts.p.googleapis.com" ,
324
+ "https://xyz-sts.p.googleapis.com" ,
325
+ "https://sts-xyz.123.p.googleapis.com" ,
326
+ "https://sts-xyz.p1.googleapis.com" ,
327
+ "https://sts-xyz.p.foo.com" ,
328
+ "https://sts-xyz.p.foo.googleapis.com" ,
319
329
]
320
330
321
331
for url in invalid_urls :
@@ -335,6 +345,7 @@ def test_valid_service_account_impersonation_url_shall_pass_validation(self):
335
345
"https://us-east-1-iamcredentials.googleapis.com" ,
336
346
"https://US-WEST-1-iamcredentials.googleapis.com" ,
337
347
"https://us-west-1-iamcredentials.googleapis.com/path?query" ,
348
+ "https://iamcredentials-us-east-1.p.googleapis.com" ,
338
349
]
339
350
340
351
for url in valid_urls :
@@ -362,6 +373,15 @@ def test_invalid_service_account_impersonate_url_shall_throw_exceptions(self):
362
373
"https://us- -1.iamcredentials.googleapis.com" ,
363
374
"https://-iamcredentials.googleapis.com" ,
364
375
"https://us-east-1.iamcredentials.googleapis.com.evil.com" ,
376
+ "https://iamcredentials.pgoogleapis.com" ,
377
+ "https://p.googleapis.com" ,
378
+ "https://iamcredentials.p.com" ,
379
+ "http://iamcredentials.p.googleapis.com" ,
380
+ "https://xyz-iamcredentials.p.googleapis.com" ,
381
+ "https://iamcredentials-xyz.123.p.googleapis.com" ,
382
+ "https://iamcredentials-xyz.p1.googleapis.com" ,
383
+ "https://iamcredentials-xyz.p.foo.com" ,
384
+ "https://iamcredentials-xyz.p.foo.googleapis.com" ,
365
385
]
366
386
367
387
for url in invalid_urls :
0 commit comments