HTTP Strict Transport Security

HTTP Strict Transport Security (HSTS)は、プロトコルダウングレード攻撃やクッキーハイジャックなどの中間者攻撃からWebサイトを保護するのに役立つポリシーメカニズムです。

SUSE Multi-Linux Managerでは、HSTSはデフォルトで有効になっています。 サーバ上で無効にする必要がある場合は、次のプロシージャに従います。

プロシージャ: サーバでHSTSを無効にする
  1. On the server container host, as root, execute the following command to create a new configuration file with setting max-age=0:

    mgrctl exec -- \
      echo 'Header always set Strict-Transport-Security "max-age=0; includeSubDomains"' \
      > /etc/apache2/conf.d/zz-spacewalk-www-hsts.conf
  2. 次のコマンドでApacheを再起動します。

    mgrctl exec -- systemctl restart apache2

プロキシ上で無効にする必要がある場合は、次のプロシージャに従います。

プロシージャ: プロキシでHSTSを無効にする
  1. On the server container host, as root, execute the following command to create a new configuration file with setting max-age=0:

    echo 'Header always set Strict-Transport-Security "max-age=0; includeSubDomains' \
      > /etc/uyuni/custom-httpd.conf
  2. 次のコマンドを実行します。

    mgrpxy install podman --tuning-httpd /etc/uyuni/custom-httpd.conf config.tar.gz

When naming the new config file <filename>.conf, make sure it is loaded at the right time. For example, to override something defined in spacewalk-www.conf the new file needs to be alphabetically after this file. For more information about how Apache loads files, see https://httpd.apache.org/docs.

SUSE Multi-Linux Managerで生成されたデフォルトのSSL証明書または自己署名証明書を使用してHSTSを有効にすると、このような証明書に署名するために使用されたCAがブラウザによって信頼されていない限り、ブラウザはHTTPSでの接続を拒否します。 SUSE Multi-Linux Managerで生成されたSSL証明書を使用している場合は、http://<SERVER-HOSTNAME>/pub/RHN-ORG-TRUSTED-SSL-CERTにあるファイルをすべてのユーザのブラウザにインポートすることでこの証明書を信頼することができます。