CIS DigitalOcean Benchmark

Security configuration recommendations for DigitalOcean cloud infrastructure

v1.0.0 01-2025

Overview

▶

This benchmark provides prescriptive guidance for establishing a secure configuration posture for DigitalOcean cloud infrastructure. It covers identity and access management, network security, compute hardening, storage and database security, Kubernetes, load balancing, and operational best practices using doctl CLI and the DigitalOcean API.

16Recommendations
7Sections
2Profile Levels
SectionAreaFocus
1Identity & Access ManagementTeam 2FA, API token scoping and rotation
2Network SecurityVPC isolation and Cloud Firewall configuration
3Compute SecuritySSH key enforcement and monitoring agent setup
4Storage & DatabaseSpaces ACLs and managed database firewall rules
5Kubernetes & ContainersDOKS auto-upgrade, HA, and registry security
6Load Balancing & DNSHTTPS load balancers and DNS security records
7Operations & BackupAutomated backups and project resource organization

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — StandardEssential security for all DigitalOcean deployments; minimal performance impact.
L2Level 2 — HardenedAdvanced hardening for PCI-DSS, HIPAA, or high-security environments.

1 — Identity & Access Management

▶

1.1 Account Security

▶
1.1.1 Ensure two-factor authentication is enabled for all team members (Automated)
L1 Auto
Description

This recommendation verifies that two-factor authentication is enabled for all team members on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check team members and roles:
doctl account get

# List team members via API:
curl -s -H "Authorization: Bearer $DO_TOKEN" \
  https://api.digitalocean.com/v2/account | jq .
Remediation
# Enable two-factor authentication:
# Cloud Console > Account > Security > Enable 2FA

# Use team-based access:
# Cloud Console > Settings > Team
# Add members with appropriate roles (Admin, Billing, Member)
1.1.2 Ensure API tokens follow least privilege and are rotated (Manual)
L1 Manual
Description

This recommendation verifies that API tokens follow least privilege and are rotated on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List API tokens:
curl -s -H "Authorization: Bearer $DO_TOKEN" \
  https://api.digitalocean.com/v2/tokens | jq '.[].name'

# Check token scopes:
doctl auth list
Remediation
# Create read-only tokens for monitoring:
# Cloud Console > API > Tokens > Generate New Token
# Select: Read scope only

# Rotate tokens regularly:
# Revoke old tokens and generate new ones
# Use short-lived tokens where possible

2 — Network Security

▶

2.1 VPC & Firewall

▶
2.1.1 Ensure Droplets are deployed within a VPC (Automated)
L1 Auto
Description

This recommendation verifies that Droplets are deployed within a VPC on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List all Droplets and their networking:
doctl compute droplet list --format ID,Name,PublicIPv4,PrivateIPv4,VPCId

# Check VPC configuration:
doctl vpcs list --format ID,Name,IPRange,Default
Remediation
# Create VPC for network isolation:
doctl vpcs create --name production-vpc \
  --region nyc1 --ip-range 10.10.0.0/16

# Create Droplet in VPC:
doctl compute droplet create web-01 \
  --region nyc1 --size s-2vcpu-4gb \
  --image ubuntu-24-04-x64 \
  --vpc-uuid $VPC_UUID
2.1.2 Ensure Cloud Firewalls are applied with restrictive rules (Automated)
L1 Auto
Description

This recommendation verifies that Cloud Firewalls are applied with restrictive rules on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List Cloud Firewalls:
doctl compute firewall list --format ID,Name,Status

# Get firewall rules:
doctl compute firewall get $FW_ID --format InboundRules,OutboundRules
Remediation
# Create Cloud Firewall with restrictive rules:
doctl compute firewall create \
  --name production-fw \
  --inbound-rules 'protocol:tcp,ports:22,address:10.10.0.0/16 protocol:tcp,ports:443,address:0.0.0.0/0' \
  --outbound-rules 'protocol:tcp,ports:all,address:0.0.0.0/0 protocol:udp,ports:53,address:0.0.0.0/0' \
  --droplet-ids $DROPLET_ID

3 — Compute Security

▶

3.1 Droplet Hardening

▶
3.1.1 Ensure SSH key authentication is enforced (Automated)
L1 Auto
Description

