Profile Applicability
- Level 2
Description
AWS Systems Manager (SSM) documents define the actions that Systems Manager performs on managed instances. Publicly shared SSM documents can be accessed by anyone, potentially exposing sensitive information or allowing unauthorized actions. Ensuring that SSM documents are not set as public helps maintain security and control over your environment.
Rationale
Enhanced Security: Prevents unauthorized access to sensitive SSM documents.
Risk Mitigation: Reduces the risk of malicious actions or data exposure.
Compliance: Aligns with security best practices and regulatory requirements.
Impact
Pros:
Protects sensitive information and configurations in SSM documents.
Reduces the risk of unauthorized actions on managed instances.
Enhances overall security posture.
Cons:
Requires careful management of document sharing permissions.
May limit collaboration if not properly configured.
Default Value
By default, SSM documents are private and accessible only to the AWS account that created them. Public sharing must be explicitly configured.
Pre-Requisite
IAM Permissions Required:
ssm:ListDocuments
ssm:GetDocument
ssm:ModifyDocumentPermission
Remediation
Test Plan:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to Systems Manager > Documents.
Review the Permissions column for each document. Identify any documents marked as Public.
Using AWS CLI:
List all SSM documents:
aws ssm list-documents --query "DocumentIdentifiers[*].{Name:Name,Owner:Owner}"
Check the permissions of each document:
aws ssm describe-document-permission --name <document-name> --permission-type Share
Identify documents shared with All (indicating public access).
Implementation Steps:
Using AWS Console:
Navigate to Systems Manager > Documents.
Select the document marked as Public.
Click Actions > Modify Permissions.
Remove the All permission to revoke public access.
Save the changes.
Using AWS CLI:
Revoke public access to the document:
aws ssm modify-document-permission --name <document-name> --permission-type Share --account-ids-to-remove All
Verify the changes:
aws ssm describe-document-permission --name <document-name> --permission-type Share
Backout Plan
Using AWS Console:
If restricting access to SSM documents causes issues, sign in to the AWS Management Console.
Navigate to Amazon SSM, select the document, and go to Permissions.
Revert the access permissions, if necessary, to allow specific accounts or services while minimizing exposure.Save and ensure the document is accessible to the necessary users without exposing it publicly.
Using AWS CLI:
If changes cause issues, you can re-enable public access by running:
aws ssm put-document-permission --name <DOCUMENT_NAME> --principal "*" --action "DescribeDocument" --region <REGION>
Verify that the document is again accessible publicly (though this is not recommended):
aws ssm describe-document --name <DOCUMENT_NAME> --region <REGION>