# Ensure Content Trust for Docker is Enabled

- Source: https://support.icompaas.com/support/solutions/articles/62000234371-ensure-content-trust-for-docker-is-enabled
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Docker Benchmark v1.7.0](https://support.icompaas.com/support/solutions/62000112687) › [CIS Docker Benchmark](https://support.icompaas.com/support/solutions/folders/62000169241)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### **Profile Applicability:**

-   **Level 2** 
    

**Description:**

Content trust ensures that images pulled from a Docker registry are digitally signed, providing the ability to verify the authenticity and integrity of the images before they are used. By default, content trust is disabled.

**Rationale:**

Enabling content trust ensures that Docker images are signed and can be verified for authenticity. This provides confidence that the image has not been tampered with and that it originates from a trusted publisher.

**Impact:**

**Pros:**

-   Ensures that Docker images are signed and verified before usage, reducing the risk of using compromised or untrusted images.
    

**Cons:**

-   May require additional configuration and the management of trust keys.
    
-   Restricts the use of Docker images unless they are signed, which could impact workflows if not managed properly.
    

**Default Value:**

By default, content trust is disabled.  

**Pre-requisites:**

-   Ensure Docker is installed and running on the system.
    
-   Verify that the Docker client is configured to allow the use of trusted images.
    

**Remediation:**

**Test Plan:**

**Using AWS Console:**

1.  Log in to the EC2 instance running Docker.
    
2.  Check the environment variable DOCKER\_CONTENT\_TRUST:
    
    Run the command echo $DOCKER\_CONTENT\_TRUST.
    It should return 1 if content trust is enabled.
    

**Using AWS CLI:**

1.  Connect to the EC2 instance running Docker.
    
2.  Run the following command to verify if Docker content trust is enabled:  
    
    echo $DOCKER\_CONTENT\_TRUST
    

**Implementation Plan:**

**Using AWS Console:**

1.  Connect to the EC2 instance.
    
2.  Enable content trust by setting the DOCKER\_CONTENT\_TRUST environment variable:  
    
    Run export DOCKER\_CONTENT\_TRUST=1 in the terminal.
    
3.  To make this setting persistent across logins, add the above export command to the ~/.bashrc or ~/.bash\_profile file.
    

**Using AWS CLI:**

1.  Use SSM to enable content trust on remote EC2 instances:
    
2.  Run the following command:  
    
    aws ssm send-command --document-name "AWS-RunShellScript" --targets "Key=instanceIds,Values=instance\_id" --parameters 'commands=\["echo \\"export DOCKER\_CONTENT\_TRUST=1\\" >> ~/.bashrc && source ~/.bashrc"\]'
    

**Backout Plan:**

**Using AWS Console:**

1.  Connect to the EC2 instance.h b
    
2.  Disable content trust by running:  
    
    unset DOCKER\_CONTENT\_TRUST
    
3.  To make this change permanent, remove or comment out the export DOCKER\_CONTENT\_TRUST=1 line in the ~/.bashrc or ~/.bash\_profile file.
    

**Using AWS CLI:**

1.  Use SSM to disable content trust remotely:
    
2.  Run the following command:  
    
    aws ssm send-command --document-name "AWS-RunShellScript" --targets "Key=instanceIds,Values=instance\_id" --parameters 'commands=\["unset DOCKER\_CONTENT\_TRUST"\]'
    

**References:**

-   [Docker Content Trust Documentation](https://docs.docker.com/engine/security/trust/)
    
-   [Docker Notary Service Architecture](https://docs.docker.com/notary/service_architecture/)
    
-   [Docker Command Line Environment Variables](https://docs.docker.com/engine/reference/commandline/cli/#environment-variables)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
