-
Notifications
You must be signed in to change notification settings - Fork 346
fix: Remove content-type header from IDMS GET requests #1489
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
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
BigTailWolf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Hi Anthonios, the |
|
@peter-volkov thanks for contributing this. I appreciate it. Apologies that it has languished for so long. As one of the maintainers I am engaged in a project to clear out all the PRs in If you happen to be around, are still interested in this PR, and have a few moments, I am working on merging this. It does not have a CLA signature from you. See the second comment for some more details and a link that will take you to a signature opportunity. In the interest of keeping things moving, if I don't have a response from you by Monday Jan 12 @ Noon EST, I will close this PR and fire up one in my own name so that we can proceed with a merge. Sorry if this feels rushed, that is not my intent. It is simply the reality of how this has played out in terms of our workload and team priorities. It looks like I have six tests that need to be updated to ensure that this passes. |
|
Closing in deference to PR #1934 as we prepare to migrate this library to the |
When performing a IMDS request, the code incorrectly adds a content-type header to the request: `content-type: application/json` to AWS metadata (IMDS) GET requests.` Some services at AWS (such as AWS SageMaker Jupyter notebook) have a stricter than normal metadata server (IMDS, both v1 and v2) when it comes to handling incoming http requests. This PR removes the default content-header and replaces it with `None`. NOTE: initializing headers to `None` (instead of an empty `dict`) when no session token is present matches the existing behavior in `_get_metadata_role_name` and allows the transport adapter to handle default headers cleanly. This PR updates existing unit tests (`tests/test_aws.py`) to match the new behavior. NOTE: closing PR #1489 due to inactivity as we make the push to migrate this library to the `google-cloud-python` monorepo For more information about the genesis of this, see the following issue: https://issuetracker.google.com/issues/328089077
Detailed description is here
https://issuetracker.google.com/issues/328089077