AWSSystemsManagerJustInTimeAccessTokenSessionPolicy

Last Modified

Mar 12, 2026

March 12, 2026 at 09:27 PM UTC

Version

v3

Total Versions

1

Created

Feb 12, 2026

Actions

11

Risk

Medium

The same capabilities in a scoped form, resource policy writes, reads across all data, or full access to a whole service. Read from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed

  • Medium

    Can take over existing resources that run as another role

    Grants the actions of 2 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.

    • ssm-001ssm:StartSessionscoped
      • ssm:StartSession: on arn:aws:ssm:*:*:document/SSM-SessionManagerRunShell
    • ssm-002ssm:SendCommandscoped
      • ssm:SendCommand: condition aws:CalledViaFirst, on arn:aws:ssm:*:*:document/AWSSSO-CreateSSOUser

    Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.

Policy Document

View on GitHub
{
  "PolicyVersion": {
    "Document": {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "SsmStartSession",
          "Effect": "Allow",
          "Action": [
            "ssm:StartSession"
          ],
          "Resource": [
            "arn:aws:ssm:*:*:document/SSM-SessionManagerRunShell"
          ]
        },
        {
          "Sid": "GuiConnect",
          "Effect": "Allow",
          "Action": [
            "ssm-guiconnect:CancelConnection",
            "ssm-guiconnect:GetConnection",
            "ssm-guiconnect:StartConnection"
          ],
          "Resource": "*"
        },
        {
          "Sid": "SessionManagerKmsPermission",
          "Effect": "Allow",
          "Action": [
            "kms:GenerateDataKey"
          ],
          "Resource": "arn:aws:kms:*:*:key/*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceTag/SystemsManagerJustInTimeNodeAccessManaged": "true"
            }
          }
        },
        {
          "Sid": "RdpKmsPermission",
          "Effect": "Allow",
          "Action": [
            "kms:CreateGrant"
          ],
          "Resource": "arn:aws:kms:*:*:key/*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceTag/SystemsManagerJustInTimeNodeAccessManaged": "true"
            },
            "StringLike": {
              "kms:ViaService": "ssm-guiconnect.*.amazonaws.com"
            },
            "Bool": {
              "aws:ViaAWSService": "true"
            }
          }
        },
        {
          "Sid": "RdpStartSession",
          "Effect": "Allow",
          "Action": [
            "ssm:StartSession"
          ],
          "Resource": [
            "arn:aws:ssm:*:*:document/AWS-StartPortForwardingSession"
          ],
          "Condition": {
            "StringEquals": {
              "aws:CalledViaFirst": "ssm-guiconnect.amazonaws.com"
            }
          }
        },
        {
          "Sid": "SsmRdpSsoSetup",
          "Effect": "Allow",
          "Action": [
            "sso:ListDirectoryAssociations*",
            "identitystore:DescribeUser",
            "ssm:GetCommandInvocation"
          ],
          "Resource": "*",
          "Condition": {
            "StringEquals": {
              "aws:CalledViaFirst": "ssm-guiconnect.amazonaws.com"
            }
          }
        },
        {
          "Sid": "SsmRdpSsoSetupSendCommand",
          "Effect": "Allow",
          "Action": [
            "ssm:SendCommand"
          ],
          "Resource": [
            "arn:aws:ssm:*:*:document/AWSSSO-CreateSSOUser"
          ],
          "Condition": {
            "StringEquals": {
              "aws:CalledViaFirst": "ssm-guiconnect.amazonaws.com"
            }
          }
        }
      ]
    },
    "VersionId": "v3",
    "IsDefaultVersion": true,
    "CreateDate": "2026-02-12T18:03:06+00:00"
  }
}

Version History (4 recorded)

Raw history

AWSSystemsManagerJustInTimeAccessTokenSessionPolicy - Policy Version v3

No recorded action delta - this version predates the change index. View the raw diff.

Mar 12, 2026

295eb93

AWSSystemsManagerJustInTimeAccessTokenSessionPolicy - Policy Version v3

No recorded action delta - this version predates the change index. View the raw diff.

Feb 12, 2026

56688a0

AWSSystemsManagerJustInTimeAccessTokenSessionPolicy - Policy Version v2

No recorded action delta - this version predates the change index. View the raw diff.

Feb 12, 2026

cf5240f

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Apr 17, 2025

b377b71