HTTP 严格传输安全性
HTTP Strict Transport Security https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Securityis a policy mechanism that helps to protect websites against man-in-the-middle attacks such as protocol downgrade attacks and cookie hijacking.
SUSE Manager 允许启用 HSTS。要为 SUSE Manager Server 启用 HSTS,请执行以下操作:
-
在
/etc/apache2/conf.d/<filename>.conf
中创建新配置文件,例如/etc/apache2/conf.d/zz-spacewalk-www-custom.conf
。 -
添加以下一行:
# Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
-
使用
systemctl restart apache2
重启动 Apache
要为 SUSE Manager Proxy 启用 HSTS,请执行以下操作:
-
在
/etc/apache2/conf.d/<filename>.conf
中创建新配置文件,例如/etc/apache2/conf.dz/zz-spacewalk-proxy-custom.conf
。 -
添加以下一行:
# Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
-
使用
systemctl restart apache2
重启动 Apache
When naming the new config file |
When HSTS is enabled while using the default SSL certificate generated by SUSE Manager or a self-signed certificate, browsers will refuse to connect with HTTPS unless the CA used to sign such certificates is trusted by the browser. If you are using the SSL certificate generated by SUSE Manager, you can trust it by importing the file located at http://<SERVER-HOSTNAME>/pub/RHN-ORG-TRUSTED-SSL-CERT to the browsers of all users. |