SV-214288r612241_rule
V-214288
SRG-APP-000223-WSR-000011
AS24-U2-000470
CAT II
10
Determine the location of the "HTTPD_ROOT" directory and the "httpd.conf" file:
# httpd -V | egrep -i 'httpd_root|server_config_file'
-D HTTPD_ROOT="/etc/httpd"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Add or configure the following line:
"Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;secure"
Add the "secure" attribute to the JavaScript set cookie in any application code:
function setCookie() { document.cookie = "ALEPH_SESSION_ID = $SESS; path = /; secure"; }
HttpOnly cannot be used since by definition this is a cookie set by JavaScript.
Restart www_server and Apache.
Determine the location of the "HTTPD_ROOT" directory and the "httpd.conf" file:
# httpd -V | egrep -i 'httpd_root|server_config_file'
-D HTTPD_ROOT="/etc/httpd"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Search for the "Header" directive:
# cat /<path_to_file>/httpd.conf | grep -i "Header"
If "HttpOnly" "secure" is not configured, this is a finding.
"Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;secure"
Review the code. If, when creating cookies, the following is not occurring, this is a finding:
function setCookie() { document.cookie = "ALEPH_SESSION_ID = $SESS; path = /; secure"; }
V-214288
False
AS24-U2-000470
Determine the location of the "HTTPD_ROOT" directory and the "httpd.conf" file:
# httpd -V | egrep -i 'httpd_root|server_config_file'
-D HTTPD_ROOT="/etc/httpd"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Search for the "Header" directive:
# cat /<path_to_file>/httpd.conf | grep -i "Header"
If "HttpOnly" "secure" is not configured, this is a finding.
"Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;secure"
Review the code. If, when creating cookies, the following is not occurring, this is a finding:
function setCookie() { document.cookie = "ALEPH_SESSION_ID = $SESS; path = /; secure"; }
M
3997