SCA - What is the inline policy injected into the target role in AWS?
Question
After enabling SCA in one of my AWS accounts and using the AWS CyberArk-dedicated role for access, it is found that the following inline policy is attached to the role:
Role name (for example):
cark-SSOAWSMLDpProdEngg
Policy Name:
CYBR_JIT_EXP
Policy Content:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"ForAnyValue:StringEquals": {
"aws:SourceIdentity": [
"cark-SSOAWSMLDpProdEngg",
"sca_xxx_xxxx"
]
}
}
}
]
}
This policy says: "Any STS session for this role whose aws:SourceIdentity matches one of those strings is denied from doing anything."
How was this inline policy got attached to the role?
Environment
Secure Cloud Access (SCA) SCA UI
Answer
One of SCA’s features is session revocation. In IAM, when a revocation is triggered, SCA injects an inline policy into the target role. This policy is scoped to the specific session parameters ("aws:SourceIdentity"), so the affected user—whose access is via an assumed IAM role—receives an access denied response as a result of the newly injected policy. The policy applies only to that specific role session and does not impact other users who assume the same role.