This recommendation ensures that SSH key authentication is enforced on the DigitalOcean cloud infrastructure platform. Enforcing this requirement establishes a minimum security standard and prevents insecure configurations.

Rationale

Without this enforcement, the DigitalOcean cloud infrastructure platform may accept insecure configurations that weaken overall security posture. Mandating this control ensures consistent protection against common attack vectors.

Audit
# List Droplets and check SSH keys:
doctl compute droplet list --format ID,Name

# List registered SSH keys:
doctl compute ssh-key list --format ID,Name,FingerPrint
Remediation
# Add SSH key and create Droplet with key-only access:
doctl compute ssh-key create my-key \
  --public-key "$(cat ~/.ssh/id_ed25519.pub)"

# Create Droplet with SSH key:
doctl compute droplet create secure-vm \
  --region nyc1 --size s-1vcpu-1gb \
  --image ubuntu-24-04-x64 \
  --ssh-keys $KEY_FINGERPRINT

# Disable password authentication on Droplet:
sed -i 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
systemctl restart sshd
3.1.2 Ensure monitoring and alerting are enabled (Automated)
L1 Auto
Description

This recommendation verifies that monitoring and alerting are enabled on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check Droplet monitoring agent:
doctl compute droplet list --format ID,Name,Status

# Check monitoring via API:
curl -s -H "Authorization: Bearer $DO_TOKEN" \
  https://api.digitalocean.com/v2/monitoring/alerts | jq '.policies[].type'
Remediation
# Enable monitoring on Droplet creation:
doctl compute droplet create monitored-vm \
  --region nyc1 --size s-2vcpu-4gb \
  --image ubuntu-24-04-x64 \
  --enable-monitoring

# Create alert policy:
curl -s -X POST -H "Authorization: Bearer $DO_TOKEN" \
  -H 'Content-Type: application/json' \
  https://api.digitalocean.com/v2/monitoring/alerts \
  -d '{
    "alerts": {"email": ["admin@example.com"]},
    "description": "High CPU",
    "compare": "GreaterThan",
    "value": 80,
    "window": "5m",
    "type": "v1/insights/droplet/cpu",
    "entities": ["'$DROPLET_ID'"]
  }'

4 — Storage & Database

▶

4.1 Data Security

▶
4.1.1 Ensure Spaces are configured with private ACLs (Automated)
L1 Auto
Description

This recommendation verifies that Spaces are configured with private ACLs on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List Spaces (S3-compatible object storage):
doctl compute cdn list 2>/dev/null

# Check Space permissions via s3cmd:
s3cmd info s3://my-space --access_key=$DO_SPACES_KEY \
  --secret_key=$DO_SPACES_SECRET \
  --host=nyc3.digitaloceanspaces.com \
  --host-bucket='%(bucket)s.nyc3.digitaloceanspaces.com'
Remediation
# Create private Space:
curl -s -X PUT -H "Authorization: Bearer $DO_TOKEN" \
  https://api.digitalocean.com/v2/spaces/my-private-space \
  --data '{"region": "nyc3", "acl": "private"}'

# Set CORS policy:
# Spaces Settings > CORS Configuration
# Restrict origins to your domain only
4.1.2 Ensure managed databases use VPC and firewall rules (Automated)
L1 Auto
Description

This recommendation verifies that managed databases use VPC and firewall rules on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List managed databases:
doctl databases list --format ID,Name,Engine,Version,Status

# Check database firewall rules:
doctl databases firewalls list $DB_ID
Remediation
# Create managed database in VPC:
doctl databases create prod-db \
  --engine pg --version 16 \
  --region nyc1 --size db-s-2vcpu-4gb \
  --num-nodes 2 --private-network-uuid $VPC_UUID

# Add firewall rules:
doctl databases firewalls append $DB_ID \
  --rule droplet:$DROPLET_ID

5 — Kubernetes & Containers

▶

5.1 DOKS Security

▶
5.1.1 Ensure Kubernetes clusters use auto-upgrade and HA (Automated)
L1 Auto
Description

This recommendation verifies that Kubernetes clusters use auto-upgrade and HA on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List Kubernetes clusters:
doctl kubernetes cluster list --format ID,Name,Version,AutoUpgrade

