Chapter 2. Tutorial: Verifying permissions for a Red Hat OpenShift Service on AWS classic architecture STS deployment
To proceed with the deployment of a Red Hat OpenShift Service on AWS classic architecture cluster, an account must support the required roles and permissions. AWS Service Control Policies (SCPs) cannot block the API calls made by the installer or Operator roles.
Details about the IAM resources required for an STS-enabled installation of Red Hat OpenShift Service on AWS classic architecture can be found here: About IAM resources for Red Hat OpenShift Service on AWS classic architecture clusters that use STS.
This guide is validated for Red Hat OpenShift Service on AWS classic architecture v4.11.X.
2.1. Prerequisites Copy linkLink copied to clipboard!
2.2. Verifying Red Hat OpenShift Service on AWS classic architecture permissions Copy linkLink copied to clipboard!
To verify the permissions required for Red Hat OpenShift Service on AWS classic architecture, we can run the script included in the following section without ever creating any AWS resources.
The script uses the rosa, aws, and jq CLI commands to create files in the working directory that will be used to verify permissions in the account connected to the current AWS configuration.
The AWS Policy Simulator is used to verify the permissions of each role policy against the API calls extracted by jq; results are then stored in a text file appended with .results.
This script is designed to verify the permissions for the current account and region.
2.3. Usage Instructions Copy linkLink copied to clipboard!
To use the script, run the following commands in a
bashterminal (the -p option defines a prefix for the roles):Copy to Clipboard Copied! Toggle word wrap Toggle overflow After the script completes, review each results file to ensure that none of the required API calls are blocked:
for file in $(ls *.results); do echo $file; cat $file; done
$ for file in $(ls *.results); do echo $file; cat $file; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow The output will look similar to the following:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf any actions are blocked, review the error provided by AWS and consult with your Administrator to determine if SCPs are blocking the required API calls.