Este producto no es compatible con el sitio Datadog seleccionado. ().
Esta página aún no está disponible en español. Estamos trabajando en su traducción. Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.
Cross-account IAM role trust policies that allow sts:AssumeRole to external principals must require an ExternalId or MFA to prevent unintended or unauthorized access from third-party accounts. Without an ExternalId or a Condition requiring MFA, an external principal (including other-account root principals) that can assume the role may gain access to sensitive resources or perform privileged actions.
In Ansible amazon.aws.iam_role and iam_role tasks, the assume_role_policy_documentStatement with Effect: Allow and Action: sts:AssumeRole that names a cross-account Principal (for example, an ARN that includes another account or :root) must include a Condition containing either sts:ExternalId (for example, StringEquals) or aws:MultiFactorAuthPresent set to true. Resources missing the required Condition or that allow cross-account assume-role without ExternalId or MFA are flagged.
- name:Create a role with description and tags4amazon.aws.iam_role:name:mynewrole4assume_role_policy_document:> {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"AWS": "arn:aws:iam::987654321145:root"
},
"Effect": "Allow",
"Resource": "*",
"Sid": "",
"Condition": {
"StringEquals": {
"sts:ExternalId": "98765"
}
}
}
]
}description:This is My New Roletags:env:dev
- name:Create a role with description and tags5amazon.aws.iam_role:name:mynewrole5assume_role_policy_document:> {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"AWS": "arn:aws:iam::987654321145:root"
},
"Effect": "Allow",
"Resource": "*",
"Sid": "",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
}
]
}description:This is My New Roletags:env:dev
Non-Compliant Code Examples
- name:Create a role with description and tags2amazon.aws.iam_role:name:mynewrole2assume_role_policy_document:> {
"Version": "2012-10-17",
"Statement": {
"Action": "sts:AssumeRole",
"Principal": {
"AWS": "arn:aws:iam::987654321145:root"
},
"Effect": "Allow",
"Resource": "*",
"Sid": "",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": "false"
}
}
}
}description:This is My New Roletags:env:dev
- name:Create a role with description and tags3amazon.aws.iam_role:name:mynewrole3assume_role_policy_document:> {
"Version": "2012-10-17",
"Statement": {
"Action": "sts:AssumeRole",
"Principal": {
"AWS": "arn:aws:iam::987654321145:root"
},
"Effect": "Allow",
"Resource": "*",
"Sid": "",
"Condition": {
"StringEquals": {
"sts:ExternalId": ""
}
}
}
}description:This is My New Roletags:env:dev
- name:Create a role with description and tagsamazon.aws.iam_role:name:mynewroleassume_role_policy_document:> {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"AWS": "arn:aws:iam::987654321145:root"
},
"Effect": "Allow",
"Resource": "*",
"Sid": ""
}
]
}description:This is My New Roletags:env:dev
1
2
rulesets:- Ansible / AWS # Rules to enforce / AWS.
Solicitar una demostración personalizada
Empezando con Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.