AWS IAM role with administrative privileges has a trust relationship with a wildcard principal

이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Description

This rule ensures that none of your IAM roles have highly-privileged policies or administrative policies attached to them and a trust policy which includes a wildcard as a Principal. It is possible to specify a wildcard principal which permits any principal, including those outside your AWS organization, the ability to assume the role. It is strongly discouraged to use the wildcard principal in a trust policy unless there is a Condition element to restrict access.

Rationale

An IAM role with highly privileged or administrative permissions can access all AWS services and resources in the account. A role with these privileges could potentially, whether unknowingly or purposefully, cause security issues or data leaks. Roles with this level of access may also be targeted by an adversary to compromise the entire AWS account. When a role has a trust relationship with a wildcard Principal, this means that any AWS account (including those outside your AWS organization) can assume that role.

Remediation

Datadog recommends reducing the permissions attached to an IAM role to the minimum required for it to fulfill its function. You can use AWS Access Advisor to identify effective permissions used by your instances, and use AWS IAM Access Analyzer to generate an IAM policy based on past CloudTrail events.

Any role with a trust relationship involving a wildcard should be audited to ensure their validity and compliance with any security requirements set in place by your organization. In addition, the use of a Condition element is strongly encouraged.