Commit af19393
authored
feat(auth): make RAB feature production ready (#17390)
This PR resolves issues identified during verification of gcloud
Regional Access Boundary (RAB) flows and enables RAB verification by
default:
* Removes the client-side environment variable feature gate
(`GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED`) to execute RAB lookups by default
across standard credential classes.
* Updates the Python auth SDK to recognize mTLS regional endpoints
(`.rep.mtls.googleapis.com`), bypassing redundant RAB lookups on secure
transport boundaries.
* Defers Service Account impersonation setup until HTTP request
execution before_request, propagating active cached tokens downward onto
the inner credential to guarantee that access tokens restored across
external CLI entrypoints correctly delegate regional access boundary
(RAB) lookups to target Service Account endpoints without forcing
redundant STS network renewal.1 parent 00ec9bf commit af19393Copy full SHA for af19393
12 files changed
+318-201Lines changed: 318 additions & 201 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/google-auth
- google/auth
- tests
- compute_engine
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/google-auth/google/auth/_regional_access_boundary_utils.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/_regional_access_boundary_utils.py-21Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
24 | 23 | |
25 | 24 | |
26 | 25 | |
27 | 26 | |
28 | | - |
29 | 27 | |
30 | 28 | |
31 | 29 | |
| ||
34 | 32 | |
35 | 33 | |
36 | 34 | |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | 35 | |
57 | 36 | |
58 | 37 | |
|
Collapse file
packages/google-auth/google/auth/aws.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/aws.py+3-5Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
841 | 841 | |
842 | 842 | |
843 | 843 | |
844 | | - |
845 | | - |
846 | | - |
847 | | - |
848 | | - |
| 844 | + |
| 845 | + |
| 846 | + |
849 | 847 | |
850 | 848 | |
851 | 849 | |
|
Collapse file
packages/google-auth/google/auth/credentials.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/credentials.py+8-9Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
446 | 446 | |
447 | 447 | |
448 | 448 | |
449 | | - |
450 | | - |
451 | | - |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + |
452 | 456 | |
453 | 457 | |
454 | 458 | |
| ||
484 | 488 | |
485 | 489 | |
486 | 490 | |
487 | | - |
488 | | - |
| 491 | + |
489 | 492 | |
490 | 493 | |
491 | 494 | |
492 | 495 | |
493 | | - |
494 | | - |
495 | | - |
496 | | - |
497 | 496 | |
498 | 497 | |
499 | 498 | |
|
Collapse file
packages/google-auth/google/auth/environment_vars.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/environment_vars.py+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
105 | 105 | |
106 | 106 | |
107 | 107 | |
| 108 | + |
108 | 109 | |
109 | 110 | |
110 | | - |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
111 | 115 | |
112 | 116 | |
113 | 117 | |
|
Collapse file
packages/google-auth/google/auth/external_account.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/external_account.py+30-3Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
| 39 | + |
39 | 40 | |
40 | 41 | |
41 | 42 | |
| ||
200 | 201 | |
201 | 202 | |
202 | 203 | |
| 204 | + |
203 | 205 | |
204 | 206 | |
205 | 207 | |
| ||
213 | 215 | |
214 | 216 | |
215 | 217 | |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
216 | 227 | |
217 | 228 | |
218 | 229 | |
| ||
444 | 455 | |
445 | 456 | |
446 | 457 | |
| 458 | + |
| 459 | + |
| 460 | + |
| 461 | + |
| 462 | + |
| 463 | + |
| 464 | + |
| 465 | + |
| 466 | + |
| 467 | + |
| 468 | + |
447 | 469 | |
448 | 470 | |
449 | 471 | |
| ||
462 | 484 | |
463 | 485 | |
464 | 486 | |
465 | | - |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
466 | 492 | |
467 | 493 | |
468 | 494 | |
| ||
581 | 607 | |
582 | 608 | |
583 | 609 | |
| 610 | + |
584 | 611 | |
585 | | - |
586 | | - |
| 612 | + |
| 613 | + |
587 | 614 | |
588 | 615 | |
589 | 616 | |
|
Collapse file
packages/google-auth/google/auth/identity_pool.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/identity_pool.py+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
526 | 526 | |
527 | 527 | |
528 | 528 | |
529 | | - |
530 | | - |
| 529 | + |
531 | 530 | |
532 | 531 | |
533 | 532 | |
|
Collapse file
packages/google-auth/tests/compute_engine/test_credentials.py
Copy file name to clipboardExpand all lines: packages/google-auth/tests/compute_engine/test_credentials.py+35-15Lines changed: 35 additions & 15 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
16 | 17 | |
17 | 18 | |
18 | 19 | |
| ||
202 | 203 | |
203 | 204 | |
204 | 205 | |
| 206 | + |
205 | 207 | |
206 | 208 | |
207 | 209 | |
| ||
248 | 250 | |
249 | 251 | |
250 | 252 | |
251 | | - |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
252 | 258 | |
253 | 259 | |
254 | 260 | |
| ||
406 | 412 | |
407 | 413 | |
408 | 414 | |
409 | | - |
410 | | - |
411 | | - |
412 | | - |
413 | | - |
| 415 | + |
414 | 416 | |
415 | 417 | |
416 | 418 | |
| ||
438 | 440 | |
439 | 441 | |
440 | 442 | |
441 | | - |
442 | | - |
443 | | - |
444 | | - |
445 | 443 | |
446 | 444 | |
447 | 445 | |
448 | 446 | |
449 | | - |
| 447 | + |
450 | 448 | |
451 | 449 | |
452 | 450 | |
| ||
765 | 763 | |
766 | 764 | |
767 | 765 | |
| 766 | + |
| 767 | + |
| 768 | + |
| 769 | + |
| 770 | + |
| 771 | + |
| 772 | + |
| 773 | + |
| 774 | + |
768 | 775 | |
769 | 776 | |
770 | 777 | |
| ||
783 | 790 | |
784 | 791 | |
785 | 792 | |
786 | | - |
787 | | - |
| 793 | + |
| 794 | + |
| 795 | + |
| 796 | + |
788 | 797 | |
789 | 798 | |
790 | 799 | |
| ||
947 | 956 | |
948 | 957 | |
949 | 958 | |
| 959 | + |
| 960 | + |
| 961 | + |
| 962 | + |
| 963 | + |
| 964 | + |
| 965 | + |
| 966 | + |
| 967 | + |
950 | 968 | |
951 | 969 | |
952 | 970 | |
953 | 971 | |
954 | | - |
955 | | - |
| 972 | + |
| 973 | + |
| 974 | + |
| 975 | + |
956 | 976 | |
957 | 977 | |
958 | 978 | |
|
0 commit comments