# Check node pool configuration:
doctl kubernetes cluster node-pool list $CLUSTER_ID
Remediation
# Create secure Kubernetes cluster:
doctl kubernetes cluster create prod-k8s \
  --region nyc1 --version latest \
  --auto-upgrade --surge-upgrade \
  --node-pool 'name=worker;size=s-4vcpu-8gb;count=3;auto-scale=true;min-nodes=2;max-nodes=5'

# Enable HA control plane:
doctl kubernetes cluster update $CLUSTER_ID --ha
5.1.2 Ensure container registry uses garbage collection (Automated)
L1 Auto
Description

This recommendation verifies that container registry uses garbage collection on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check container registry:
doctl registry get 2>/dev/null

# List repositories:
doctl registry repository lv
Remediation
# Create container registry:
doctl registry create my-registry --region nyc1

# Enable garbage collection:
doctl registry garbage-collection start $REGISTRY_NAME \
  --include-untagged-manifests

# Integrate with Kubernetes:
doctl registry kubernetes-manifest | kubectl apply -f -

6 — Load Balancing & DNS

▶

6.1 Traffic Security

▶
6.1.1 Ensure load balancers enforce HTTPS with TLS termination (Automated)
L1 Auto
Description

This recommendation verifies that load balancers enforce HTTPS with TLS termination on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List load balancers:
doctl compute load-balancer list --format ID,Name,IP,Algorithm,Status

# Check SSL configuration:
doctl compute load-balancer get $LB_ID --format ForwardingRules
Remediation
# Create HTTPS load balancer:
doctl compute load-balancer create \
  --name prod-lb --region nyc1 \
  --forwarding-rules 'entry_protocol:https,entry_port:443,target_protocol:http,target_port:80,certificate_id:$CERT_ID' \
  --health-check 'protocol:http,port:80,path:/health,check_interval_seconds:10,response_timeout_seconds:5,healthy_threshold:3,unhealthy_threshold:3' \
  --droplet-ids $DROPLET_IDS \
  --redirect-http-to-https
6.1.2 Ensure DNS records include CAA and SPF (Automated)
L1 Auto
Description

This recommendation verifies that DNS records include CAA and SPF on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check domain configuration:
doctl compute domain list

# List DNS records:
doctl compute domain records list example.com
Remediation
# Configure DNS with DNSSEC:
doctl compute domain create example.com

# Add CAA record to restrict certificate issuance:
doctl compute domain records create example.com \
  --record-type CAA --record-name @ \
  --record-data '0 issue letsencrypt.org' --record-ttl 3600

# Add SPF record:
doctl compute domain records create example.com \
  --record-type TXT --record-name @ \
  --record-data 'v=spf1 include:_spf.digitalocean.com ~all' --record-ttl 3600

7 — Operations & Backup

▶

7.1 Backup & Organization

▶
7.1.1 Ensure automated backups and snapshots are enabled (Automated)
L1 Auto
Description

This recommendation verifies that automated backups and snapshots are enabled on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List snapshots:
doctl compute snapshot list --format ID,Name,ResourceType,CreatedAt

# Check backup status:
doctl compute droplet list --format ID,Name,Features
Remediation
# Enable automated backups:
doctl compute droplet-action enable-backups $DROPLET_ID

# Create manual snapshot:
doctl compute droplet-action snapshot $DROPLET_ID \
  --snapshot-name "pre-deploy-$(date +%Y%m%d)"

# Enable volume snapshots:
doctl compute volume snapshot $VOL_ID \
  --snapshot-name "vol-backup-$(date +%Y%m%d)"
7.1.2 Ensure resources are organized by project and environment (Automated)
L1 Auto
Description

This recommendation verifies that resources are organized by project and environment on the DigitalOcean cloud infrastructure platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the DigitalOcean cloud infrastructure platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check project structure:
doctl projects list --format ID,Name,Environment

# List project resources:
doctl projects resources list $PROJECT_ID
Remediation
# Organize resources by project and environment:
doctl projects create --name production \
  --environment Production --purpose 'Web Application'

doctl projects create --name staging \
  --environment Staging --purpose 'Testing'

# Move resources to appropriate project:
doctl projects resources assign $PROD_PROJECT_ID \
  --resource=do:droplet:$DROPLET_ID \
  --resource=do:loadbalancer:$LB_ID