Commit 4c19da4
committed
fix(aws): force credential refresh in provider refresh functions
- Add force refresh logic to EC2, STS, and EKS credential providers
- Set next_refresh to 0 in refresh functions to ensure immediate credential update
- Fixes MSK IAM authentication failures after ~1 hour due to stale credentials
- Aligns with AWS SDK behavior where refresh() means force refresh
This resolves the issue where OAuth token refresh (every ~15 minutes) would
not actually refresh AWS credentials until next_refresh time was reached
(typically 1 hour later), causing MSK connection failures with 'Access denied'
errors.
The fix ensures that every OAuth callback will fetch fresh credentials from
AWS, matching the behavior of official AWS SDKs (Python, Java).
Signed-off-by: Arbin <[email protected]>1 parent ca35c22 commit 4c19da4
File tree
4 files changed
+26
-9
lines changed- src/aws
4 files changed
+26
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
667 | | - | |
| 666 | + | |
668 | 667 | | |
669 | 668 | | |
670 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
483 | 490 | | |
484 | 491 | | |
485 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
643 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
644 | 651 | | |
645 | 652 | | |
646 | 653 | | |
| |||
0 commit comments