# Ensure that authorization for Docker client commands is enabled

- Source: https://support.icompaas.com/support/solutions/articles/62000234320-ensure-that-authorization-for-docker-client-commands-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:**

Authorization for Docker client commands must be enabled to restrict access to Docker functionality. This ensures that only authorized users can execute Docker commands, which is particularly important in a multi-user or multi-tenant environment.  

**Rationale:**

Enabling authorization for Docker commands prevents unauthorized users from executing commands that could potentially harm the system or compromise security. It provides a means of controlling who can interact with the Docker daemon and manage containers.  

**Impact:**

**Pros:**  

-   Provides an additional layer of security by ensuring only authorized users can manage Docker.  
    
-   Reduces the risk of unauthorized access or actions on the Docker host.  
    

**Cons:**  

-   May require additional configuration to set up the authorization system, such as configuring Docker’s API or certificate-based authentication.  
    

**Default Value:**

By default, Docker does not enable authorization for client commands unless explicitly configured.  

**Pre-requisites:**

-   Docker installed and running.  
    
-   Administrative privileges to configure Docker security.  
      
    

  

**Remediation:**

**Test Plan:**

**Using AWS Console:**

1.  Log in to the EC2 instance running Docker.  
    
2.  Verify if Docker authorization is configured by checking the daemon settings in the /etc/docker/daemon.json file:
    

cat /etc/docker/daemon.json

**Using AWS CLI:**

1.  Connect to the EC2 instance where Docker is running.  
    
2.  Run the following command to verify the authorization settings:  
    
    cat /etc/docker/daemon.json
    
      
    

**Implementation Plan:**

**Using AWS Console:**

1.  Log in to the EC2 instance.  
    
2.  Enable Docker client authorization by configuring TLS or certificate-based authentication. Modify the /etc/docker/daemon.json file:
    
    {
      "hosts": \["tcp://0.0.0.0:2376"\],
      "tlsverify": true,
      "tlscert": "/etc/docker/cert.pem",
      "tlskey": "/etc/docker/key.pem",
      "tlscacert": "/etc/docker/ca.pem"
    }
    
3.  Restart Docker to apply the changes:  
    

sudo systemctl restart docker

**Using AWS CLI:**

1.  Use SSM to modify the Docker configuration and restart Docker:  
    
    aws ssm send-command --document-name "AWS-RunShellScript" --targets "Key=instanceIds,Values=instance\_id" --parameters 'commands=\["echo \\'{\\"hosts\\": \[\\"tcp://0.0.0.0:2376\\"\], \\"tlsverify\\": true, \\"tlscert\\": \\"/etc/docker/cert.pem\\", \\"tlskey\\": \\"/etc/docker/key.pem\\", \\"tlscacert\\": \\"/etc/docker/ca.pem\\"}\\' > /etc/docker/daemon.json && sudo systemctl restart docker"\]'
    
      
    

**Backout Plan:**

**Using AWS Console:**

1.  Log in to the EC2 instance.  
    
2.  Revert the authorization configuration in /etc/docker/daemon.json to disable TLS or revert to the default settings:
    
    {
      "hosts": \["unix:///var/run/docker.sock"\]
    }
    
3.  Restart Docker:  
    
    sudo systemctl restart docker
    

**Using AWS CLI:**

1.  Use SSM to revert the authorization settings and restart Docker:  
    
    aws ssm send-command --document-name "AWS-RunShellScript" --targets "Key=instanceIds,Values=instance\_id" --parameters 'commands=\["echo \\'{\\"hosts\\": \[\\"unix:///var/run/docker.sock\\"\]}\\' > /etc/docker/daemon.json && sudo systemctl restart docker"\]'
    
      
    

**References:**

-   [Docker Authentication Documentation](https://docs.docker.com/engine/security/https/)

## 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.
