Project

General

Profile

Actions

Bug #48472

open

rgw crash when get none exist role policy

Added by joke lee over 3 years ago. Updated over 3 years ago.

Status:
Need More Info
Priority:
Normal
Target version:
-
% 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,
)

  1. iam_client.put_role_policy(
  2. RoleName='none_exist_role',
  3. PolicyName='abc',
  4. PolicyDocument=json.dumps(policy, separators=(',', ':')).strip()
  5. )
  1. iam_client.delete_role_policy(
  2. RoleName='none_exist_role',
  3. PolicyName='abc'
  4. )

iam_client.get_role_policy(
RoleName='none_exist_role',
PolicyName='abc',
)

Actions

Also available in: Atom PDF