Skip to content

fix: if basic and iam creds given, use iam and dont set basic auth he… #755

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

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

dpopp07
Copy link
Contributor

@dpopp07 dpopp07 commented Jul 24, 2018

Before, if multiple forms of credentials were given, the SDK would prioritize the IAM credentials but would still create a header for basic auth or api key auth. This would cause unauthorized errors from the service if the username/password/apikey were invalid.

This PR ignores making that header if IAM credentials are specified. Test is included.

@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

Merging #755 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #755      +/-   ##
==========================================
+ Coverage   83.18%   83.19%   +<.01%     
==========================================
  Files          35       35              
  Lines        4390     4392       +2     
  Branches      553      555       +2     
==========================================
+ Hits         3652     3654       +2     
  Misses        357      357              
  Partials      381      381
Impacted Files Coverage Δ
lib/base_service.ts 83.03% <100%> (+0.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c6882c...e91e7b3. Read the comment docs.

@anweshan anweshan merged commit 1e2d28d into master Jul 24, 2018
@dpopp07 dpopp07 deleted the fix-multi-auth-bug branch July 24, 2018 22:15
@watson-github-bot
Copy link
Collaborator

🎉 This PR is included in version 3.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants