Skip to content

Commit 675f07a

Browse files
authored
Merge pull request #82601 from eohartman/osdocs-11794-2
OSDOCS-11794: ROSA CLI security refinements adding CLI output examples - UPDATE
2 parents 86fb85c + d6ce014 commit 675f07a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

modules/rosa-sts-account-wide-roles-and-policies.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,44 @@ The account number present in the `sts_installer_trust_policy.json` and `sts_sup
730730
----
731731
====
732732

733+
[discrete]
734+
[id="rosa-sts-account-wide-roles-and-policies-example-cli-output-for-policies-attached-to-a-role_{context}"]
735+
==== Example CLI output for policies attached to a role
736+
737+
When a policy is attached to a role, the ROSA CLI displays a confirmation output. The output depends on the type of policy.
738+
739+
* If the policy is a trust policy, the ROSA CLI outputs the role name and the content of the policy.
740+
** For the target role with policy attached, ROSA CLI outputs the role name and the console URL of the target role.
741+
+
742+
.Target role with policy attached example output
743+
[source,terminal]
744+
----
745+
I: Attached trust policy to role 'testrole-Worker-Role(https://console.aws.amazon.com/iam/home?#/roles/testrole-Worker-Role)': ******************
746+
----
747+
+
748+
** If the attached policy is a trust policy, the ROSA CLI outputs the content of this policy.
749+
+
750+
.Trust policy example output
751+
[source,terminal]
752+
----
753+
I: Attached trust policy to role 'test-Support-Role': {"Version": "2012-10-17", "Statement": [{"Action": ["sts:AssumeRole"], "Effect": "Allow", "Principal": {"AWS": ["arn:aws:iam::000000000000:role/RH-Technical-Support-00000000"]}}]}
754+
----
755+
* If the policy is a permission policy, the ROSA CLI outputs the name and public link of this policy or the ARN depending on whether or not the policy is an AWS managed policy or customer-managed policy.
756+
** If the attached policy is an AWS managed policy, the ROSA CLI outputs the name and public link of this policy and the role it is attached to.
757+
+
758+
.AWS managed policy example output
759+
[source,terminal]
760+
----
761+
I: Attached policy 'ROSASRESupportPolicy(https://docs.aws.amazon.com/aws-managed-policy/latest/reference/ROSASRESupportPolicy)' to role 'test-HCP-ROSA-Support-Role(https://console.aws.amazon.com/iam/home?#/roles/test-HCP-ROSA-Support-Role)'
762+
----
763+
** If the attached policy is an AWS managed policy, the ROSA CLI outputs the name and public link of this policy and the role it is attached to.
764+
+
765+
.Customer-managed policy example output
766+
[source,terminal]
767+
----
768+
I: Attached policy 'arn:aws:iam::000000000000:policy/testrole-Worker-Role-Policy' to role 'testrole-Worker-Role(https://console.aws.amazon.com/iam/home?#/roles/testrole-Worker-Role)'
769+
----
770+
733771
.ROSA Ingress Operator IAM policy and policy file
734772
[cols="1,2",options="header"]
735773
|===

0 commit comments

Comments
 (0)