$ rosa create ocm-role
要部署使用AWS安全令牌服务(STS)的AWS上的Red Hat OpenShift服务(ROSA)集群,必须创建以下AWS身份访问管理(IAM)资源
提供ROSA支持、安装、控制平面和计算功能所需的STS权限的特定帐户范围的IAM角色和策略。这包括帐户范围的Operator策略。
允许ROSA集群Operator执行核心OpenShift功能的集群特定Operator IAM角色。
集群Operator用于身份验证的OpenID Connect (OIDC)提供程序。
如果使用OpenShift集群管理器部署ROSA,则必须创建其他资源
一个OpenShift集群管理器IAM角色,用于完成集群的安装。
一个没有任何权限的用户角色,用于验证您的AWS账户身份。
本文档提供了关于创建使用STS的ROSA集群时必须部署的IAM资源的参考信息。它还包括使用rosa create
命令的manual
模式时生成的aws
CLI命令。
有关快速创建使用STS的ROSA集群(包括AWS IAM资源)的步骤,请参见使用默认选项创建ROSA集群。
有关使用自定义项(包括AWS IAM资源)创建使用STS的ROSA集群的步骤,请参见使用自定义项创建ROSA集群。
如果使用OpenShift集群管理器创建ROSA集群,则必须将以下AWS IAM角色链接到您的AWS账户才能创建和管理集群。有关将IAM角色链接到AWS账户的更多信息,请参见关联您的AWS账户。
如果只使用ROSA CLI ( |
这些AWS IAM角色如下所示
ROSA用户角色是Red Hat用来验证客户AWS身份的AWS角色。此角色没有任何其他权限,并且该角色与Red Hat安装程序帐户具有信任关系。
ocm-role
资源授予在OpenShift集群管理器中安装ROSA集群所需的权限。您可以将基本权限或管理权限应用于ocm-role
资源。如果创建管理ocm-role
资源,OpenShift集群管理器可以创建所需的AWS Operator角色和OpenID Connect (OIDC)提供程序。此IAM角色还会与Red Hat安装程序帐户建立信任关系。
|
如果要使用OpenShift集群管理器中的自动模式创建Operator角色策略和OIDC提供程序,则必须创建此用户角色以及管理ocm-role
资源。
在OpenShift集群管理器中创建ROSA集群需要ocm-role
IAM角色。基本的ocm-role
IAM角色权限允许您在OpenShift集群管理器中执行集群维护。要自动创建Operator角色和OpenID Connect (OIDC)提供程序,必须将--admin
选项添加到rosa create
命令。此命令将创建一个具有执行管理任务所需的其他权限的ocm-role
资源。
此高级IAM角色允许OpenShift集群管理器在集群创建期间自动创建集群特定的Operator角色和OIDC提供程序。有关此自动角色和策略创建的更多信息,请参见“其他资源”中的“帐户范围的角色创建方法”链接。 |
除了ocm-role
IAM角色外,还必须创建一个用户角色,以便AWS上的Red Hat OpenShift服务可以验证您的AWS身份。此角色没有任何权限,仅用于在安装程序帐户和您的ocm-role
资源之间创建信任关系。
下表显示了ocm-role
资源的相关基本权限和管理权限。
资源 | 描述 |
---|---|
|
此权限允许基本角色检索有关指定 OpenID Connect (OIDC) 提供程序的信息。 |
|
此权限允许基本角色检索指定角色的任何信息。返回的一些数据包括角色的路径、GUID、ARN 和授予承担该角色权限的角色信任策略。 |
|
此权限允许基本角色列出路径前缀内的角色。 |
|
此权限允许基本角色列出指定角色上的标签。 |
|
此权限允许基本角色返回有关帐户上所有已启用区域的信息。 |
|
此权限允许基本角色返回有关所有路由表的信息。 |
|
此权限允许基本角色返回有关所有子网的信息。 |
|
此权限允许基本角色返回有关所有虚拟私有云 (VPC) 的信息。 |
|
此权限允许基本角色检索临时安全凭证,以访问超出其正常权限的 AWS 资源。 |
|
此权限允许基本角色为使用 Web 身份提供程序对其帐户进行身份验证的用户检索临时安全凭证。 |
资源 | 描述 |
---|---|
|
此权限允许管理员角色将指定的策略附加到所需的 IAM 角色。 |
|
此权限创建一个描述身份提供程序的资源,该提供程序支持 OpenID Connect (OIDC)。当您使用此权限创建 OIDC 提供程序时,此提供程序会在提供程序和 AWS 之间建立信任关系。 |
|
此权限允许管理员角色为您的 AWS 帐户创建角色。 |
|
此权限允许管理员角色列出与您的 AWS 帐户关联的任何策略。 |
|
此权限允许管理员角色列出指定策略上的任何标签。 |
|
此权限允许管理员角色基于指定的策略更改用户的权限边界。 |
|
此权限允许管理员角色向 IAM 角色添加标签。 |
您可以使用命令行界面 (CLI) 创建 ocm-role
IAM 角色。
您拥有一个 AWS 帐户。
您在 OpenShift 集群管理器组织中拥有 Red Hat 组织管理员权限。
您拥有安装 AWS 帐户范围角色所需的权限。
您已在安装主机上安装并配置了最新的 Red Hat OpenShift Service on AWS (ROSA) CLI,即 rosa
。
要创建具有基本权限的 ocm-role IAM 角色,请运行以下命令
$ rosa create ocm-role
要创建具有管理员权限的 ocm-role IAM 角色,请运行以下命令
$ rosa create ocm-role --admin
此命令允许您通过指定特定属性来创建角色。以下示例输出显示了选择的“自动模式”,该模式允许 ROSA CLI (rosa
) 创建您的 Operator 角色和策略。有关更多信息,请参阅其他资源中的“帐户范围角色创建方法”。
I: Creating ocm role
? Role prefix: ManagedOpenShift (1)
? Enable admin capabilities for the OCM role (optional): No (2)
? Permissions boundary ARN (optional): (3)
? Role Path (optional): (4)
? Role creation mode: auto (5)
I: Creating role using 'arn:aws:iam::<ARN>:user/<UserName>'
? Create the 'ManagedOpenShift-OCM-Role-182' role? Yes (6)
I: Created role 'ManagedOpenShift-OCM-Role-182' with ARN 'arn:aws:iam::<ARN>:role/ManagedOpenShift-OCM-Role-182'
I: Linking OCM role
? OCM Role ARN: arn:aws:iam::<ARN>:role/ManagedOpenShift-OCM-Role-182 (7)
? Link the 'arn:aws:iam::<ARN>:role/ManagedOpenShift-OCM-Role-182' role with organization '<AWS ARN>'? Yes (8)
I: Successfully linked role-arn 'arn:aws:iam::<ARN>:role/ManagedOpenShift-OCM-Role-182' with organization account '<AWS ARN>'
1 | 所有已创建 AWS 资源的前缀值。在此示例中,ManagedOpenShift 作为所有 AWS 资源的前缀。 |
||
2 | 选择是否要让此角色拥有其他管理员权限。
|
||
3 | 用于设置权限边界的策略的 Amazon 资源名称 (ARN)。 | ||
4 | 为用户名指定 IAM 路径。 | ||
5 | 选择创建 AWS 角色的方法。使用 auto ,ROSA CLI 会生成并链接角色和策略。在 auto 模式下,您会收到一些不同的提示来创建 AWS 角色。 |
||
6 | auto 方法会询问您是否要使用您的前缀创建特定的 ocm-role 。 |
||
7 | 确认您要将您的 IAM 角色与您的 OpenShift 集群管理器关联。 | ||
8 | 将创建的角色与您的 AWS 组织链接。 |
AWS IAM 角色链接到您的 AWS 帐户以创建和管理集群。有关将您的 IAM 角色链接到您的 AWS 帐户的更多信息,请参阅 关联您的 AWS 帐户。
本节提供有关使用 STS 的 ROSA 部署所需的帐户范围 IAM 角色和策略的详细信息,包括 Operator 策略。它还包括定义策略的 JSON 文件。
帐户范围的角色和策略特定于 Red Hat OpenShift Service on AWS 次要发行版本(例如 Red Hat OpenShift Service on AWS 4.17),并与早期版本兼容。您可以通过对相同次要版本的多个集群(无论其补丁版本如何)重用帐户范围的角色和策略来最大限度地减少所需的 STS 资源。
您可以使用 Red Hat OpenShift Service on AWS (ROSA) CLI (rosa
) 或 OpenShift 集群管理器 指导安装来创建帐户范围的角色。您可以手动创建角色,也可以使用自动流程创建角色,该流程使用预定义的名称来命名这些角色和策略。
如果您拥有在系统上创建这些角色所需的 CLI 访问权限,则可以使用手动创建方法。您可以在所需的 CLI 工具中或从 OpenShift 集群管理器运行此选项。启动手动创建过程后,CLI 会提供一系列要运行的命令,这些命令会创建角色并将它们链接到所需的策略。
如果您使用管理员权限创建了 ocm-role
资源,则可以使用 OpenShift 集群管理器中的自动创建方法。ROSA CLI 不需要您拥有此管理员 ocm-role
IAM 资源即可自动创建这些角色和策略。选择此方法将创建使用默认名称的角色和策略。
如果您在 OpenShift 集群管理器上使用 ROSA 指导安装,则必须在引导式集群安装的第一步中使用管理员权限创建 ocm-role
资源。如果没有此角色,则无法使用自动 Operator 角色和策略创建选项,但您仍然可以使用手动流程创建集群及其角色和策略。
|
资源 | 描述 |
---|---|
|
ROSA 安装程序使用的 IAM 角色。 |
|
一个 IAM 策略,它为 ROSA 安装程序提供完成集群安装任务所需的权限。 |
sts_installer_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::%{aws_account_id}:role/RH-Managed-OpenShift-Installer"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
sts_installer_permission_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"ec2:AllocateAddress",
"ec2:AssociateAddress",
"ec2:AssociateDhcpOptions",
"ec2:AssociateRouteTable",
"ec2:AttachInternetGateway",
"ec2:AttachNetworkInterface",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CopyImage",
"ec2:CreateDhcpOptions",
"ec2:CreateInternetGateway",
"ec2:CreateNatGateway",
"ec2:CreateNetworkInterface",
"ec2:CreateRoute",
"ec2:CreateRouteTable",
"ec2:CreateSecurityGroup",
"ec2:CreateSubnet",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:CreateVpc",
"ec2:CreateVpcEndpoint",
"ec2:DeleteDhcpOptions",
"ec2:DeleteInternetGateway",
"ec2:DeleteNatGateway",
"ec2:DeleteNetworkInterface",
"ec2:DeleteRoute",
"ec2:DeleteRouteTable",
"ec2:DeleteSecurityGroup",
"ec2:DeleteSnapshot",
"ec2:DeleteSubnet",
"ec2:DeleteTags",
"ec2:DeleteVolume",
"ec2:DeleteVpc",
"ec2:DeleteVpcEndpoints",
"ec2:DeregisterImage",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAddresses",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeDhcpOptions",
"ec2:DescribeImages",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstanceCreditSpecifications",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstanceTypeOfferings",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInternetGateways",
"ec2:DescribeKeyPairs",
"ec2:DescribeNatGateways",
"ec2:DescribeNetworkAcls",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribePrefixLists",
"ec2:DescribeRegions",
"ec2:DescribeReservedInstancesOfferings",
"ec2:DescribeRouteTables",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSecurityGroupRules",
"ec2:DescribeSubnets",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcClassicLink",
"ec2:DescribeVpcClassicLinkDnsSupport",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcs",
"ec2:DetachInternetGateway",
"ec2:DisassociateRouteTable",
"ec2:GetConsoleOutput",
"ec2:GetEbsDefaultKmsKeyId",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyNetworkInterfaceAttribute",
"ec2:ModifySubnetAttribute",
"ec2:ModifyVpcAttribute",
"ec2:ReleaseAddress",
"ec2:ReplaceRouteTableAssociation",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"elasticloadbalancing:AddTags",
"elasticloadbalancing:ApplySecurityGroupsToLoadBalancer",
"elasticloadbalancing:AttachLoadBalancerToSubnets",
"elasticloadbalancing:ConfigureHealthCheck",
"elasticloadbalancing:CreateListener",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateLoadBalancerListeners",
"elasticloadbalancing:CreateTargetGroup",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:DeleteTargetGroup",
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:DescribeAccountLimits",
"elasticloadbalancing:DescribeInstanceHealth",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:ModifyTargetGroup",
"elasticloadbalancing:ModifyTargetGroupAttributes",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:SetLoadBalancerPoliciesOfListener",
"elasticloadbalancing:SetSecurityGroups",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetInstanceProfile",
"iam:TagInstanceProfile",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:GetUser",
"iam:ListAttachedRolePolicies",
"iam:ListInstanceProfiles",
"iam:ListInstanceProfilesForRole",
"iam:ListRolePolicies",
"iam:ListRoles",
"iam:ListUserPolicies",
"iam:ListUsers",
"iam:PassRole",
"iam:RemoveRoleFromInstanceProfile",
"iam:SimulatePrincipalPolicy",
"iam:TagRole",
"iam:UntagRole",
"route53:ChangeResourceRecordSets",
"route53:ChangeTagsForResource",
"route53:CreateHostedZone",
"route53:DeleteHostedZone",
"route53:GetAccountLimit",
"route53:GetChange",
"route53:GetHostedZone",
"route53:ListHostedZones",
"route53:ListHostedZonesByName",
"route53:ListResourceRecordSets",
"route53:ListTagsForResource",
"route53:UpdateHostedZoneComment",
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetAccelerateConfiguration",
"s3:GetBucketAcl",
"s3:GetBucketCORS",
"s3:GetBucketLocation",
"s3:GetBucketLogging",
"s3:GetBucketObjectLockConfiguration",
"s3:GetBucketPolicy",
"s3:GetBucketRequestPayment",
"s3:GetBucketTagging",
"s3:GetBucketVersioning",
"s3:GetBucketWebsite",
"s3:GetEncryptionConfiguration",
"s3:GetLifecycleConfiguration",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectTagging",
"s3:GetObjectVersion",
"s3:GetReplicationConfiguration",
"s3:ListBucket",
"s3:ListBucketVersions",
"s3:PutBucketAcl",
"s3:PutBucketPolicy",
"s3:PutBucketTagging",
"s3:PutBucketVersioning",
"s3:PutEncryptionConfiguration",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutObjectTagging",
"servicequotas:GetServiceQuota",
"servicequotas:ListAWSDefaultServiceQuotas",
"sts:AssumeRole",
"sts:AssumeRoleWithWebIdentity",
"sts:GetCallerIdentity",
"tag:GetResources",
"tag:UntagResources",
"ec2:CreateVpcEndpointServiceConfiguration",
"ec2:DeleteVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpointServicePermissions",
"ec2:DescribeVpcEndpointServices",
"ec2:ModifyVpcEndpointServicePermissions",
"kms:DescribeKey",
"cloudwatch:GetMetricData"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/red-hat-managed": "true"
}
}
}
]
}
资源 | 描述 |
---|---|
|
ROSA 控制平面使用的 IAM 角色。 |
|
一个 IAM 策略,它为 ROSA 控制平面提供管理其组件所需的权限。 |
sts_instance_controlplane_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
sts_instance_controlplane_permission_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadPermissions",
"Effect": "Allow",
"Action": [
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInstances",
"ec2:DescribeRouteTables",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:DescribeLoadBalancerPolicies"
],
"Resource": [
"*"
]
},
{
"Sid": "KMSDescribeKey",
"Effect": "Allow",
"Action": [
"kms:DescribeKey"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/red-hat": "true"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateSecurityGroup",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:DeleteSecurityGroup",
"ec2:DeleteVolume",
"ec2:DetachVolume",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyVolume",
"ec2:RevokeSecurityGroupIngress",
"elasticloadbalancing:AddTags",
"elasticloadbalancing:AttachLoadBalancerToSubnets",
"elasticloadbalancing:ApplySecurityGroupsToLoadBalancer",
"elasticloadbalancing:CreateListener",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateLoadBalancerPolicy",
"elasticloadbalancing:CreateLoadBalancerListeners",
"elasticloadbalancing:CreateTargetGroup",
"elasticloadbalancing:ConfigureHealthCheck",
"elasticloadbalancing:DeleteListener",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:DeleteLoadBalancerListeners",
"elasticloadbalancing:DeleteTargetGroup",
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:DetachLoadBalancerFromSubnets",
"elasticloadbalancing:ModifyListener",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:ModifyTargetGroup",
"elasticloadbalancing:ModifyTargetGroupAttributes",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:SetLoadBalancerPoliciesForBackendServer",
"elasticloadbalancing:SetLoadBalancerPoliciesOfListener"
],
"Resource": "*"
}
]
}
资源 | 描述 |
---|---|
|
ROSA 计算实例使用的 IAM 角色。 |
|
一个 IAM 策略,它为 ROSA 计算实例提供管理其组件所需的权限。 |
sts_instance_worker_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
sts_instance_worker_permission_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeRegions"
],
"Resource": "*"
}
]
}
资源 | 描述 |
---|---|
|
Red Hat站点可靠性工程(SRE)支持团队使用的IAM角色。 |
|
一个IAM策略,为Red Hat SRE支持团队提供支持ROSA集群所需的权限。 |
sts_support_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::%{aws_account_id}:role/RH-Technical-Support-Access"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
sts_support_permission_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudtrail:DescribeTrails",
"cloudtrail:LookupEvents",
"cloudwatch:GetMetricData",
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics",
"ec2-instance-connect:SendSerialConsoleSSHPublicKey",
"ec2:CopySnapshot",
"ec2:CreateNetworkInsightsPath",
"ec2:CreateSnapshot",
"ec2:CreateSnapshots",
"ec2:CreateTags",
"ec2:DeleteNetworkInsightsAnalysis",
"ec2:DeleteNetworkInsightsPath",
"ec2:DeleteTags",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAddresses",
"ec2:DescribeAddressesAttribute",
"ec2:DescribeAggregateIdFormat",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeByoipCidrs",
"ec2:DescribeCapacityReservations",
"ec2:DescribeCarrierGateways",
"ec2:DescribeClassicLinkInstances",
"ec2:DescribeClientVpnAuthorizationRules",
"ec2:DescribeClientVpnConnections",
"ec2:DescribeClientVpnEndpoints",
"ec2:DescribeClientVpnRoutes",
"ec2:DescribeClientVpnTargetNetworks",
"ec2:DescribeCoipPools",
"ec2:DescribeCustomerGateways",
"ec2:DescribeDhcpOptions",
"ec2:DescribeEgressOnlyInternetGateways",
"ec2:DescribeIamInstanceProfileAssociations",
"ec2:DescribeIdentityIdFormat",
"ec2:DescribeIdFormat",
"ec2:DescribeImageAttribute",
"ec2:DescribeImages",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstanceTypeOfferings",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInternetGateways",
"ec2:DescribeIpv6Pools",
"ec2:DescribeKeyPairs",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeLocalGatewayRouteTables",
"ec2:DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations",
"ec2:DescribeLocalGatewayRouteTableVpcAssociations",
"ec2:DescribeLocalGateways",
"ec2:DescribeLocalGatewayVirtualInterfaceGroups",
"ec2:DescribeLocalGatewayVirtualInterfaces",
"ec2:DescribeManagedPrefixLists",
"ec2:DescribeNatGateways",
"ec2:DescribeNetworkAcls",
"ec2:DescribeNetworkInsightsAnalyses",
"ec2:DescribeNetworkInsightsPaths",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribePlacementGroups",
"ec2:DescribePrefixLists",
"ec2:DescribePrincipalIdFormat",
"ec2:DescribePublicIpv4Pools",
"ec2:DescribeRegions",
"ec2:DescribeReservedInstances",
"ec2:DescribeRouteTables",
"ec2:DescribeScheduledInstances",
"ec2:DescribeSecurityGroupReferences",
"ec2:DescribeSecurityGroupRules",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSnapshotAttribute",
"ec2:DescribeSnapshots",
"ec2:DescribeSpotFleetInstances",
"ec2:DescribeStaleSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeTags",
"ec2:DescribeTransitGatewayAttachments",
"ec2:DescribeTransitGatewayConnectPeers",
"ec2:DescribeTransitGatewayConnects",
"ec2:DescribeTransitGatewayMulticastDomains",
"ec2:DescribeTransitGatewayPeeringAttachments",
"ec2:DescribeTransitGatewayRouteTables",
"ec2:DescribeTransitGateways",
"ec2:DescribeTransitGatewayVpcAttachments",
"ec2:DescribeVolumeAttribute",
"ec2:DescribeVolumes",
"ec2:DescribeVolumesModifications",
"ec2:DescribeVolumeStatus",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcClassicLink",
"ec2:DescribeVpcClassicLinkDnsSupport",
"ec2:DescribeVpcEndpointConnectionNotifications",
"ec2:DescribeVpcEndpointConnections",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpointServicePermissions",
"ec2:DescribeVpcEndpointServices",
"ec2:DescribeVpcPeeringConnections",
"ec2:DescribeVpcs",
"ec2:DescribeVpnConnections",
"ec2:DescribeVpnGateways",
"ec2:GetAssociatedIpv6PoolCidrs",
"ec2:GetConsoleOutput",
"ec2:GetManagedPrefixListEntries",
"ec2:GetSerialConsoleAccessStatus",
"ec2:GetTransitGatewayAttachmentPropagations",
"ec2:GetTransitGatewayMulticastDomainAssociations",
"ec2:GetTransitGatewayPrefixListReferences",
"ec2:GetTransitGatewayRouteTableAssociations",
"ec2:GetTransitGatewayRouteTablePropagations",
"ec2:ModifyInstanceAttribute",
"ec2:RebootInstances",
"ec2:RunInstances",
"ec2:SearchLocalGatewayRoutes",
"ec2:SearchTransitGatewayMulticastGroups",
"ec2:SearchTransitGatewayRoutes",
"ec2:StartInstances",
"ec2:StartNetworkInsightsAnalysis",
"ec2:StopInstances",
"ec2:TerminateInstances",
"elasticloadbalancing:ConfigureHealthCheck",
"elasticloadbalancing:DescribeAccountLimits",
"elasticloadbalancing:DescribeInstanceHealth",
"elasticloadbalancing:DescribeListenerCertificates",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancerPolicies",
"elasticloadbalancing:DescribeLoadBalancerPolicyTypes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeRules",
"elasticloadbalancing:DescribeSSLPolicies",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetHealth",
"iam:GetRole",
"iam:ListRoles",
"kms:CreateGrant",
"route53:GetHostedZone",
"route53:GetHostedZoneCount",
"route53:ListHostedZones",
"route53:ListHostedZonesByName",
"route53:ListResourceRecordSets",
"s3:GetBucketTagging",
"s3:GetObjectAcl",
"s3:GetObjectTagging",
"s3:ListAllMyBuckets",
"sts:DecodeAuthorizationMessage",
"tiros:CreateQuery",
"tiros:GetQueryAnswer",
"tiros:GetQueryExplanation"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::managed-velero*",
"arn:aws:s3:::*image-registry*"
]
}
]
}
资源 | 描述 |
---|---|
|
您可以使用此IAM角色在OpenShift集群管理器中创建和维护ROSA集群。 |
sts_ocm_role_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::%{aws_account_id}:role/RH-Managed-OpenShift-Installer"
]
},
"Action": [
"sts:AssumeRole"
],
"Condition": {"StringEquals": {"sts:ExternalId": "%{ocm_organization_id}"}}
}
]
}
资源 | 描述 |
---|---|
|
Red Hat用来验证客户AWS身份的IAM角色。 |
sts_user_role_trust_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::%{aws_account_id}:role/RH-Managed-OpenShift-Installer"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
将策略附加到角色后,ROSA CLI会显示确认输出。输出取决于策略的类型。
如果策略是信任策略,ROSA CLI会输出角色名称和策略内容。
对于附加了策略的目标角色,ROSA CLI会输出角色名称和目标角色的控制台URL。
I: Attached trust policy to role 'testrole-Worker-Role(https://console.aws.amazon.com/iam/home?#/roles/testrole-Worker-Role)': ******************
如果附加的策略是信任策略,ROSA CLI会输出此策略的内容。
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"]}}]}
如果策略是权限策略,ROSA CLI会输出此策略的名称和公共链接,或者根据策略是AWS托管策略还是客户托管策略输出ARN。
如果附加的策略是AWS托管策略,ROSA CLI会输出此策略的名称和公共链接以及它附加到的角色。
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)'
如果附加的策略是AWS托管策略,ROSA CLI会输出此策略的名称和公共链接以及它附加到的角色。
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)'
资源 | 描述 |
---|---|
|
一个IAM策略,为ROSA Ingress Operator提供管理对集群外部访问所需的权限。 |
openshift_ingress_operator_cloud_credentials_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:DescribeLoadBalancers",
"route53:ListHostedZones",
"route53:ListTagsForResources",
"route53:ChangeResourceRecordSets",
"tag:GetResources"
],
"Resource": "*"
}
]
}
资源 | 描述 |
---|---|
|
ROSA通过容器存储接口(CSI)管理后端存储所需的IAM策略。 |
openshift_cluster_csi_drivers_ebs_cloud_credentials_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:CreateSnapshot",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:DeleteSnapshot",
"ec2:DeleteTags",
"ec2:DeleteVolume",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInstances",
"ec2:DescribeSnapshots",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:DescribeVolumesModifications",
"ec2:DetachVolume",
"ec2:EnableFastSnapshotRestores",
"ec2:ModifyVolume"
],
"Resource": "*"
}
]
}
资源 | 描述 |
---|---|
|
一个IAM策略,为ROSA机器配置操作员提供执行核心集群功能所需的权限。 |
openshift_machine_api_aws_cloud_credentials_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:CreateTags",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeDhcpOptions",
"ec2:DescribeImages",
"ec2:DescribeInstances",
"ec2:DescribeInternetGateways",
"ec2:DescribeInstanceTypes",
"ec2:DescribeSecurityGroups",
"ec2:DescribeRegions",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"ec2:RunInstances",
"ec2:TerminateInstances",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:DeregisterTargets",
"iam:PassRole",
"iam:CreateServiceLinkedRole"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"kms:Encrypt",
"kms:GenerateDataKey",
"kms:GenerateDataKeyWithoutPlainText",
"kms:DescribeKey"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"kms:RevokeGrant",
"kms:CreateGrant",
"kms:ListGrants"
],
"Resource": "*",
"Condition": {
"Bool": {
"kms:GrantIsForAWSResource": true
}
}
}
]
}
资源 | 描述 |
---|---|
|
一个IAM策略,为ROSA云凭证操作员提供管理云提供商凭证所需的权限。 |
openshift_cloud_credential_operator_cloud_credential_operator_iam_ro_creds_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:GetUser",
"iam:GetUserPolicy",
"iam:ListAccessKeys"
],
"Resource": "*"
}
]
}
资源 | 描述 |
---|---|
|
一个IAM策略,为ROSA镜像注册表操作员提供在AWS S3中管理集群的OpenShift镜像注册表存储所需的权限。 |
openshift_image_registry_installer_cloud_credentials_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:PutBucketTagging",
"s3:GetBucketTagging",
"s3:PutBucketPublicAccessBlock",
"s3:GetBucketPublicAccessBlock",
"s3:PutEncryptionConfiguration",
"s3:GetEncryptionConfiguration",
"s3:PutLifecycleConfiguration",
"s3:GetLifecycleConfiguration",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:ListBucketMultipartUploads",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": "*"
}
]
}
有关OpenShift主版本、次版本和修补程序版本的定义,请参见AWS上的Red Hat OpenShift服务的更新生命周期。
本节列出了rosa
命令在终端中生成的aws
CLI命令。您可以以手动或自动模式运行该命令。
手动角色创建模式会生成aws
命令供您查看和运行。以下命令启动该过程,其中<openshift_version>
指的是您AWS上Red Hat OpenShift服务(ROSA)的版本,例如4.17
。
$ rosa create account-roles --mode manual
提供的命令示例包括 |
aws iam create-role \
--role-name ManagedOpenShift-Installer-Role \
--assume-role-policy-document file://sts_installer_trust_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=rosa_role_type,Value=installer
aws iam put-role-policy \
--role-name ManagedOpenShift-Installer-Role \
--policy-name ManagedOpenShift-Installer-Role-Policy \
--policy-document file://sts_installer_permission_policy.json
aws iam create-role \
--role-name ManagedOpenShift-ControlPlane-Role \
--assume-role-policy-document file://sts_instance_controlplane_trust_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=rosa_role_type,Value=instance_controlplane
aws iam put-role-policy \
--role-name ManagedOpenShift-ControlPlane-Role \
--policy-name ManagedOpenShift-ControlPlane-Role-Policy \
--policy-document file://sts_instance_controlplane_permission_policy.json
aws iam create-role \
--role-name ManagedOpenShift-Worker-Role \
--assume-role-policy-document file://sts_instance_worker_trust_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=rosa_role_type,Value=instance_worker
aws iam put-role-policy \
--role-name ManagedOpenShift-Worker-Role \
--policy-name ManagedOpenShift-Worker-Role-Policy \
--policy-document file://sts_instance_worker_permission_policy.json
aws iam create-role \
--role-name ManagedOpenShift-Support-Role \
--assume-role-policy-document file://sts_support_trust_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=rosa_role_type,Value=support
aws iam put-role-policy \
--role-name ManagedOpenShift-Support-Role \
--policy-name ManagedOpenShift-Support-Role-Policy \
--policy-document file://sts_support_permission_policy.json
aws iam create-policy \
--policy-name ManagedOpenShift-openshift-ingress-operator-cloud-credentials \
--policy-document file://openshift_ingress_operator_cloud_credentials_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-ingress-operator Key=operator_name,Value=cloud-credentials
aws iam create-policy \
--policy-name ManagedOpenShift-openshift-cluster-csi-drivers-ebs-cloud-credent \
--policy-document file://openshift_cluster_csi_drivers_ebs_cloud_credentials_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-cluster-csi-drivers Key=operator_name,Value=ebs-cloud-credentials
aws iam create-policy \
--policy-name ManagedOpenShift-openshift-machine-api-aws-cloud-credentials \
--policy-document file://openshift_machine_api_aws_cloud_credentials_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-machine-api Key=operator_name,Value=aws-cloud-credentials
aws iam create-policy \
--policy-name ManagedOpenShift-openshift-cloud-credential-operator-cloud-crede \
--policy-document file://openshift_cloud_credential_operator_cloud_credential_operator_iam_ro_creds_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-cloud-credential-operator Key=operator_name,Value=cloud-credential-operator-iam-ro-creds
aws iam create-policy \
--policy-name ManagedOpenShift-openshift-image-registry-installer-cloud-creden \
--policy-document file://openshift_image_registry_installer_cloud_credentials_policy.json \
--tags Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-image-registry Key=operator_name,Value=installer-cloud-credentials
当您添加--mode auto
参数时,AWS上Red Hat OpenShift服务(ROSA)CLI,rosa
,会创建您的角色和策略。以下命令启动该过程
$ rosa create account-roles --mode auto
提供的命令示例包括 |
I: Creating roles using 'arn:aws:iam::<ARN>:user/<UserID>'
? Create the 'ManagedOpenShift-Installer-Role' role? Yes
I: Created role 'ManagedOpenShift-Installer-Role' with ARN 'arn:aws:iam::<ARN>:role/ManagedOpenShift-Installer-Role'
? Create the 'ManagedOpenShift-ControlPlane-Role' role? Yes
I: Created role 'ManagedOpenShift-ControlPlane-Role' with ARN 'arn:aws:iam::<ARN>:role/ManagedOpenShift-ControlPlane-Role'
? Create the 'ManagedOpenShift-Worker-Role' role? Yes
I: Created role 'ManagedOpenShift-Worker-Role' with ARN 'arn:aws:iam::<ARN>:role/ManagedOpenShift-Worker-Role'
? Create the 'ManagedOpenShift-Support-Role' role? Yes
I: Created role 'ManagedOpenShift-Support-Role' with ARN 'arn:aws:iam::<ARN>:role/ManagedOpenShift-Support-Role'
? Create the operator policies? Yes
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-machine-api-aws-cloud-credentials'
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-cloud-credential-operator-cloud-crede'
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-image-registry-installer-cloud-creden'
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-ingress-operator-cloud-credentials'
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-cluster-csi-drivers-ebs-cloud-credent'
I: Created policy with ARN 'arn:aws:iam::<ARN>:policy/ManagedOpenShift-openshift-cloud-network-config-controller-cloud'
I: To create a cluster with these roles, run the following command:
rosa create cluster --sts
您可以将策略作为安装程序角色的*权限边界*应用。您可以使用AWS托管策略或客户托管策略来设置Amazon Web Services(AWS)身份和访问管理(IAM)实体(用户或角色)的边界。策略和边界策略的组合限制了用户或角色的最大权限。ROSA包含一组三个预先准备好的权限边界策略文件,您可以使用这些文件来限制安装程序角色的权限,因为不支持更改安装程序策略本身。
此功能仅在AWS上的Red Hat OpenShift服务(经典架构)集群上受支持。 |
权限边界策略文件如下所示
*核心*边界策略文件包含ROSA(经典架构)安装程序安装AWS上的Red Hat OpenShift服务集群所需的最小权限。安装程序没有创建虚拟私有云(VPC)或PrivateLink(PL)的权限。需要提供VPC。
*VPC*边界策略文件包含ROSA(经典架构)安装程序创建/管理VPC所需的最小权限。它不包含PL或核心安装的权限。如果您需要安装一个集群,该集群具有足够的权限让安装程序安装集群并创建/管理VPC,但您不需要设置PL,则将核心和VPC边界文件与安装程序角色一起使用。
*PrivateLink(PL)*边界策略文件包含ROSA(经典架构)安装程序创建具有集群的AWS PL所需的最小权限。它不包含VPC或核心安装的权限。在安装期间为所有PL集群提供预先创建的VPC。
使用权限边界策略文件时,适用以下组合
没有权限边界策略意味着完整的安装程序策略权限将应用于您的集群。
**仅核心**为安装程序角色设置最严格的权限。VPC和PL权限不包含在**仅核心**边界策略中。
安装程序无法创建或管理VPC或PL。
您必须拥有客户提供的VPC,并且PrivateLink(PL)不可用。
**核心+VPC**为安装程序角色设置核心和VPC权限。
安装程序无法创建或管理PL。
假设您没有使用自定义/BYO-VPC。
假设安装程序将创建和管理VPC。
**核心+PrivateLink(PL)**意味着安装程序可以配置PL基础设施。
您必须拥有客户提供的VPC。
这是用于具有PL的私有集群。
此示例过程适用于具有最严格权限的安装程序角色和策略,仅使用ROSA的*核心*安装程序权限边界策略。您可以使用AWS控制台或AWS CLI完成此操作。此示例使用AWS CLI和以下策略
sts_installer_core_permission_boundary_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"ec2:AllocateAddress",
"ec2:AssociateAddress",
"ec2:AttachNetworkInterface",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CopyImage",
"ec2:CreateNetworkInterface",
"ec2:CreateSecurityGroup",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:DeleteNetworkInterface",
"ec2:DeleteSecurityGroup",
"ec2:DeleteSnapshot",
"ec2:DeleteTags",
"ec2:DeleteVolume",
"ec2:DeregisterImage",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAddresses",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeDhcpOptions",
"ec2:DescribeImages",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstanceCreditSpecifications",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstanceTypeOfferings",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInternetGateways",
"ec2:DescribeKeyPairs",
"ec2:DescribeNatGateways",
"ec2:DescribeNetworkAcls",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribePrefixLists",
"ec2:DescribeRegions",
"ec2:DescribeReservedInstancesOfferings",
"ec2:DescribeRouteTables",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSecurityGroupRules",
"ec2:DescribeSubnets",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcClassicLink",
"ec2:DescribeVpcClassicLinkDnsSupport",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcs",
"ec2:GetConsoleOutput",
"ec2:GetEbsDefaultKmsKeyId",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyNetworkInterfaceAttribute",
"ec2:ReleaseAddress",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"elasticloadbalancing:AddTags",
"elasticloadbalancing:ApplySecurityGroupsToLoadBalancer",
"elasticloadbalancing:AttachLoadBalancerToSubnets",
"elasticloadbalancing:ConfigureHealthCheck",
"elasticloadbalancing:CreateListener",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateLoadBalancerListeners",
"elasticloadbalancing:CreateTargetGroup",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:DeleteTargetGroup",
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:DescribeInstanceHealth",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:ModifyTargetGroup",
"elasticloadbalancing:ModifyTargetGroupAttributes",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:SetLoadBalancerPoliciesOfListener",
"elasticloadbalancing:SetSecurityGroups",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetInstanceProfile",
"iam:TagInstanceProfile",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:GetUser",
"iam:ListAttachedRolePolicies",
"iam:ListInstanceProfiles",
"iam:ListInstanceProfilesForRole",
"iam:ListRolePolicies",
"iam:ListRoles",
"iam:ListUserPolicies",
"iam:ListUsers",
"iam:PassRole",
"iam:RemoveRoleFromInstanceProfile",
"iam:SimulatePrincipalPolicy",
"iam:TagRole",
"iam:UntagRole",
"route53:ChangeResourceRecordSets",
"route53:ChangeTagsForResource",
"route53:CreateHostedZone",
"route53:DeleteHostedZone",
"route53:GetAccountLimit",
"route53:GetChange",
"route53:GetHostedZone",
"route53:ListHostedZones",
"route53:ListHostedZonesByName",
"route53:ListResourceRecordSets",
"route53:ListTagsForResource",
"route53:UpdateHostedZoneComment",
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:DeleteObject",
"s3:GetAccelerateConfiguration",
"s3:GetBucketAcl",
"s3:GetBucketCORS",
"s3:GetBucketLocation",
"s3:GetBucketLogging",
"s3:GetBucketObjectLockConfiguration",
"s3:GetBucketPolicy",
"s3:GetBucketRequestPayment",
"s3:GetBucketTagging",
"s3:GetBucketVersioning",
"s3:GetBucketWebsite",
"s3:GetEncryptionConfiguration",
"s3:GetLifecycleConfiguration",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectTagging",
"s3:GetObjectVersion",
"s3:GetReplicationConfiguration",
"s3:ListBucket",
"s3:ListBucketVersions",
"s3:PutBucketAcl",
"s3:PutBucketPolicy",
"s3:PutBucketTagging",
"s3:PutEncryptionConfiguration",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutObjectTagging",
"servicequotas:GetServiceQuota",
"servicequotas:ListAWSDefaultServiceQuotas",
"sts:AssumeRole",
"sts:AssumeRoleWithWebIdentity",
"sts:GetCallerIdentity",
"tag:GetResources",
"tag:UntagResources",
"kms:DescribeKey",
"cloudwatch:GetMetricData",
"ec2:CreateRoute",
"ec2:DeleteRoute",
"ec2:CreateVpcEndpoint",
"ec2:DeleteVpcEndpoints",
"ec2:CreateVpcEndpointServiceConfiguration",
"ec2:DeleteVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpointServiceConfigurations",
"ec2:DescribeVpcEndpointServicePermissions",
"ec2:DescribeVpcEndpointServices",
"ec2:ModifyVpcEndpointServicePermissions"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/red-hat-managed": "true"
}
}
}
]
}
要使用权限边界,您需要准备权限边界策略并将其添加到AWS IAM中的相关安装程序角色中。虽然ROSA( |
您拥有一个 AWS 帐户。
您拥有管理AWS角色和策略所需的权限。
您已在工作站上安装和配置了最新的AWS(aws
)和ROSA(rosa
)CLI。
您已准备好了 ROSA 帐户范围的角色,包括安装程序角色和相应的策略。如果您的 AWS 帐户中不存在这些角色和策略,请参阅附加资源中的“创建帐户范围的 STS 角色和策略”。
通过在rosa
CLI 中输入以下命令来准备策略文件
$ curl -o ./rosa-installer-core.json https://raw.githubusercontent.com/openshift/managed-cluster-config/master/resources/sts/4.17/sts_installer_core_permission_boundary_policy.json
在 AWS 中创建策略并通过输入以下命令收集其 Amazon 资源名称 (ARN)
$ aws iam create-policy \
--policy-name rosa-core-permissions-boundary-policy \
--policy-document file://./rosa-installer-core.json \
--description "ROSA installer core permission boundary policy, the minimum permission set, allows BYO-VPC, disallows PrivateLink"
{
"Policy": {
"PolicyName": "rosa-core-permissions-boundary-policy",
"PolicyId": "<Policy ID>",
"Arn": "arn:aws:iam::<account ID>:policy/rosa-core-permissions-boundary-policy",
"Path": "/",
"DefaultVersionId": "v1",
"AttachmentCount": 0,
"PermissionsBoundaryUsageCount": 0,
"IsAttachable": true,
"CreateDate": "<CreateDate>",
"UpdateDate": "<UpdateDate>"
}
}
通过输入以下命令,将权限边界策略添加到您要限制的安装程序角色
$ aws iam put-role-permissions-boundary \
--role-name ManagedOpenShift-Installer-Role \
--permissions-boundary arn:aws:iam::<account ID>:policy/rosa-core-permissions-boundary-policy
通过在rosa
CLI 中输入以下命令,显示安装程序角色以验证附加的策略(包括权限边界)
$ aws iam get-role --role-name ManagedOpenShift-Installer-Role \
--output text | grep PERMISSIONSBOUNDARY
PERMISSIONSBOUNDARY arn:aws:iam::<account ID>:policy/rosa-core-permissions-boundary-policy Policy
有关 PL 和 VPC 权限边界策略的更多示例,请参阅
sts_installer_privatelink_permission_boundary_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:ModifyVpcEndpointServiceConfiguration",
"route53:ListHostedZonesByVPC",
"route53:CreateVPCAssociationAuthorization",
"route53:AssociateVPCWithHostedZone",
"route53:DeleteVPCAssociationAuthorization",
"route53:DisassociateVPCFromHostedZone",
"route53:ChangeResourceRecordSets"
],
"Resource": "*"
}
]
}
sts_installer_vpc_permission_boundary_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AssociateDhcpOptions",
"ec2:AssociateRouteTable",
"ec2:AttachInternetGateway",
"ec2:CreateDhcpOptions",
"ec2:CreateInternetGateway",
"ec2:CreateNatGateway",
"ec2:CreateRouteTable",
"ec2:CreateSubnet",
"ec2:CreateVpc",
"ec2:DeleteDhcpOptions",
"ec2:DeleteInternetGateway",
"ec2:DeleteNatGateway",
"ec2:DeleteRouteTable",
"ec2:DeleteSubnet",
"ec2:DeleteVpc",
"ec2:DetachInternetGateway",
"ec2:DisassociateRouteTable",
"ec2:ModifySubnetAttribute",
"ec2:ModifyVpcAttribute",
"ec2:ReplaceRouteTableAssociation"
],
"Resource": "*"
}
]
}
更多信息,请参阅 IAM 实体的权限边界(AWS 文档)。
有关创建所需的帐户范围 STS 角色和策略的更多信息,请参阅 创建帐户范围的 STS 角色和策略。
本节详细介绍了在使用 STS 的 AWS 上的 Red Hat OpenShift 服务 (ROSA) 部署中所需的 Operator IAM 角色。集群 Operator 使用 Operator 角色来获取执行集群操作(例如管理后端存储、云提供商凭据和对集群的外部访问)所需的临时权限。
创建 Operator 角色时,将为匹配的集群版本附加帐户范围的 Operator 策略。Operator 策略会使用它们兼容的 Operator 和版本进行标记。Operator 角色的正确策略是通过使用标记来确定的。
如果您的帐户中为 Operator 角色提供了多个匹配的策略,则在创建 Operator 时将提供交互式选项列表。 |
资源 | 描述 |
---|---|
|
ROSA 通过容器存储接口 (CSI) 管理后端存储所需的 IAM 角色。 |
|
ROSA 机器配置 Operator 执行核心集群功能所需的 IAM 角色。 |
|
ROSA 云凭据 Operator 管理云提供商凭据所需的 IAM 角色。 |
|
云网络配置控制器管理集群的云网络配置所需的 IAM 角色。 |
|
ROSA 镜像注册表 Operator 管理集群在 AWS S3 中的 OpenShift 镜像注册表存储所需的 IAM 角色。 |
|
ROSA Ingress Operator 管理对集群的外部访问所需的 IAM 角色。 |
|
云网络配置控制器管理集群的云网络凭据所需的 IAM 角色。 |
本节列出了使用manual
模式运行以下rosa
命令时,终端中显示的aws
CLI 命令。
$ rosa create operator-roles --mode manual --cluster <cluster_name>
使用 |
aws iam create-role \
--role-name <cluster_name>-<hash>-openshift-cluster-csi-drivers-ebs-cloud-credent \
--assume-role-policy-document file://operator_cluster_csi_drivers_ebs_cloud_credentials_policy.json \
--tags Key=rosa_cluster_id,Value=<id> Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value= Key=operator_namespace,Value=openshift-cluster-csi-drivers Key=operator_name,Value=ebs-cloud-credentials
aws iam attach-role-policy \
--role-name <cluster_name>-<hash>-openshift-cluster-csi-drivers-ebs-cloud-credent \
--policy-arn arn:aws:iam::<aws_account_id>:policy/ManagedOpenShift-openshift-cluster-csi-drivers-ebs-cloud-credent
aws iam create-role \
--role-name <cluster_name>-<hash>-openshift-machine-api-aws-cloud-credentials \
--assume-role-policy-document file://operator_machine_api_aws_cloud_credentials_policy.json \
--tags Key=rosa_cluster_id,Value=<id> Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value= Key=operator_namespace,Value=openshift-machine-api Key=operator_name,Value=aws-cloud-credentials
aws iam attach-role-policy \
--role-name <cluster_name>-<hash>-openshift-machine-api-aws-cloud-credentials \
--policy-arn arn:aws:iam::<aws_account_id>:policy/ManagedOpenShift-openshift-machine-api-aws-cloud-credentials
aws iam create-role \
--role-name <cluster_name>-<hash>-openshift-cloud-credential-operator-cloud-crede \
--assume-role-policy-document file://operator_cloud_credential_operator_cloud_credential_operator_iam_ro_creds_policy.json \
--tags Key=rosa_cluster_id,Value=<id> Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value= Key=operator_namespace,Value=openshift-cloud-credential-operator Key=operator_name,Value=cloud-credential-operator-iam-ro-creds
aws iam attach-role-policy \
--role-name <cluster_name>-<hash>-openshift-cloud-credential-operator-cloud-crede \
--policy-arn arn:aws:iam::<aws_account_id>:policy/ManagedOpenShift-openshift-cloud-credential-operator-cloud-crede
aws iam create-role \
--role-name <cluster_name>-<hash>-openshift-image-registry-installer-cloud-creden \
--assume-role-policy-document file://operator_image_registry_installer_cloud_credentials_policy.json \
--tags Key=rosa_cluster_id,Value=<id> Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value= Key=operator_namespace,Value=openshift-image-registry Key=operator_name,Value=installer-cloud-credentials
aws iam attach-role-policy \
--role-name <cluster_name>-<hash>-openshift-image-registry-installer-cloud-creden \
--policy-arn arn:aws:iam::<aws_account_id>:policy/ManagedOpenShift-openshift-image-registry-installer-cloud-creden
aws iam create-role \
--role-name <cluster_name>-<hash>-openshift-ingress-operator-cloud-credentials \
--assume-role-policy-document file://operator_ingress_operator_cloud_credentials_policy.json \
--tags Key=rosa_cluster_id,Value=<id> Key=rosa_openshift_version,Value=<openshift_version> Key=rosa_role_prefix,Value= Key=operator_namespace,Value=openshift-ingress-operator Key=operator_name,Value=cloud-credentials
aws iam attach-role-policy \
--role-name <cluster_name>-<hash>-openshift-ingress-operator-cloud-credentials \
--policy-arn arn:aws:iam::<aws_account_id>:policy/ManagedOpenShift-openshift-ingress-operator-cloud-credentials
表中提供的命令示例包括使用 |
每个使用 AWS 安全令牌服务 (STS) 的 AWS 上的 Red Hat OpenShift 服务 (ROSA) 集群都需要集群专用的 Operator IAM 角色。
默认情况下,Operator 角色名称以集群名称和一个随机的 4 位哈希值作为前缀。例如,名为mycluster
的集群的云凭据 Operator IAM 角色的默认名称为mycluster-<hash>-openshift-cloud-credential-operator-cloud-credentials
,其中<hash>
是一个随机的 4 位字符串。
此默认命名约定使您能够轻松识别 AWS 帐户中集群的 Operator IAM 角色。
创建集群的 Operator 角色时,您可以选择指定自定义前缀来代替<cluster_name>-<hash>
。通过使用自定义前缀,您可以根据环境的要求,在 Operator 角色名称前添加逻辑标识符。例如,您可以添加集群名称和环境类型作为前缀,例如mycluster-dev
。在此示例中,带有自定义前缀的云凭据 Operator 角色名称为mycluster-dev-openshift-cloud-credential-operator-cloud-credenti
。
角色名称将被截断为 64 个字符。 |
For steps to create the cluster-specific Operator IAM roles using a custom prefix, see xref:../rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc#rosa-sts-creating-cluster-customizations-cli_rosa-sts-creating-a-cluster-with-customizations[Creating a cluster with customizations using the CLI] or xref:../rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc#rosa-sts-creating-cluster-customizations-ocm_rosa-sts-creating-a-cluster-with-customizations[Creating a cluster with customizations by using {cluster-manager}].
对于使用 STS 的 ROSA 安装,您必须创建一个集群专用的 OIDC 提供程序,集群 Operator 使用该提供程序进行身份验证,或者为自己的 OIDC 提供程序创建自己的 OIDC 配置。
您可以使用 AWS 上的 Red Hat OpenShift 服务 (ROSA) CLI(rosa
)在您的 AWS 帐户中创建一个 OIDC 提供程序。
您已安装最新版本的 ROSA CLI。
要创建 OIDC 提供程序,可以使用未注册或已注册的 OIDC 配置。
未注册的 OIDC 配置要求您通过集群创建 OIDC 提供程序。运行以下命令以创建 OIDC 提供程序
$ rosa create oidc-provider --mode manual --cluster <cluster_name>
使用 |
aws iam create-open-id-connect-provider \
--url https://oidc.op1.openshiftapps.com/<oidc_config_id> \(1)
--client-id-list openshift sts.<aws_region>.amazonaws.com \
--thumbprint-list <thumbprint> (2)
1 | 创建集群后用于访问 OpenID Connect (OIDC) 身份提供程序的 URL。 |
2 | 运行rosa create oidc-provider 命令时会自动生成指纹。有关将指纹与 AWS Identity and Access Management (IAM) OIDC 身份提供程序一起使用的更多信息,请参阅 AWS 文档。 |
已注册的 OIDC 配置使用 OIDC 配置 ID。使用您的 OIDC 配置 ID 运行以下命令
$ rosa create oidc-provider --oidc-config-id <oidc_config_id> --mode auto -y
I: Creating OIDC provider using 'arn:aws:iam::4540112244:user/userName'
I: Created OIDC provider with ARN 'arn:aws:iam::4540112244:oidc-provider/dvbwgdztaeq9o.cloudfront.net/241rh9ql5gpu99d7leokhvkp8icnalpf'
使用 Red Hat 托管的集群时,您可以使用 Red Hat OpenShift Service on AWS (ROSA) 命令行界面 (CLI) `rosa` 创建托管或非托管 OpenID Connect (OIDC) 配置。托管 OIDC 配置存储在 Red Hat 的 AWS 账户中,而生成的非托管 OIDC 配置存储在您的 AWS 账户中。OIDC 配置已注册,可用于 OpenShift 集群管理器。创建非托管 OIDC 配置时,CLI 会为您提供私钥。
使用 Red Hat OpenShift Service on AWS 集群时,您可以在创建集群之前创建 OpenID Connect (OIDC) 配置。此配置已注册,可用于 OpenShift 集群管理器。
您已在安装主机上安装并配置了最新的 Red Hat OpenShift Service on AWS (ROSA) CLI,即 rosa
。
要与 AWS 资源一起创建 OIDC 配置,请运行以下命令
$ rosa create oidc-config --mode=auto --yes
此命令返回以下信息。
? Would you like to create a Managed (Red Hat hosted) OIDC Configuration Yes
I: Setting up managed OIDC configuration
I: To create Operator Roles for this OIDC Configuration, run the following command and remember to replace <user-defined> with a prefix of your choice:
rosa create operator-roles --prefix <user-defined> --oidc-config-id 13cdr6b
If you are going to create a Hosted Control Plane cluster please include '--hosted-cp'
I: Creating OIDC provider using 'arn:aws:iam::4540112244:user/userName'
? Create the OIDC provider? Yes
I: Created OIDC provider with ARN 'arn:aws:iam::4540112244:oidc-provider/dvbwgdztaeq9o.cloudfront.net/13cdr6b'
创建集群时,必须提供 OIDC 配置 ID。对于 `--mode auto`,CLI 输出会提供此值;否则,您必须根据 `--mode manual` 的 `aws` CLI 输出确定这些值。
可选:您可以将 OIDC 配置 ID 保存为变量以供以后使用。运行以下命令保存变量
$ export OIDC_ID=<oidc_config_id>(1)
1 | 在上面的示例输出中,OIDC 配置 ID 为 13cdr6b。 |
运行以下命令查看变量的值
$ echo $OIDC_ID
13cdr6b
您可以列出与您的用户组织关联的集群可用的 OIDC 配置。运行以下命令
$ rosa list oidc-config
ID MANAGED ISSUER URL SECRET ARN
2330dbs0n8m3chkkr25gkkcd8pnj3lk2 true https://dvbwgdztaeq9o.cloudfront.net/2330dbs0n8m3chkkr25gkkcd8pnj3lk2
233hvnrjoqu14jltk6lhbhf2tj11f8un false https://oidc-r7u1.s3.us-east-1.amazonaws.com aws:secretsmanager:us-east-1:242819244:secret:rosa-private-key-oidc-r7u1-tM3MDN
以下选项可以添加到 `rosa create oidc-config` 命令中。所有这些参数都是可选的。不带参数运行 `rosa create oidc-config` 命令会创建一个非托管 OIDC 配置。
您需要通过 OpenShift 集群管理器向 `/oidc_configs` 发送请求来注册非托管 OIDC 配置。您会在响应中收到一个 ID。使用此 ID 创建集群。 |
允许您为私有 RSA 密钥提供原始文件。此密钥名为 `rosa-private-key-oidc-<长度为4的随机标签>.key`。您还会收到一个发现文档,名为 `discovery-document-oidc-<长度为4的随机标签>.json`,以及一个 JSON Web 密钥集,名为 `jwks-oidc-<长度为4的随机标签>.json`。
您可以使用这些文件来设置端点。此端点使用发现文档响应 `/ .well-known/openid-configuration`,并使用 JSON Web 密钥集响应 `keys.json`。私钥以明文形式存储在 Amazon Web Services (AWS) Secrets Manager 服务 (SMS) 中。
$ rosa create oidc-config --raw-files
允许您指定创建 OIDC 配置的模式。使用 `manual` 选项,您将收到设置 S3 存储桶中 OIDC 配置的 AWS 命令。此选项将私钥存储在 Secrets Manager 中。使用 `manual` 选项时,OIDC 端点 URL 是 S3 存储桶的 URL。您必须检索 Secrets Manager ARN 以将 OIDC 配置注册到 OpenShift 集群管理器。
使用 `auto` 选项时,您将收到与 `manual` 模式相同的 OIDC 配置和 AWS 资源。这两个选项之间的一个重要区别是,使用 `auto` 选项时,ROSA 会调用 AWS,因此您无需执行任何其他操作。OIDC 端点 URL 是 S3 存储桶的 URL。CLI 会检索 Secrets Manager ARN,将 OIDC 配置注册到 OpenShift 集群管理器,并报告用户可以运行的第二个 `rosa` 命令以继续创建 STS 集群。
$ rosa create oidc-config --mode=<auto|manual>
创建一个托管在 Red Hat 的 AWS 账户下的 OIDC 配置。此命令会创建一个私钥,该私钥直接为您提供 OIDC 配置 ID,供您在创建 STS 集群时使用。
$ rosa create oidc-config --managed
W: For a managed OIDC Config only auto mode is supported. However, you may choose the provider creation mode
? OIDC Provider creation mode: auto
I: Setting up managed OIDC configuration
I: Please run the following command to create a cluster with this oidc config
rosa create cluster --sts --oidc-config-id 233jnu62i9aphpucsj9kueqlkr1vcgra
I: Creating OIDC provider using 'arn:aws:iam::242819244:user/userName'
? Create the OIDC provider? Yes
I: Created OIDC provider with ARN 'arn:aws:iam::242819244:oidc-provider/dvbwgdztaeq9o.cloudfront.net/233jnu62i9aphpucsj9kueqlkr1vcgra'
服务控制策略 (SCP) 是一种组织策略,用于管理组织内的权限。SCP 确保组织内的账户保持在您定义的访问控制准则内。这些策略在 AWS Organizations 中维护,并控制附加的 AWS 账户中可用的服务。SCP 管理是客户的责任。
使用 AWS 安全令牌服务 (STS) 时,您必须确保服务控制策略不会阻止以下资源
|
验证您的服务控制策略 (SCP) 是否未限制任何这些必需的权限。
服务 | 操作 | 效果 | |
---|---|---|---|
必需的 |
Amazon EC2 |
全部 |
允许 |
Amazon EC2 自动扩展 |
全部 |
允许 |
|
Amazon S3 |
全部 |
允许 |
|
身份与访问管理 |
全部 |
允许 |
|
弹性负载均衡 |
全部 |
允许 |
|
弹性负载均衡 V2 |
全部 |
允许 |
|
Amazon CloudWatch |
全部 |
允许 |
|
Amazon CloudWatch Events |
全部 |
允许 |
|
Amazon CloudWatch Logs |
全部 |
允许 |
|
AWS EC2 实例连接 |
SendSerialConsoleSSHPublicKey |
允许 |
|
AWS 支持 |
全部 |
允许 |
|
AWS 密钥管理服务 |
全部 |
允许 |
|
AWS 安全令牌服务 |
全部 |
允许 |
|
AWS Tiro |
CreateQuery GetQueryAnswer GetQueryExplanation |
允许 |
|
AWS Marketplace |
订阅 取消订阅 查看订阅 |
允许 |
|
AWS 资源标记 |
全部 |
允许 |
|
AWS Route53 DNS |
全部 |
允许 |
|
AWS 服务配额 |
ListServices GetRequestedServiceQuotaChange GetServiceQuota RequestServiceQuotaIncrease ListServiceQuotas |
允许 |
|
可选的 |
AWS 账单 |
ViewAccount Viewbilling ViewUsage |
允许 |
AWS 成本和使用情况报告 |
全部 |
允许 |
|
AWS 成本探索服务 |
全部 |
允许 |
Red Hat OpenShift Service on AWS (ROSA) 用户能够将客户管理的策略附加到运行和维护 ROSA 集群所需的 IAM 角色。这在 AWS IAM 角色中并不罕见。能够将这些策略附加到 ROSA 特定的 IAM 角色扩展了 ROSA 集群的权限功能;例如,作为允许集群组件访问其他 AWS 资源的一种方式,而这些资源原本不是 ROSA 特定的 IAM 策略的一部分。
为确保在集群或角色升级期间不会以任何方式修改任何依赖于客户管理策略的关键客户应用程序,ROSA 使用 `ListAttachedRolesPolicies` 权限从角色检索权限策略列表,并使用 `ListRolePolicies` 权限从 ROSA 特定的角色检索策略列表。此信息可确保在集群事件期间客户管理的策略不会受到影响,并允许 Red Hat SRE 监控附加到 ROSA 特定 IAM 角色的 ROSA 和客户管理的策略,从而更有效地提高其排除任何集群问题的能力。
不支持将限制 ROSA 特定策略的权限边界策略附加到 IAM 角色,因为这些策略可能会中断成功运行和维护 ROSA 集群所需的基本权限的功能。ROSA(经典架构)安装程序角色已准备就绪的权限边界策略。有关更多信息,请参阅“其他资源”部分。 |