-
Notifications
You must be signed in to change notification settings - Fork 323
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
Make code property check optional in IamAwsProvider #1025
Conversation
@balamurugana what does this fix exactly ? Is there any user experiencing issues ? |
@vadmeste Please refer issue minio/minio-java#1108 |
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.
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": |
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.
Maybe let's check for "AccessKeyId", "SecretAccessKey" and "Token" fields, if they are non empty then we can assume this is successful call
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.
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.
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
No description provided.