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

Make code property check optional in IamAwsProvider #1025

Conversation

balamurugana
Copy link
Member

No description provided.

@vadmeste
Copy link
Member

@balamurugana what does this fix exactly ? Is there any user experiencing issues ?

@balamurugana
Copy link
Member Author

@vadmeste Please refer issue minio/minio-java#1108

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

One comment

@@ -387,10 +382,10 @@ def fetch(self, url):

res = _urlopen(self._http_client, "GET", url)
data = json.loads(res.data)
if data["Code"] != "Success":
if data.get("Code", "Success") != "Success":
Copy link
Member

Choose a reason for hiding this comment

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

Maybe let's check for "AccessKeyId", "SecretAccessKey" and "Token" fields, if they are non empty then we can assume this is successful call

Copy link
Member Author

Choose a reason for hiding this comment

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

If those fields don't have proper values, it will fail at line no 393. I think this check is good enough to address other cases. However this fix is only testable in AWS ECS env.

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM

@balamurugana balamurugana merged commit 0b4e2ce into minio:master Nov 24, 2020
@balamurugana balamurugana deleted the Make-code-property-check-optional-in-IamAwsProvider branch November 24, 2020 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants