Actions
Bug #48472
openrgw crash when get none exist role policy
% Done:
0%
Source:
Tags:
sts
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
rgw will crash when get put delete pocliy to a none exist role
import boto3, json
import botocore
botocore.session.Session().set_debug_logger()
access_key = 'admin'
secret_key = 'admin'
#
configuration = boto3.session.Config(connect_timeout=3000000, read_timeout=3000000, retries={'max_attempts': 0})
#
iam_client = boto3.client('iam',
aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
endpoint_url='http://127.0.0.1:7401',
region_name='',
use_ssl = False,
config = configuration,
)
- iam_client.put_role_policy(
- RoleName='none_exist_role',
- PolicyName='abc',
- PolicyDocument=json.dumps(policy, separators=(',', ':')).strip()
- )
- iam_client.delete_role_policy(
- RoleName='none_exist_role',
- PolicyName='abc'
- )
iam_client.get_role_policy(
RoleName='none_exist_role',
PolicyName='abc',
)
Actions