CIS Couchbase 7 Benchmark

Security configuration recommendations for Couchbase Server 7

v1.0.0 01-2025

Overview

▶

This benchmark provides prescriptive guidance for establishing a secure configuration posture for Couchbase Server 7. It covers authentication and RBAC, transport encryption, bucket security, audit logging, cluster resilience, query service hardening, and resource management using the couchbase-cli and REST API.

16Recommendations
7Sections
2Profile Levels
SectionAreaFocus
1Authentication & AuthorizationLDAP integration, RBAC roles, and password policies
2Transport SecurityClient and node-to-node TLS encryption
3Bucket & Data SecurityBucket replication, flush protection, and XDCR encryption
4Audit & LoggingAudit log enablement, rotation, and data redaction
5Cluster ResilienceAuto-failover configuration and automated backup scheduling
6Query & Search SecurityN1QL resource limits and FTS RBAC access control
7Resource ManagementAuto-compaction and per-service memory quota settings

Profile Definitions

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

1 — Authentication & Authorization

▶

1.1 Identity & RBAC

▶
1.1.1 Ensure external authentication is configured (Automated)
L1 Auto
Description

This recommendation verifies that external authentication is configured on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check authentication settings:
couchbase-cli setting-ldap -c localhost:8091 -u admin -p $CB_PASS --get

# List local users:
couchbase-cli user-manage -c localhost:8091 -u admin -p $CB_PASS --list
Remediation
# Configure LDAP authentication:
couchbase-cli setting-ldap -c localhost:8091 -u admin -p $CB_PASS \
  --authentication-enabled 1 \
  --hosts ldap.example.com \
  --port 636 \
  --encryption TLS \
  --bind-dn 'cn=couchbase,ou=svc,dc=example,dc=com' \
  --bind-password '$LDAP_BIND_PASS' \
  --user-dn-query 'ou=users,dc=example,dc=com??sub?(uid=%u)'
1.1.2 Ensure RBAC roles follow least-privilege principles (Automated)
L1 Auto
Description

This recommendation verifies that RBAC roles follow least-privilege principles on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check RBAC roles for users:
couchbase-cli user-manage -c localhost:8091 -u admin -p $CB_PASS --list | \
  jq '.[] | {id, name, roles: [.roles[].role]}'
Remediation
# Create user with minimal role:
couchbase-cli user-manage -c localhost:8091 -u admin -p $CB_PASS \
  --set --rbac-username appuser \
  --rbac-password '$APP_PASS' \
  --roles data_reader[mybucket],data_writer[mybucket] \
  --auth-domain local
1.1.3 Ensure strong password policy is enforced (Automated)
L1 Auto
Description

This recommendation ensures that strong password policy is enforced on the Couchbase 7 NoSQL database. Enforcing this requirement establishes a minimum security standard and prevents insecure configurations.

Rationale

Without this enforcement, the Couchbase 7 NoSQL database may accept insecure configurations that weaken overall security posture. Mandating this control ensures consistent protection against common attack vectors.

Audit
# Check password policy:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/security | \
  jq '{passwordPolicy: .passwordPolicy}'
Remediation
# Set strong password policy:
curl -s -X POST -u admin:$CB_PASS \
  http://localhost:8091/settings/security \
  -d 'passwordPolicy.minLength=12' \
  -d 'passwordPolicy.mustContainUppercase=true' \
  -d 'passwordPolicy.mustContainLowercase=true' \
  -d 'passwordPolicy.mustContainDigit=true' \
  -d 'passwordPolicy.mustContainSpecialChar=true'

2 — Transport Security

▶

2.1 TLS & Encryption

▶
2.1.1 Ensure TLS is configured for client connections (Automated)
L1 Auto
Description

This recommendation verifies that TLS is configured for client connections on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check TLS configuration:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/security | \
  jq '{clusterEncryptionLevel, disableUIOverHTTP, tlsMinVersion}'
Remediation
# Enable cluster encryption:
couchbase-cli setting-security -c localhost:8091 -u admin -p $CB_PASS \
  --set --cluster-encryption-level all \
  --disable-http-ui 1 \
  --tls-min-version tlsv1.2

# Upload node certificates:
couchbase-cli ssl-manage -c localhost:8091 -u admin -p $CB_PASS \
  --upload-cluster-ca /etc/couchbase/ca.pem
2.1.2 Ensure node-to-node encryption is enabled (Automated)
L1 Auto
Description

This recommendation verifies that node-to-node encryption is enabled on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check inter-node encryption:
curl -s -u admin:$CB_PASS https://localhost:18091/settings/security | \
  jq '{clusterEncryptionLevel}'
Remediation
# Enable node-to-node encryption:
couchbase-cli node-to-node-encryption -c localhost:8091 -u admin -p $CB_PASS \
  --enable

# Set encryption level to strict:
couchbase-cli setting-security -c localhost:8091 -u admin -p $CB_PASS \
  --set --cluster-encryption-level strict

3 — Bucket & Data Security

▶

3.1 Bucket Configuration

▶
3.1.1 Ensure buckets have replication and flush protection (Automated)
L1 Auto
Description

This recommendation verifies that buckets have replication and flush protection on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check bucket configuration:
couchbase-cli bucket-list -c localhost:8091 -u admin -p $CB_PASS | \
  jq '.[] | {name, bucketType, replicaNumber, conflictResolutionType}'
Remediation
# Create bucket with replication and access control:
couchbase-cli bucket-create -c localhost:8091 -u admin -p $CB_PASS \
  --bucket mybucket \
  --bucket-type couchbase \
  --bucket-ramsize 512 \
  --bucket-replica 2 \
  --enable-flush 0 \
  --compression-mode active
3.1.2 Ensure XDCR uses full encryption (Automated)
L2 Auto
Description

This recommendation verifies that XDCR uses full encryption on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check XDCR configuration:
curl -s -u admin:$CB_PASS http://localhost:8091/pools/default/remoteClusters | jq .

# Check XDCR security:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/replications | jq .
Remediation
# Configure XDCR with full encryption:
couchbase-cli xdcr-setup -c localhost:8091 -u admin -p $CB_PASS \
  --create --xdcr-cluster-name remote-dc \
  --xdcr-hostname remote.example.com:8091 \
  --xdcr-username repl_user \
  --xdcr-password '$REPL_PASS' \
  --xdcr-demand-encryption 1 \
  --xdcr-encryption-type full \
  --xdcr-certificate /etc/couchbase/remote-ca.pem

4 — Audit & Logging

▶

4.1 Audit Configuration

▶
4.1.1 Ensure audit logging is enabled with rotation (Automated)
L1 Auto
Description

This recommendation verifies that audit logging is enabled with rotation on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check audit configuration:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/audit | jq .
Remediation
# Enable comprehensive auditing:
curl -s -X POST -u admin:$CB_PASS \
  http://localhost:8091/settings/audit \
  -d 'auditdEnabled=true' \
  -d 'rotateInterval=86400' \
  -d 'rotateSize=20971520' \
  -d 'logPath=/opt/couchbase/var/lib/couchbase/logs'
4.1.2 Ensure log redaction is configured for sensitive data (Automated)
L1 Auto
Description

This recommendation verifies that log redaction is configured for sensitive data on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check log redaction setting:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/logRedaction | jq .
Remediation
# Enable log redaction for sensitive data:
curl -s -X POST -u admin:$CB_PASS \
  http://localhost:8091/settings/logRedaction \
  -d 'logRedactionLevel=partial'

# Collect support bundle with redaction:
couchbase-cli collect-logs-start -c localhost:8091 -u admin -p $CB_PASS \
  --redaction-level partial

5 — Cluster Resilience

▶

5.1 Failover & Backups

▶
5.1.1 Ensure auto-failover is configured (Automated)
L1 Auto
Description

This recommendation verifies that auto-failover is configured on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check auto-failover settings:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/autoFailover | jq .
Remediation
# Configure auto-failover:
couchbase-cli setting-autofailover -c localhost:8091 -u admin -p $CB_PASS \
  --enable-auto-failover 1 \
  --auto-failover-timeout 120 \
  --max-failovers 2 \
  --enable-failover-of-server-groups 0
5.1.2 Ensure automated backups are configured with cbbackupmgr (Automated)
L1 Auto
Description

This recommendation verifies that automated backups are configured with cbbackupmgr on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check backup configuration:
cbbackupmgr config --archive /opt/couchbase/backups --list-repos

# Check backup schedule:
cbbackupmgr config --archive /opt/couchbase/backups --repo myrepo --list-plans
Remediation
# Configure automated backups:
cbbackupmgr config --archive /opt/couchbase/backups --repo myrepo

cbbackupmgr config --archive /opt/couchbase/backups --repo myrepo \
  --backup-plan 'full_weekly' \
  --schedule '0 2 * * 0' \
  --type FULL

cbbackupmgr config --archive /opt/couchbase/backups --repo myrepo \
  --backup-plan 'incr_daily' \
  --schedule '0 2 * * 1-6' \
  --type INCR

6 — Query & Search Security

▶

6.1 Service Hardening

▶
6.1.1 Ensure N1QL query service has resource limits (Automated)
L1 Auto
Description

This recommendation verifies that N1QL query service has resource limits on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check query service settings:
curl -s -u admin:$CB_PASS http://localhost:8093/admin/settings | jq .
Remediation
# Configure N1QL query security:
curl -s -X POST -u admin:$CB_PASS \
  http://localhost:8093/admin/settings \
  -d '{"completed-limit": 4000, "completed-threshold": 1000, "log-level": "info", "pipeline-cap": 512, "scan-cap": 512, "timeout": "5m"}'
6.1.2 Ensure Full-Text Search access is restricted via RBAC (Automated)
L1 Auto
Description

This setting ensures that Full-Text Search access is restricted via RBAC on the Couchbase 7 NoSQL database. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted access to this capability could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the Couchbase 7 NoSQL database is essential for defense in depth.

Audit
# Check FTS (Full-Text Search) settings:
curl -s -u admin:$CB_PASS http://localhost:8094/api/manager | jq .
Remediation
# Secure FTS service with TLS:
couchbase-cli setting-security -c localhost:8091 -u admin -p $CB_PASS \
  --set --cluster-encryption-level all

# Restrict FTS to specific buckets via RBAC:
couchbase-cli user-manage -c localhost:8091 -u admin -p $CB_PASS \
  --set --rbac-username fts_user \
  --rbac-password '$FTS_PASS' \
  --roles fts_searcher[mybucket] \
  --auth-domain local

7 — Resource Management

▶

7.1 Compaction & Quotas

▶
7.1.1 Ensure auto-compaction thresholds are configured (Automated)
L1 Auto
Description

This recommendation verifies that auto-compaction thresholds are configured on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check disk I/O and compaction settings:
curl -s -u admin:$CB_PASS http://localhost:8091/settings/autoCompaction | jq .
Remediation
# Configure auto-compaction:
curl -s -X POST -u admin:$CB_PASS \
  http://localhost:8091/controller/setAutoCompaction \
  -d 'databaseFragmentationThreshold[percentage]=30' \
  -d 'viewFragmentationThreshold[percentage]=30' \
  -d 'parallelDBAndViewCompaction=false'
7.1.2 Ensure per-service memory quotas are set (Automated)
L1 Auto
Description

This recommendation verifies that per-service memory quotas are set on the Couchbase 7 NoSQL database. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Couchbase 7 NoSQL database vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check node resource allocation:
curl -s -u admin:$CB_PASS http://localhost:8091/pools/default | \
  jq '{storageTotals, ramQuota: .nodes[0].memoryQuota}'
Remediation
# Set per-service memory quotas:
couchbase-cli setting-cluster -c localhost:8091 -u admin -p $CB_PASS \
  --cluster-ramsize 8192 \
  --cluster-index-ramsize 2048 \
  --cluster-fts-ramsize 1024 \
  --cluster-eventing-ramsize 512