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

Resolve AwsClientCredentials if not provided #166

Merged
merged 2 commits into from
Apr 24, 2020
Merged

Resolve AwsClientCredentials if not provided #166

merged 2 commits into from
Apr 24, 2020

Conversation

Schwusch
Copy link
Collaborator

Partially resolves #160.
Tries to resolve credentials from these places if no credentials are provided:

  • Environment Variables
  • Credential profiles file at the default location (~/.aws/credentials) or AWS_SHARED_CREDENTIALS_FILE if set

Does not resolve from these sources:

  • Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" environment variable is set and security manager has permission to access the variable,
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • Web Identity Token credentials from the environment or container.

@isoos
Copy link
Contributor

isoos commented Apr 23, 2020

Looks good! Please fix formatting.

Not urgent, but maybe in the future resolve() could also use a pre-populated value too.

@Schwusch
Copy link
Collaborator Author

use a pre-populated value too

Do you mean partial credentials, filling in the rest? Would it override or be overridden?

@isoos
Copy link
Contributor

isoos commented Apr 23, 2020

Do you mean partial credentials, filling in the rest? Would it override or be overridden?

resolve() is almost like a singleton. If it gets a "setter" (we can call it setGlobalCredential or setResolveInstance) then an app can set it up as a "global" variable and downstream code can just use it.

@Schwusch
Copy link
Collaborator Author

If it gets a "setter" then an app can set it up as a "global" variable

I'm not certain how that would look, so I didn't add it this time.

@isoos
Copy link
Contributor

isoos commented Apr 24, 2020

I'm not certain how that would look, so I didn't add it this time.

Yeah, this can be figured out later.

@isoos isoos merged commit 628e921 into agilord:master Apr 24, 2020
@Schwusch Schwusch deleted the optional_credentials branch April 26, 2020 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make AwsClientCredentials constructor argument optional
2 participants