allows access only to applications with the app id given in the trust policy document. The Condition
is of the form::
- "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Federated\":[\"arn:aws:iam:::oidc-provider/<URL of IDP>\"]},\"Action\":[\"sts:AssumeRoleWithWebIdentity\"],\"Condition\":{\"StringEquals\":{\"<URL of IDP> :app_id\":\"<aud>\"\}\}\}\]\}"
+ '''{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Federated":["arn:aws:iam:::oidc-provider/<URL of IDP>"]},"Action":["sts:AssumeRoleWithWebIdentity"],"Condition":{"StringEquals":{"<URL of IDP> :app_id":"<aud>"}}}]}'''
The app_id in the condition above must match the 'aud' field of the incoming token.
region_name=''
)
- policy_document = "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"arn:aws:iam:::user/TESTER1\"]},\"Action\":[\"sts:AssumeRole\"]}]}"
+ policy_document = '''{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER1"]},"Action":["sts:AssumeRole"]}]}'''
role_response = iam_client.create_role(
AssumeRolePolicyDocument=policy_document,
RoleName='S3Access',
)
- role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"arn:aws:s3:::*\"}}"
+ role_policy = '''{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"s3:*","Resource":"arn:aws:s3:::*"}}'''
response = iam_client.put_role_policy(
RoleName='S3Access',
]
)
- policy_document = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Federated\":[\"arn:aws:iam:::oidc-provider/localhost:8080/auth/realms/demo\"]},\"Action\":[\"sts:AssumeRoleWithWebIdentity\"],\"Condition\":{\"StringEquals\":{\"localhost:8080/auth/realms/demo:app_id\":\"customer-portal\"}}}]}"
+ policy_document = '''{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Federated":["arn:aws:iam:::oidc-provider/localhost:8080/auth/realms/demo"]},"Action":["sts:AssumeRoleWithWebIdentity"],"Condition":{"StringEquals":{"localhost:8080/auth/realms/demo:app_id":"customer-portal"}}}]}'''
role_response = iam_client.create_role(
AssumeRolePolicyDocument=policy_document,
Path='/',
RoleName='S3Access',
)
- role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"arn:aws:s3:::*\"}}"
+ role_policy = '''{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"s3:*","Resource":"arn:aws:s3:::*"}}'''
response = iam_client.put_role_policy(
RoleName='S3Access',
To delete a role, execute the following::
- radosgw-admin role rm --role-name={role-name}
+ radosgw-admin role delete --role-name={role-name}
Request Parameters
~~~~~~~~~~~~~~~~~~
For example::
- radosgw-admin role rm --role-name=S3Access1
+ radosgw-admin role delete --role-name=S3Access1
Note: A role can be deleted only when it doesn't have any permission policy attached to it.
To delete permission policy attached to a role, execute the following::
- radosgw-admin role policy rm --role-name={role-name} --policy-name={policy-name}
+ radosgw-admin role policy delete --role-name={role-name} --policy-name={policy-name}
Request Parameters
~~~~~~~~~~~~~~~~~~
For example::
- radosgw-admin role-policy get --role-name=S3Access1 --policy-name=Policy1
+ radosgw-admin role-policy delete --role-name=S3Access1 --policy-name=Policy1
REST APIs for Manipulating a Role
cout << " orphans list-jobs deprecated -- list the current job-ids for orphans search\n";
cout << " * the three 'orphans' sub-commands are now deprecated; consider using the `rgw-orphan-list` tool\n";
cout << " role create create a AWS role for use with STS\n";
- cout << " role rm remove a role\n";
+ cout << " role delete remove a role\n";
cout << " role get get a role\n";
cout << " role list list roles with specified path prefix\n";
cout << " role modify modify the assume role policy of an existing role\n";
cout << " role-policy put add/update permission policy to role\n";
cout << " role-policy list list policies attached to a role\n";
cout << " role-policy get get the specified inline policy document embedded with the given role\n";
- cout << " role-policy rm remove policy attached to a role\n";
+ cout << " role-policy delete remove policy attached to a role\n";
cout << " reshard add schedule a resharding of a bucket\n";
cout << " reshard list list all bucket resharding or scheduled to be resharded\n";
cout << " reshard status read bucket resharding status\n";
orphans list-jobs deprecated -- list the current job-ids for orphans search
* the three 'orphans' sub-commands are now deprecated; consider using the `rgw-orphan-list` tool
role create create a AWS role for use with STS
- role rm remove a role
+ role delete remove a role
role get get a role
role list list roles with specified path prefix
role modify modify the assume role policy of an existing role
role-policy put add/update permission policy to role
role-policy list list policies attached to a role
role-policy get get the specified inline policy document embedded with the given role
- role-policy rm remove policy attached to a role
+ role-policy delete remove policy attached to a role
reshard add schedule a resharding of a bucket
reshard list list all bucket resharding or scheduled to be resharded
reshard status read bucket resharding status