推出 的新主控台體驗 AWS WAF
您現在可以使用更新後的體驗,在主控台的任何位置存取 AWS WAF 功能。如需詳細資訊,請參閱使用更新的主控台體驗。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用 AWS Shield 網路安全主管的服務連結角色
本節說明如何使用服務連結角色,讓 AWS Shield 網路安全主管存取您 AWS 帳戶中的資源。
AWS Shield 網路安全主管使用 AWS Identity and Access Management (IAM) 服務連結角色。服務連結角色是直接連結至 AWS Shield 網路安全主管的唯一 IAM 角色類型。服務連結角色由 AWS Shield 網路安全主管預先定義,並包含該服務代表您呼叫其他 AWS 服務所需的所有許可。
服務連結角色可讓您更輕鬆地設定 AWS Shield 網路安全主管,因為您不必手動新增必要的許可。 AWS Shield 網路安全主管會定義其服務連結角色的許可,除非另有定義,否則只有 AWS Shield 網路安全主管可以擔任其角色。已定義的許可包括信任政策和許可政策。該許可政策無法連接至其他任何 IAM 實體。
請參閱 IAM 主控台中的完整服務連結角色:NetworkSecurityDirectorServiceLinkedRolePolicy
您必須設定許可,IAM 實體 (如使用者、群組或角色) 才可建立、編輯或刪除服務連結角色。如需詳細資訊,請參閱《IAM 使用者指南》中的服務連結角色許可。
如需關於支援服務連結角色的其他服務的資訊,請參閱可搭配 IAM 運作的AWS 服務,並尋找 Service-Linked Role (服務連結角色) 欄顯示為 Yes (是) 的服務。選擇具有連結的是,以檢視該服務的服務連結角色文件。
AWS Shield 網路安全主管的服務連結角色許可
NetworkSecurityDirectorServiceLinkedRolePolicy
服務連結角色信任下列服務以擔任角色:
network-director.amazonaws.com
NetworkSecurityDirectorServiceLinkedRolePolicy
授予 AWS Shield 網路安全主管代表您存取和分析各種 AWS 資源和服務的許可。其中包含:
從 Amazon EC2 資源擷取網路組態和安全性設定
存取 CloudWatch 指標以分析網路流量模式
收集負載平衡器和目標群組的相關資訊
收集 AWS WAF 組態和規則
存取 AWS Direct Connect 閘道資訊
此外,如以下許可清單所述
下列清單適用於不支援縮小特定資源範圍的許可。其餘部分會針對指定的服務資源縮小範圍。
{ "Sid": "ResourceLevelPermissionNotSupported", "Effect": "Allow", "Action": [ "cloudwatch:GetMetricData", "cloudwatch:GetMetricStatistics", "ec2:DescribeAvailabilityZones", "ec2:DescribeCustomerGateways", "ec2:DescribeInstances", "ec2:DescribeInternetGateways", "ec2:DescribeManagedPrefixLists", "ec2:DescribeNatGateways", "ec2:DescribeNetworkAcls", "ec2:DescribeNetworkInterfaces", "ec2:DescribePrefixLists", "ec2:DescribeRegions", "ec2:DescribeRouteTables", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeTransitGateways", "ec2:DescribeTransitGatewayVpcAttachments", "ec2:DescribeTransitGatewayAttachments", "ec2:DescribeTransitGatewayPeeringAttachments", "ec2:DescribeTransitGatewayRouteTables", "ec2:DescribeVpcEndpoints", "ec2:DescribeVpcEndpointServiceConfigurations", "ec2:DescribeVpcPeeringConnections", "ec2:DescribeVpcs", "ec2:DescribeVpnConnections", "ec2:DescribeVpnGateways", "ec2:GetTransitGatewayRouteTablePropagations", "ec2:GetManagedPrefixListEntries", "elasticloadbalancing:DescribeLoadBalancers", "elasticloadbalancing:DescribeTargetGroups", "elasticloadbalancing:DescribeTags", "elasticloadbalancing:DescribeListeners", "elasticloadbalancing:DescribeTargetHealth", "elasticloadbalancing:DescribeTargetGroupAttributes", "elasticloadbalancing:DescribeRules", "elasticloadbalancing:DescribeLoadBalancencerAttributes", "wafv2:ListWebACLs", "cloudfront:ListDistributions", "cloudfront:ListTagsForResource", "directconnect:DescribeDirectConnectGateways", "directconnect:DescribeVirtualInterfaces" ], "Resource": "*" }
NetworkSecurityDirectorServiceLinkedRolePolicy
服務連結角色許可
下列清單涵蓋NetworkSecurityDirectorServiceLinkedRolePolicy
服務連結角色啟用的所有許可。
Amazon CloudFront
{ "Sid": "cloudfront", "Effect": "Allow", "Action": [ "cloudfront:GetDistribution" ], "Resource": "arn:aws:cloudfront::*:distribution/*" }
AWS WAF
{ "Sid": "wafv2", "Effect": "Allow", "Action": [ "wafv2:ListResourcesForWebACL", "wafv2:ListRuleGroups", "wafv2:ListAvailableManagedRuleGroups", "wafv2:GetRuleGroup", "wafv2:DescribeManagedRuleGroup", "wafv2:GetWebACL" ], "Resource": [ "arn:aws:wafv2:*:*:global/rulegroup/*", "arn:aws:wafv2:*:*:regional/rulegroup/*", "arn:aws:wafv2:*:*:global/managedruleset/*", "arn:aws:wafv2:*:*:regional/managedruleset/*", "arn:aws:wafv2:*:*:global/webacl/*/*", "arn:aws:wafv2:*:*:regional/webacl/*/*", "arn:aws:apprunner:*:*:service/*", "arn:aws:cognito-idp:*:*:userpool/*", "arn:aws:ec2:*:*:verified-access-instance/*" ] }
AWS WAF 傳統
{ "Sid": "classicWaf", "Effect": "Allow", "Action": [ "waf:ListWebACLs", "waf:GetWebACL" ], "Resource": [ "arn:aws:waf::*:webacl/*", "arn:aws:waf-regional:*:*:webacl/*" ] }
AWS Direct Connect
{ "Sid": "directconnect", "Effect": "Allow", "Action": [ "directconnect:DescribeConnections", "directconnect:DescribeDirectConnectGatewayAssociations", "directconnect:DescribeDirectConnectGatewayAttachments", "directconnect:DescribeVirtualGateways" ], "Resource": [ "arn:aws:directconnect::*:dx-gateway/*", "arn:aws:directconnect:*:*:dxcon/*", "arn:aws:directconnect:*:*:dxlag/*", "arn:aws:directconnect:*:*:dxvif/*" ] }
AWS Transit Gateway 路由
{ "Sid": "ec2Get", "Effect": "Allow", "Action": [ "ec2:SearchTransitGatewayRoutes" ], "Resource": [ "arn:aws:ec2:*:*:transit-gateway-route-table/*" ] }
AWS Network Firewall
{ "Sid": "networkFirewall", "Effect": "Allow", "Action": [ "network-firewall:ListFirewalls", "network-firewall:ListFirewallPolicies", "network-firewall:ListRuleGroups", "network-firewall:DescribeFirewall", "network-firewall:DescribeFirewallPolicy", "network-firewall:DescribeRuleGroup" ], "Resource": [ "arn:aws:network-firewall:*:*:*/*" ] }
Amazon API Gateway
{ "Sid": "apiGatewayGetAPI", "Effect": "Allow", "Action": [ "apigateway:GET" ], "Resource": [ "arn:aws:apigateway:*::/restapis", "arn:aws:apigateway:*::/restapis/*", "arn:aws:apigateway:*::/apis", "arn:aws:apigateway:*::/apis/*", "arn:aws:apigateway:*::/tags/*", "arn:aws:apigateway:*::/vpclinks", "arn:aws:apigateway:*::/vpclinks/*" ] }
為 AWS Shield 網路安全主管建立服務連結角色
您不需要手動建立一個服務連結角色。當您執行第一次網路分析時, AWS Shield 網路安全主管會為您建立服務連結角色。
若您刪除此服務連結角色,之後需要再次建立,您可以在帳戶中使用相同程序重新建立角色。當您啟用 AWS Shield 網路安全主管記錄時, AWS Shield 網路安全主管會再次為您建立服務連結角色。
編輯 AWS Shield 網路安全主管的服務連結角色
AWS Shield 網路安全主管不允許您編輯NetworkSecurityDirectorServiceLinkedRolePolicy
服務連結角色。因為可能有各種實體會參考服務連結角色,所以您無法在建立角色之後變更其名稱。然而,您可使用 IAM 來編輯角色描述。如需更多資訊,請參閱 IAM 使用者指南中的編輯服務連結角色。
刪除 AWS Shield 網路安全主管的服務連結角色
若您不再使用需要服務連結角色的功能或服務,我們建議您刪除該角色。如此一來,您就沒有未主動監控或維護的未使用實體。然而,在手動刪除服務連結角色之前,您必須先清除資源。
這可保護您的 AWS Shield 網路安全主管資源,因為您不會不小心移除存取資源的許可。
注意
如果您嘗試刪除資源時 AWS Shield ,網路安全主管服務正在使用 角色,則刪除可能會失敗。若此情況發生,請等待數分鐘後並再次嘗試操作。
使用 IAM 手動刪除服務連結角色
使用 IAM 主控台、IAM CLI 或 IAM API 刪除 NetworkSecurityDirectorServiceLinkedRolePolicy
服務連結角色。如需詳細資訊,請參閱《IAM 使用者指南》中的刪除服務連結角色。
AWS Shield 網路安全主管服務連結角色支援的 區域
注意
AWS Shield 網路安全主管處於公開預覽版本,可能會有所變更。
AWS Shield 網路安全主管支援在以下區域中使用服務連結角色,並且只能擷取這些區域中資源的資料。
區域名稱 | 區域 |
---|---|
US East (N. Virginia) | us-east-1 |
Europe (Stockholm) | eu-north-1 |