SV-278406r1171970_rule
V-278406
SRG-APP-000605
NGNX-APP-002620
CAT II
10
Edit the NGINX configuration file.
Set "ssl_verify_client on", "ssl_ocsp on", ssl_stapling_verify on", and "ssl_stapling on" as shown in the example below.
Create a local cache for OCSP responses:
touch /etc/nginx/ssl/ocsp_cache.pem
chmod 600 /etc/nginx/ssl/ocsp_cache.pem
Set the "ssl_stapling_file" directive with the file created as shown in the example below.
http {
server {
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_client_certificate /etc/nginx/ssl/ca.crt;
ssl_verify_client on;
ssl_crl /etc/nginx/ssl/crl.pem;
ssl_ocsp on;
ssl_ocsp_responder https://ocsp.disa.mil;
ssl_stapling on;
ssl_stapling_verify on;
ssl_stapling_file /etc/nginx/ssl/ocsp_cache.pem;
ssl_stapling_responder_timeout 3s; # Timeout for OCSP responder queries
ssl_stapling_responder_error_cache_time 300s; # Cache time for responder errors
location / {
proxy_pass http://backend;
}
}
}
If using CRL for certificate revocation, this requirement is Not Applicable.
Determine the path to NGINX config file(s):
# nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
# cat <path to config>
Check the http { blocks for the following example:
http {
server {
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_client_certificate /etc/nginx/ssl/ca.crt;
ssl_verify_client on;
ssl_crl /etc/nginx/ssl/crl.pem;
ssl_ocsp on;
ssl_ocsp_responder http://ocsp.disa.mil;
ssl_stapling on;
ssl_stapling_verify on;
ssl_stapling_file /etc/nginx/ssl/ocsp_cache.pem;
ssl_stapling_responder_timeout 3s; # Timeout for OCSP responder queries
ssl_stapling_responder_error_cache_time 300s; # Cache time for responder errors
location / {
proxy_pass http://backend;
}
}
}
Check for certificate path validation. If "ssl_verify_client on" is not in the configuration, this is a finding.
Check if OCSP is enabled. If "ssl_ocsp on" is not in the configuration, this is a finding.
Check if OCSP Stapling is configured. If "ssl_stapling on" or "ssl_stapling_verify on" is not in the configuration, this is a finding.
If "ssl_stapling_file <file>" is not present in the configuration, this is a finding.
V-278406
False
NGNX-APP-002620
If using CRL for certificate revocation, this requirement is Not Applicable.
Determine the path to NGINX config file(s):
# nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
# cat <path to config>
Check the http { blocks for the following example:
http {
server {
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_client_certificate /etc/nginx/ssl/ca.crt;
ssl_verify_client on;
ssl_crl /etc/nginx/ssl/crl.pem;
ssl_ocsp on;
ssl_ocsp_responder http://ocsp.disa.mil;
ssl_stapling on;
ssl_stapling_verify on;
ssl_stapling_file /etc/nginx/ssl/ocsp_cache.pem;
ssl_stapling_responder_timeout 3s; # Timeout for OCSP responder queries
ssl_stapling_responder_error_cache_time 300s; # Cache time for responder errors
location / {
proxy_pass http://backend;
}
}
}
Check for certificate path validation. If "ssl_verify_client on" is not in the configuration, this is a finding.
Check if OCSP is enabled. If "ssl_ocsp on" is not in the configuration, this is a finding.
Check if OCSP Stapling is configured. If "ssl_stapling on" or "ssl_stapling_verify on" is not in the configuration, this is a finding.
If "ssl_stapling_file <file>" is not present in the configuration, this is a finding.
M
5720