mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
STS issue fix (https://tracker.ceph.com/issues/47588)
This is the fix for the issue reported (https://tracker.ceph.com/issues/47588). The issue was with the argument which was passed to the function. After removing that argument (as it's already an optional argument) the issue is fixed. Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
This commit is contained in:
parent
54103207e4
commit
daf9062a22
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ def test_get_session_token():
|
||||||
user_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":[\"*\"],\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}},{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}}]}"
|
user_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":[\"*\"],\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}},{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}}]}"
|
||||||
(resp_err,resp)=put_user_policy(iam_client,sts_user_id,None,user_policy)
|
(resp_err,resp)=put_user_policy(iam_client,sts_user_id,None,user_policy)
|
||||||
eq(resp['ResponseMetadata']['HTTPStatusCode'],200)
|
eq(resp['ResponseMetadata']['HTTPStatusCode'],200)
|
||||||
response=sts_client.get_session_token(DurationSeconds=43200)
|
response=sts_client.get_session_token()
|
||||||
eq(response['ResponseMetadata']['HTTPStatusCode'],200)
|
eq(response['ResponseMetadata']['HTTPStatusCode'],200)
|
||||||
s3_client=boto3.client('s3',
|
s3_client=boto3.client('s3',
|
||||||
aws_access_key_id = response['Credentials']['AccessKeyId'],
|
aws_access_key_id = response['Credentials']['AccessKeyId'],
|
||||||
|
@ -116,7 +116,7 @@ def test_get_session_token_permanent_creds_denied():
|
||||||
user_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":[\"*\"],\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}},{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}}]}"
|
user_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":[\"*\"],\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}},{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}}]}"
|
||||||
(resp_err,resp)=put_user_policy(iam_client,sts_user_id,None,user_policy)
|
(resp_err,resp)=put_user_policy(iam_client,sts_user_id,None,user_policy)
|
||||||
eq(resp['ResponseMetadata']['HTTPStatusCode'],200)
|
eq(resp['ResponseMetadata']['HTTPStatusCode'],200)
|
||||||
response=sts_client.get_session_token(DurationSeconds=43200)
|
response=sts_client.get_session_token()
|
||||||
eq(response['ResponseMetadata']['HTTPStatusCode'],200)
|
eq(response['ResponseMetadata']['HTTPStatusCode'],200)
|
||||||
s3_client=boto3.client('s3',
|
s3_client=boto3.client('s3',
|
||||||
aws_access_key_id = s3_main_access_key,
|
aws_access_key_id = s3_main_access_key,
|
||||||
|
|
Loading…
Reference in a new issue