-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Proposal: Integrate better with the shared credentials file #847
Comments
Option 3 👍. Using a single set of credentials between the CLI and my favorite SDK is a no-brainer. |
+1 for option 3. |
3++ Makes for a small risk of confusion short term, but that's better than long term inconsistency and confusion, which is what we've lived with for too many years with AWS command line tools. |
Another 👍 for option 3. |
Just want to make sure I understand. Option 3 would automatically move credentials to ~/.aws/credentials but there would still be a ~/.aws/config file and it would still contain any non-credential attributes defined in ~/.aws/config, right? And those non-credentail attributes would still be accessible if I did a get_scoped_config() call? Would the credential also appear in the dict returned by a get_scoped_config() call? |
+1 option 3 |
@garnaat Yes that's correct. Ideally the change is only to the So it sounds like option 3 is the option we should go with. To flesh this out a bit more:
Thanks everyone for the feedback, it was really helpful. |
Fixes aws#847. The change is implemented as specified in the issue: * Anytime you set credential variables (access_key/secret_key/session_token) using the `configure` command or the `configure set` command, the values are always written to `~/.aws/credentials`. * Getting access_key/secret_key/session_token will look in the shared credentials file first before looking in the CLI config file. This does *not* do anything with automatically migrating over to the shared credentials file, that is, if you have credentials in the CLI config file and you run `aws configure` and hit enter 4 times, we will not write out values to the shared credentials file because there are no new values to write out.
* creds-file-default: Add issue #847 to the changelog Incorporate review feedback. The configure command writes out cred vars to shared credentials file Add test coverage to credentials file
* release-1.5.0: (22 commits) Bumping version to 1.5.0 Update CHANGELOG with new entries Update comment with a better explanation of the error tests Add error integration tests Update CLI to work with normalized botocore models Cut down memory use in stream testing Incorporated feedback on stream tests. Fixed too much memory usage for s3 streaming Updated changelog entry. Default s3 streaming to --only-show-errors Cleaned up the streaming code. Cut down memory usage to mutipart upload a stream. Added the ability to stream data using ``cp``. Updated changelog with latest feature. Improved s3 output testing. Added a ``--only-show-errors`` argument. Cleaned up ``print_thread`` code. Errors and warnings are printed to stderr. Add issue #847 to the changelog Incorporate review feedback. ...
Version 1.3.13 of the CLI added support for loading credentials from the
~/.aws/credentials
file. With this change, if credentials are found in the~/.aws/credentials
file, those credentials will be used over the credentials in the~/.aws/config
file.The benefit of using the
~/.aws/credentials
file is two fold:~/.aws/credentials
file, whereas the~/.aws/config
is specific to the AWS CLI.So by using the
~/.aws/credentials
file, you won’t have to worry about configuration credentials for any other AWS SDKs, which makes interoperability nice.However, none of the
aws configure
commands (includingaws configure get/set
) were updated. This means that all of our control plane commands for dealing with configuration operated solely on the~/.aws/config
file. This is simple and easy to understand.This issue is broadly about what we can do with our
aws configure
suite of commands to integrate better with the~/.aws/credentials
file. On one of the spectrum, we can completely switch over to~/.aws/credentials
and not allow credentials to be written into the~/.aws/config
via theconfigure
commands (though we’d still support loading credentials from~/.aws/config
for backwards compatibility). On the other end we can leave things the way they are and users need to manually create/edit the~/.aws/credentials
file. Below are a few proposals. Feedback would be much appreciated.Option 1: Do Nothing
Simple, don’t make any changes. Keep everything as it is now.
Option 2: Add options to use shared credentials
Add a
--use-shared-credentials/--no-use-shared-credentials
option that allows the user to explicitly specify which file they want to use. So for example:There’s also the question of what to do about the default. Having a default of
--no-use-shared-credentials
would make using the shared credentials file completely opt in. Defaulting to--use-shared-credentials
would be a change in behavior and would mean you’d need to opt out of using the shared credentials file.Option 3: Automatically Switch Over
This option would always use used the shared credentials file whenever possible for access/secret/token vars. This is basically
—use-shared-credentials
, but always enabled. With this option the user doesn’t have to do anything, we’ll just automatically always write out access/secret/session key information to~/.aws/credentials
. If a user wants credentials in~/.aws/config
they will need to manually edit their config file.It would be really helpful to get feedback about which (if any) of these options people prefer.
The text was updated successfully, but these errors were encountered: