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

fix(VpcInstanceAuthenticator): omit request body for default profile scenario #181

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

padamstx
Copy link
Member

@padamstx padamstx commented Dec 7, 2021

This PR fixes a small problem in the VPC instance token manager related to the "default profile" scenario.
Previously, the token manager would send an empty request body (i.e. { }) if both iamProfileId and iamProfileCrn were both unspecified. This would cause a 400 Bad Request to be returned by the VPC Instance Metadata Service.
The fix is to simply avoid sending a request body at all for this scenario.

Checklist
  • npm test passes (tip: npm run lint-fix can correct most style issues)
  • tests are included
  • documentation is changed or added

@padamstx padamstx requested a review from dpopp07 December 7, 2021 23:12
@padamstx padamstx self-assigned this Dec 8, 2021
Copy link
Member

@dpopp07 dpopp07 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 for the quick fix

@padamstx padamstx merged commit 1e3fb2d into main Dec 8, 2021
@padamstx padamstx deleted the fix-vpcauth branch December 8, 2021 18:59
ibm-devx-sdk pushed a commit that referenced this pull request Dec 8, 2021
## [2.17.2](v2.17.1...v2.17.2) (2021-12-08)

### Bug Fixes

* **VpcInstanceAuthenticator:** omit request body for default profile scenario ([#181](#181)) ([1e3fb2d](1e3fb2d))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 2.17.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

JurajNyiri pushed a commit to JurajNyiri/node-sdk-core that referenced this pull request Aug 22, 2024
Generated SDK source code using:
- Generator version 3.26.0
- Specification version 1.0.0-dev0.0.31
- Automation (cloudant-sdks) version 0ead36e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants