Skip to content
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

Use XDG Base Directory Specification #1839

Closed
pierreprinetti opened this issue Oct 1, 2019 · 5 comments
Closed

Use XDG Base Directory Specification #1839

pierreprinetti opened this issue Oct 1, 2019 · 5 comments
Labels
configuration credentials feature-request This issue requests a feature. p3 This is a minor priority issue

Comments

@pierreprinetti
Copy link

pierreprinetti commented Oct 1, 2019

The XDG specification defines where configuration files and credential files should be placed.

Following this standard ensures a clean home directory and some consistency across applications.

The default directory to write configuration and credentials files should be ${XDG_CONFIG_HOME:-${HOME}/.config}/aws (or %LOCALAPPDATA%\aws\config).

The default directory to read configuration and credentials files should be ${XDG_CONFIG_HOME:-${HOME}/.config}/aws (or %LOCALAPPDATA%\aws\config) first, then ${HOME}/.aws to maintain backwards compatibility.

What do you think?

I am willing to file a change request if this design is accepted.

I hope the Windows values make some sense, as I am not an expert.

cf. https://github.com/aws/aws-cli/issues/2433

@pierreprinetti
Copy link
Author

This proposal does not change the default override logic: the environment variables AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE should maintain their precedence, just like the specific environment variables and command-line switches that refer to specific keys like AWS_ACCESS_KEY_ID or --region <string>.

The proposed change only affects the hardcoded default fallback locations.

@joguSD
Copy link
Contributor

joguSD commented Oct 1, 2019

@pierreprinetti In general, I don't think we're against this change it's simply been more of a priority issue than anything else. There's a relatively high amount of friction in making a change like this as botocore and the AWS CLI aren't the only tools that look at these files. If we make this change it puts pressure on other tools to follow suite (read as we'll likely need consensus before making the change). To be blunt, we likely won't have much time to look into this anytime soon as it's functionally the same and there are workarounds (mentioned in the other thread) if one is really inclined on getting this behavior.

@joguSD joguSD added the feature-request This issue requests a feature. label Oct 1, 2019
@pierreprinetti
Copy link
Author

If this was possible with a small change (and I am not sure it is), would you accept a PR that:

  • on the write side: does not change where the credentials are created; but
  • on the read side: looks into ~/.aws and into the XDG directory?

@tim-finnigan
Copy link
Contributor

tim-finnigan commented Aug 21, 2024

This feature request is now being tracked here in our cross-SDK repository: aws/aws-sdk#30. Feature requests involving credentials/configuration need to be reviewed at a cross-SDK level, since other SDKs rely on those in addition to the CLI. Will close this issue to continue tracking there.

@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration credentials feature-request This issue requests a feature. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

4 participants