-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add account ID to the environment variable credential provider #3332
base: account-id-endpoint-routing
Are you sure you want to change the base?
Add account ID to the environment variable credential provider #3332
Conversation
4fd012d
to
7295068
Compare
7295068
to
0816d5d
Compare
@@ -1127,8 +1129,12 @@ def __init__(self, environ=None, mapping=None): | |||
:param mapping: An optional mapping of variable names to | |||
environment variable names. Use this if you want to | |||
change the mapping of access_key->AWS_ACCESS_KEY_ID, etc. | |||
The dict can have up to 3 keys: ``access_key``, ``secret_key``, | |||
``session_token``. | |||
The dict can have up to 5 keys: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current mapping is:
{
'access_key': 'AWS_ACCESS_KEY_ID',
'secret_key': 'AWS_SECRET_ACCESS_KEY',
'token': ['AWS_SECURITY_TOKEN', 'AWS_SESSION_TOKEN'],
'expiry_time': 'AWS_CREDENTIAL_EXPIRATION',
'account_id': 'AWS_ACCOUNT_ID',
}
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## account-id-endpoint-routing #3332 +/- ##
==============================================================
Coverage ? 93.18%
==============================================================
Files ? 66
Lines ? 14430
Branches ? 0
==============================================================
Hits ? 13446
Misses ? 984
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
Overview
This PR introduces
account_id
to the environment variable credential provider. With this update, users can now provide anAWS_ACCOUNT_ID
environment variable, which will be associated with the credentials when they are loaded.Testing
Functional testing to ensure the
account_id
gets propagated and resolved to the correct endpoint for each credential provider will be added in an upcoming PR.