question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

resolve RefreshableCredentials.token issue

See original GitHub issue

we currently disable the token property because it needs to be an async call. See: https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/credentials.py#L259

This is called in places like SigV4Auth._modify_request_before_signing which is called by SigV4Auth.add_auth. I haven’t check upstream who calls this yet

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
thehesiodcommented, Mar 4, 2022

wow didn’t expect so much time dedicated to this, hehe, awesome. I ran into this because we’re migrating to opensearch which apparently requires SigV4Auth, just created some aiohttp helpers for that, maybe will make some time to make a module for that. I’d post it on a gist but then someone will snarf it before I create a module 😉

0reactions
terrycaincommented, Mar 5, 2022

Ok from what I can see. The only place SigV4Auth is instantiated is in the AUTH_TYPE_MAPS dict in auth.py, and the only place it’s values are accessed would be in signers.py, which we’ve supplied the credentials as get_frozen_credentials() so calling self.credentials.token should be safe as it should be an instance of ReadOnlyCredentials.

In theory if calling get_frozen_credentials on one of the credential providers doesn’t return a ReadOnlyCredentials object then it would cause issues. Don’t suppose you can send me some info on how to recreate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RefreshableCredentials Class fetches credentials too eagerly
This causes the botocore calls to consistently refresh the token which ends up in a failing request. There is actually a similar issue...
Read more >
How to refresh the boto3 credetials when python script is ...
client('s3') again its throwing exception. What am I doing wrong? Or how can I resolve it? Below is the code snippet try: s3...
Read more >
Refreshing AWS credentials in Python - Owen Rumney
NET AWS SDK to solve an issue with the way my current organisation has configured SingleSignOn (SSO) and temporary credentials.
Read more >
Credentials — Boto3 Docs 1.26.35 documentation - AWS
ACCESS_KEY , SECRET_KEY , and SESSION_TOKEN are variables that contain your access key, secret key, and optional session token. Note that the examples...
Read more >
Troubleshoot AWS STS security token expired errors when ...
How can I troubleshoot the AWS STS error “the security token included in the request is expired” when using the AWS CLI to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found