This repository was archived by the owner on May 12, 2026. It is now read-only.
Commit 45a3682
authored
feat: Async Refresh for Regional Access Boundaries (#1880)
* Added async logic for RAB refresh/ Now self-signed JWT are in RAB scope. Updated tests.
* Lint fixes.
* Url for RAB to include only GDU. Only 500, 502, 503 and 504 lookup errors are now retryable.
* Addressed some PR comments.
* Made cooldown into an AtomicReference removed the synchronized reference.
* Exclude user-seeded RAB and stale RAB error handling
* Removed the user-seeded and stale RAB errors. Soft-expiry now implemented. Nit fixes.
* getRAB() made package-private
* RAB headers now uses guava.ImmutableMap.
* Self-signed JWT now carry RAB headers, unit test updated. RABManager now considers expiryTime as opposed to start time. Minor fixes.
* forkJoin.common pool is no longer used -> now using the executor (in case of async token refresh) or instantiate a new thread.
* Removed Env variables gating RAB.
* Test fix to account for RAB refresh.
* self-signed RAB refresh moved to a helper. Added comments to explain thread vs CompletebleFuture.runAsync.
* Added doc for cooldown logic.
* RAB staleness due to Oauth caching and flaky tests fixed.
* Fixed -> 1. getRequestMetadata calls refreshTrustBoundaryIfExpired without a try catch block. 2. Lock acquiral for refreshFuture.compareAndSet(null, future) now fixed. 3. Oauth2Credentials isn't caching RAB which was earlier leading to serialization issues.
* Using per-instance clocks.
* Reintroduced env variables.
* lint fix.
* Added a readObject metod which reinitializes the clock to Clock.system upon deserialization.
* Changed to guava future.
* Executor is no longer used to execute RAB refresh.
* Addressed Lawrence's comments on RAB PR.1 parent 4b2bdf8 commit 45a3682
29 files changed
Lines changed: 1652 additions & 719 deletions
File tree
- oauth2_http
- javatests/com/google/auth
- oauth2
- java/com/google/auth/oauth2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
| 389 | + | |
394 | 390 | | |
395 | 391 | | |
396 | 392 | | |
| |||
694 | 690 | | |
695 | 691 | | |
696 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
697 | 698 | | |
698 | 699 | | |
699 | 700 | | |
| |||
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
712 | | - | |
| 713 | + | |
713 | 714 | | |
714 | | - | |
715 | | - | |
716 | | - | |
| 715 | + | |
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
| |||
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
229 | | - | |
| 225 | + | |
230 | 226 | | |
231 | 227 | | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | | - | |
238 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 535 | + | |
540 | 536 | | |
541 | 537 | | |
542 | 538 | | |
| |||
565 | 561 | | |
566 | 562 | | |
567 | 563 | | |
568 | | - | |
569 | | - | |
570 | | - | |
| 564 | + | |
571 | 565 | | |
572 | 566 | | |
573 | 567 | | |
| |||
581 | 575 | | |
582 | 576 | | |
583 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
584 | 583 | | |
585 | 584 | | |
586 | 585 | | |
| |||
626 | 625 | | |
627 | 626 | | |
628 | 627 | | |
629 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
630 | 635 | | |
631 | 636 | | |
632 | 637 | | |
633 | 638 | | |
634 | | - | |
635 | | - | |
636 | | - | |
| 639 | + | |
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
| |||
642 | 645 | | |
643 | 646 | | |
644 | 647 | | |
645 | | - | |
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
| |||
0 commit comments