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

Pick up AWS credentials from ENV #1310

Merged
merged 3 commits into from
Dec 19, 2019
Merged

Pick up AWS credentials from ENV #1310

merged 3 commits into from
Dec 19, 2019

Conversation

sebastiankirsch
Copy link
Contributor

With various AWS authentication mechanisms already in place, one of the most basic ones is yet missing: configuring credentials via environment variables.

See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html

@rohanKanojia rohanKanojia requested a review from rhuss December 12, 2019 10:07
@codecov
Copy link

codecov bot commented Dec 12, 2019

Codecov Report

Merging #1310 into master will increase coverage by 0.13%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #1310      +/-   ##
============================================
+ Coverage     56.33%   56.47%   +0.13%     
- Complexity     1798     1805       +7     
============================================
  Files           157      157              
  Lines          8547     8560      +13     
  Branches       1314     1317       +3     
============================================
+ Hits           4815     4834      +19     
+ Misses         3257     3254       -3     
+ Partials        475      472       -3
Impacted Files Coverage Δ Complexity Δ
...o/fabric8/maven/docker/util/AuthConfigFactory.java 71.62% <100%> (+3.51%) 80 <3> (+7) ⬆️

Copy link
Member

@rohanKanojia rohanKanojia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks a lot!

Could you please add some documentation also about this change and update doc/changelog.md?

@sebastiankirsch
Copy link
Contributor Author

I've adapted the changelog and also the documentation of the Extended Authentication.
Thanks for the hint!

@rohanKanojia
Copy link
Member

@sebastiankirsch : Np, Let's wait for Roland to review.

@sebastiankirsch
Copy link
Contributor Author

@rhuss I gave this some more thought and realized that there are also Named Profiles that people might use to authenticate against AWS.
As an alternative to this PR and all the other AWS authentication mechanisms in the AuthConfigFactory, one could include the com.amazonaws:aws-java-sdk-core library and simply use the DefaultAWSCredentialsProviderChain. This would come with a noticeable dependency chain though...

@rhuss
Copy link
Collaborator

rhuss commented Dec 16, 2019

Sorry for the delay, year-end-stress here. For using the AWS support directly: What's about making this optional ? E.g. when the plugin is configured manually to use this dependency (within a <plugin><dependencies> section), then the SDK support would be used ? We could just a lookup via reflection in config factory.

wdyt ?

@sebastiankirsch
Copy link
Contributor Author

Sorry for the delay, year-end-stress here. For using the AWS support directly: What's about making this optional ? E.g. when the plugin is configured manually to use this dependency (within a <plugin><dependencies> section), then the SDK support would be used ? We could just a lookup via reflection in config factory.

wdyt ?

Good idea. It would be a breaking change though (assuming the "native" support would be dropped), not sure what your stance is on this.

@rhuss
Copy link
Collaborator

rhuss commented Dec 16, 2019

Good idea. It would be a breaking change though (assuming the "native" support would be dropped), not sure what your stance is on this.

I mean we could keep the current support and use it if request but not official SDK dependency has been declared.

But let's get that PR merged first, I hope I find some room until the weekend (but year-end-stress here ....)

Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! looks good to me

@rhuss rhuss merged commit 1caa71d into fabric8io:master Dec 19, 2019
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 18, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 18, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 18, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 18, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 18, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this pull request Jun 22, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to eclipse-jkube#702

Signed-off-by: Rohan Kumar <[email protected]>
manusa pushed a commit to eclipse-jkube/jkube that referenced this pull request Jun 23, 2021
Add support in AuthConfigFactory to retrieve credentials from
different mechanisms for AWS.

Port of fabric8io/docker-maven-plugin#1311
Port of fabric8io/docker-maven-plugin#1310

Related to #702

Signed-off-by: Rohan Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants