Skip to content

fix: empty string check for aws url validation#1089

Merged
sai-sunder-s merged 5 commits intogoogleapis:mainfrom
sai-sunder-s:awsurlempty
Nov 14, 2022
Merged

fix: empty string check for aws url validation#1089
sai-sunder-s merged 5 commits intogoogleapis:mainfrom
sai-sunder-s:awsurlempty

Conversation

@sai-sunder-s
Copy link
Copy Markdown
Contributor

@sai-sunder-s sai-sunder-s commented Nov 10, 2022

Validate aws metadata urls only if they are not null or empty. It is possible to fetch tokens successfully even if metadata urls are not provided but required environment variables are set. If both metadata urls and env vars are not provided, we will throw an exception.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Nov 10, 2022
@sai-sunder-s sai-sunder-s marked this pull request as ready for review November 10, 2022 04:59
@sai-sunder-s sai-sunder-s requested a review from a team November 10, 2022 04:59
Comment thread oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java Outdated
Comment thread oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java Outdated
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 10, 2022
@sai-sunder-s sai-sunder-s added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 11, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 11, 2022
Comment thread oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java
Comment thread oauth2_http/javatests/com/google/auth/oauth2/AwsCredentialsTest.java Outdated
Copy link
Copy Markdown

@TimurSadykov TimurSadykov left a comment

Choose a reason for hiding this comment

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

LGTM, except i would allow uppercase host

@sai-sunder-s sai-sunder-s merged commit 6f177a1 into googleapis:main Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants