Managing CIS for optimal security

The IBM Cloud® Internet Services (CIS) security settings include safe defaults that are designed to avoid false positives and negative influence on your traffic. However, these safe default settings do not provide the best security posture for every customer. Follow these steps to make sure that your CIS account is configured in a safe and secure way.

Best practice 1: Secure your origin IP addresses

When a subdomain uses CIS for proxying, all traffic is protected because CIS returns IP addresses that are associated with its proxy network. This ensures that connections are routed through CIS proxies first, which hides the origin IP addresses.

Use CIS proxies for all DNS records for HTTP traffic from your origin

To improve the security of your origin IP address, you must proxy all HTTP and HTTPS traffic.

See the difference by querying a non-proxied and a proxied record:

dig nonproxied.theburritobot.com +short
1.2.3.4 (The origin IP address)

$ dig proxied.theburritobot.com +short
104.16.22.6 , 104.16.23.6 (CIS IP addresses)

Obscure non-proxied origin records with non-standard names

Any records that can't be proxied through CIS, and that still use your origin IP, such as FTP, can be secured by creating additional obfuscation.

If you require a record for your origin that can't be proxied by CIS, use a non-standard name. For example, instead of ftp.example.com use [random word or-random characters].example.com. This obfuscation makes dictionary scans of your DNS records less likely to expose your origin IP addresses.

Use separate IP ranges for HTTP and non-HTTP traffic if possible

Some customers use separate IP ranges for HTTP and non-HTTP traffic. This approach helps them proxy all records for their HTTP IP range, and hide all non-HTTP traffic with a different IP subnet.

Best practice 2: Activate your Web Application Firewall safely

Your WAF is available in the Security section. These steps walk through the settings in reverse order to ensure that your WAF is configured as safely as possible before you enable it for your entire domain.

These initial settings can reduce false positives by populating Security Events for further tuning. Your WAF is updated automatically to handle new vulnerabilities as they are identified. For more information, see Using Security events capability.

The following are some examples of the types of attacks that WAF can protect against:

  • SQL injection attack
  • Cross-site scripting
  • Cross-site forgery

CIS provides several preconfigured rulesets within WAF for Layer 7 protection. Each ruleset includes protections to mitigate the most common web application attacks. You can enable or disable these rulesets and override individual rules to meet your security requirements. For optimal protection, enable the CIS Managed Ruleset at the highest priority. You can use the OWASP ruleset for additional coverage, but place it after the CIS Managed Ruleset in your rule execution order.

The OWASP ruleset is prone to false positives and offers only marginal benefits when placed before the CIS Managed Ruleset and WAF attack score. If you enable the OWASP ruleset, monitor traffic and adjust rule settings as needed to prevent false positives. For more information, see WAF actions for details about the ruleset and the behavior of each rule.

For more information, see Web Application Firewall (WAF) concepts.

Best practice 3: Configure WAF Attack Score safely

WAF Attack Score strengthens your security posture by detecting variations of known attacks by using machine learning. It complements WAF managed rules by identifying malicious requests that do not match existing rule signatures.

To configure WAF Attack Score safely, begin with monitoring traffic before you enforce blocking actions. This approach allows you to review scored traffic in Security Events and adjust thresholds to minimize false positives.

For more information, see using WAF Attack Score to cofigure WAF Attack Score in a custom rule.

CIS recommends using WAF managed rules along with WAF Attack Score. Managed rules protect against known attack patterns, while WAF Attack Score detects modified or obfuscated attacks, providing layered and adaptive protection for your domain. For more information, see About WAF Attack Score.

Best practice 4: Configure your TLS settings

Protect your site and control your Transport Layer Security (TLS) settings. Manage the certificates used to secure traffic to your site. IBM CIS functions as a reverse proxy and provides multiple options for encrypting your traffic. As a reverse proxy, TLS connections terminate at CIS data centers, and a new TLS connection is opened to your origin server.

TLS offers six modes of operations that are listed from most secure to least secure:

  1. Authenticated origin pull: (Enterprise only)
  2. HTTPS only origin pull (Enterprise only)
  3. End-to-end CA signed (default and recommended)
  4. End-to-end flexible (edge-to-origin certificates can be self-signed)
  5. Client-to-edge (edge-to-origin not encrypted, self-signed certificates are not supported)
  6. Off (not recommended)

See TLS options for details on the different modes.

With IBM CIS, you can use custom certificates or a wildcard certificate that is provisioned for you by CIS.

Upload custom certificates

You can upload your custom certificate by clicking Add Certificate and entering your certificate, private key, and bundle method. After you upload a custom certificate, you gain immediate compatibility with encrypted traffic and maintain control over your certificate (for example, an Extended Validation (EV) certificate).

CIS does not support certificate pinning with ordered or Universal certificates. If you want to use certificate pinning, upload and maintain your own custom certificate.

You are responsible for managing your certificate if you upload a custom certificate. For example, CIS doesn't track the certificate expiration date.

Order dedicated certificates

CIS simplifies certificate management by offering dedicated certificates. You no longer need to generate private keys, create certificate signing requests (CSR), or remember to renew certificates. You can order a dedicated certificate by clicking Add Certificate and ordering a wildcard certificate or entering hostnames to order a dedicated custom certificate. Available certificate types include:

  • SHA-2/ECDSA signed certificate that uses a P-256 key,
  • SHA-2/RSA signed certificate that uses an RSA 2048-bit key, and
  • SHA-1/RSA signed certificate that uses an RSA 2048-bit key.

CIS can issue certificates for all top-level domains (TLDs) except the following:

  • .cu (Cuba)
  • .iq (Iraq)
  • .ir (Iran)
  • .kp (North Korea)
  • .sd (Sudan)
  • .ss (South Sudan)
  • .ye (Yemen)

CIS manages the certificate expiration date for dedicated certificates.

To edit the hostnames on a dedicated custom certificate, you must reorder the certificate and then delete the original one. For example, suppose that you order a dedicated custom certificate with the hostname alpha.yourdomain.com. To add the hostname beta.yourdomain.com to your dedicated custom certificate, order another dedicated custom certificate with the hostnames alpha.yourdomain.com and beta.yourdomain.com. Afterward, you must delete the original dedicated custom certificate.

The first time that you order a dedicated certificate, the Domain Control Validation (DCV) process runs and generates a corresponding TXT record. If you delete the TXT record, the DCV process runs again when you order another dedicated certificate. If you delete a dedicated certificate, the TXT record corresponding to the DCV process is not deleted.

The following are common errors that might occur when you order dedicated certificates:

  • Error connecting to certificate service.
  • Error while requesting from certificate service.

If you receive an error when you order certificates, refresh the page and try again.

Use a provisioned certificate

IBM has partnered with several certificate authorities (CAs) to provide wildcard certificates for customer domains. Manual verification might be required during he setup process. Your support team can help you complete these additional steps.

Certificate priority at our edge

Certificates are served at the edge in the following priority order:

  1. Uploaded custom
  2. Dedicated custom
  3. Dedicated wildcard
  4. Universal

Minimum TLS version

Higher TLS versions provide stronger security but might prevent some customers from connecting to your site. For more information, see Minimum TLS version.

Best practice 5: Configure rate limiting

Use rate-limiting rules to protect your site or API from malicious traffic by blocking client IP addresses that match a URL pattern or exceed a defined threshold.

Common use cases for rate limiting include:

  • Enforcing granular access control to resources. This process includes access control based on criteria, such as user agent, IP address, referrer, host, country, and world region.
    • Limit by user agent: A common use case is to limit the rate of requests performed by individual user agents.
    • Allow specific IP addresses or ASNs: Another use case when you control access to resources is to exclude or include IP addresses or Autonomous System Numbers (ASNs) from a rate-limiting rule.
    • Limit by referrer: Some applications receive requests that are originated by other sources (for example, used by advertisements that link to third-party pages). You can limit the number of requests that are generated by individual referrer pages to manage quotas or avoid indirect DDoS attacks.
    • Limit by destination host: Create a rate-limiting rule that uses the host as a counting characteristic.
  • Protecting against credential stuffing and account takeover attacks.
  • Limiting the number of operations performed by individual clients. This action includes preventing scraping by bots, accessing sensitive data, bulk creation of new accounts, and programmatic buying in e-commerce platforms.
    • Prevent content scraping (through query string)
    • Prevent content scraping (through body)
    • Limit requests from bots
  • Protecting REST APIs from resource exhaustion (targeted DDoS attacks) and resources from abuse in general.
    • Prevent volumetric attacks
    • Protect resources
  • Protecting GraphQL APIs by preventing server overload and limiting the number of operations.
    • Limit the number of operations
    • Prevent server overload