4.1.7 Ensure Online Certificate Status Protocol (OCSP) stapling is enabled

Information

OCSP stapling allows a server to efficiently deliver certificate revocation information to the client, improving performance and privacy. The server caches the OCSP response from the Certificate Authority (CA), eliminating the need for the client to make a separate connection. For robust security, certificates should be issued with the OCSP Must-Staple extension, which transforms the traditional \"soft-fail\" behavior into a \"hard-fail,\" ensuring clients always receive and validate a current revocation status.

OCSP stapling is a critical mechanism for distributing certificate revocation status. Without it, clients might not be aware that a server's certificate has been compromised, allowing for potential man-in-the-middle attacks. The OCSP Must-Staple extension is essential as it mitigates the inherent weakness of optional OCSP (\"soft-fail\"), where a browser might proceed with a connection if it doesn't receive a staple. By enforcing a \"hard-fail\", Must-Staple ensures that a compromised certificate can be reliably blocked.

Solution

Follow this procedure to enable a robust OCSP stapling configuration:

- When issuing a certificate, request that the OCSP Must-Staple extension be included.
- Edit your NGINX configuration to include all four necessary directives. The ssl_trusted_certificate must point to a file containing your root and intermediate certificates. The resolver must be set to one or more trusted DNS resolvers.

# Example for a server block
server {
# ... other directives ...

# OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;

# Path to the certificate chain (Root CA + Intermediates) for verification
ssl_trusted_certificate /etc/nginx/ssl/full_chain.pem;

# DNS resolver for NGINX to query the CA's OCSP server
resolver 8.8.8.8 1.1.1.1 valid=300s;
}

Impact:

If OCSP Must-Staple is used, a misconfiguration on the server (e.g., a firewall blocking outbound OCSP queries, an incorrect DNS resolver) will cause clients to reject the certificate and refuse to connect, leading to a service outage. This \"hard-fail\" behavior is intentional for security but requires diligent configuration and monitoring of the OCSP stapling mechanism.

See Also

https://workbench.cisecurity.org/benchmarks/18528

Item Details

Category: ACCESS CONTROL, IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-17(2), 800-53|IA-5, 800-53|IA-5(1), 800-53|SC-8, 800-53|SC-8(1), CSCv7|14.4

Plugin: Unix

Control ID: cc0a063b677a64573857cc5461d14327f44aba52043ad24505b5b17e1ecc7e9d