Keen documentation
Open Keen ↗

Administering Keen

DigitalOcean

Chapter 18 of 40

DigitalOcean

DigitalOcean posture reads the team a token belongs to: Cloud Firewalls, Droplet backups, managed databases, Kubernetes clusters and Security Center scan findings, with read-only access, and records the team's resource actions. Results appear on the DigitalOcean vendor's Cloud posture tab (see Cloud vendor posture).

Keen reads api.digitalocean.com through its validated HTTP client and names the team after its UUID. DigitalOcean publishes no API for team members or their two-factor authentication, so the tab lists no identities and runs no user checks.

Checks

CheckActionMet when
SSH and RDP open to the internetposture.network.admin_portsNo Cloud Firewall applied to a Droplet allows TCP port 22 or 3389 from 0.0.0.0/0 or ::/0. A Cloud Firewall drops whatever no rule allows, and a deny rule for every address takes precedence over an allow rule.
Droplets behind a Cloud Firewallposture.network.firewall_coverageEvery Droplet has a Cloud Firewall, applied by ID or by tag.
Databases open to the internetposture.network.databasesEvery managed database has trusted sources, and none of them is 0.0.0.0/0 or ::/0. A database without trusted sources accepts connections from anywhere.
Droplet backupsposture.resilience.backupsEvery Droplet has backups on.
Kubernetes clustersposture.kubernetes.control_planeEvery cluster has a high-availability control plane and automatic upgrades on.
Security scan findingsposture.findingsThe latest Security Center scan has no critical or high finding. A team whose scans are off, or have not run, reads Not established.

Activity

Keen records the team's resource actions under their own type, such as power_cycle, snapshot or resize, with the resource type and region, and an outcome of success for completed actions and failure for errored ones. DigitalOcean's actions name no person. Each read stops 15 minutes before the present.

1. Create a custom-scoped, read-only token

  1. In the DigitalOcean control panel, switch to the team Keen should read, then open API → Tokens → Generate New Token. Name it, for example Keen posture, and choose an expiry.
  2. Choose Custom Scopes and select only the read scopes below, then generate the token. Copy it at once: the control panel shows it only once.
ScopeNeeded by
account:readThe team's name and UUID
actions:readResource actions
droplet:readDroplets behind a Cloud Firewall, and Droplet backups
firewall:readSSH and RDP open to the internet, and Droplets behind a Cloud Firewall
tag:readCloud Firewalls applied to Droplets by tag
database:readDatabases open to the internet. It does not include database credentials, which need database:view_credentials.
kubernetes:readKubernetes clusters. It does not include cluster credentials.
security:readSecurity scan findings. Leave it out to skip that check.

2. Configure Keen

SettingPurpose
KEEN_DIGITALOCEAN_ENABLEDTurns DigitalOcean posture on.
DIGITALOCEAN_TOKENThe token from step 1.

3. Verify, rotate or revoke

Recreate the API, worker and beat containers and choose Admin → Ingest runners → Run DigitalOcean, then open the DigitalOcean vendor's Cloud posture tab. A check that reads Not established names its reason: not allowed means a scope is missing; not set up, or the credentials were not accepted covers a missing, expired or revoked token and scans that are off. Before the token expires, generate another, update DIGITALOCEAN_TOKEN, recreate the containers and delete the old token under API → Tokens.