SSL証明書のインポート

このセクションでは、新しいSUSE Multi-Linux ManagerのインストールにSSL証明書を設定する方法、および既存の証明書を置き換える方法について説明します。

開始する前に、以下があることを確認します。

  • 認証局(CA) SSLパブリック証明書。 CAチェーンを使用している場合は、すべての中間CAも利用できる必要があります。

  • SSLサーバ秘密鍵

  • SSLサーバ証明書

  • SSLデータベース機密鍵

  • SSLデータベース証明書

All files must be in PEM format. All CA certificates in the chain must mark X509v3 Basic Constraints as critical and include CA:TRUE. For more information, see Verify CA Basic Constraints.

The hostname of the SSL server certificate must match the fully qualified hostname of the machine you deploy them on. You can set the hostnames in the X509v3 Subject Alternative Name section of the certificate. You can also list multiple hostnames if your environment requires it. Supported Key types are RSA and EC (Elliptic Curve).

In previous versions the database SSL certificates required reportdb and db as Subject Alternative Name. This is no longer needed.

Third-party authorities commonly use intermediate CAs to sign requested server certificates. In this case, all CAs in the chain are required to be available. The mgradm commands are taking care of ordering the certificates. Ideally, the root CA should be in its own file. The server certificate file should contain the server certificate first, followed by all intermediate CA certificates in order.

1. Verify CA Basic Constraints

Strict certificate validators reject CA certificates when the X509v3 Basic Constraints extension is not marked as critical. This includes Python 3.13 and later, which is used by SUSE Linux Enterprise Server 16 and openSUSE Leap 16.

Before importing certificates or upgrading an existing installation, verify every root and intermediate CA certificate used by SUSE Multi-Linux Manager. For each CA certificate, run:

openssl x509 -in root-ca.pem -noout -text | grep -A1 "Basic Constraints"

The output must include critical and CA:TRUE:

X509v3 Basic Constraints: critical
  CA:TRUE

If a CA certificate does not include both values, replace or regenerate the affected CA certificate before using it with SUSE Multi-Linux Manager. Replacing only the server certificate does not fix a CA certificate that misses the critical flag. For self-signed certificates generated by SUSE Multi-Linux Manager, see administration:ssl-certs-selfsigned.adoc#ssl-certs-selfsigned-create-replace. To replace a CA that is still trusted by the clients without interrupting their connection, see Migrate SSL Certificate Authorities.

2. 新しいインストール用証明書のインポート

デフォルトで、SUSE Multi-Linux Managerは自己署名証明書を使用します。 インストール時にサードパーティ証明書をインポートすることもできます。

プロシージャ: 新しいSUSE Multi-Linux Managerサーバへの証明書のインポート
  1. Deploy the SUSE Multi-Linux Manager Server according to the instructions in SUSE Multi-Linux Managerサーバのインストール. Make sure to pass the correct files as parameters to mgradm install. The parameters are:

    サードパーティSSL証明書フラグ:
          --ssl-ca-intermediate文字列   中間CA証明書のパス
          --ssl-ca-root文字列            ルートCA証明書のパス
          --ssl-server-cert文字列        サーバ証明書のパス
          --ssl-server-key文字列         サーバキーのパス
          --ssl-db-ca-intermediate文字列 データベースの中間CA証明書のパス(サーバの証明書と異なる場合)
          --ssl-db-ca-root文字列          データベースのルートCA証明書のパス(サーバの証明書と異なる場合)
          --ssl-db-cert string             データベース証明書のパス
          --ssl-db-key string              データベースキーのパス

中間CAは、--ssl-ca-rootで指定されたファイルで使用することも、--ssl-ca-intermediateで追加オプションとして指定することもできます。 --ssl-ca-intermediateオプションは複数回指定できます。

3. 新しいプロキシインストール用の証明書のインポート

プロキシ証明書は生成された設定に埋め込まれます。 サードパーティ証明書を使用するには、設定中に提供される必要があります。

プロシージャ: 新しいSUSE Multi-Linux Managerプロキシへの証明書のインポート
  1. SUSE Multi-Linux Managerプロキシのインストールの手順に従って、SUSE Multi-Linux Managerプロキシをインストールします。

  2. プロンプトに従ってセットアップを完了します。

    サーバとプロキシのすべての証明書に署名するには、同じ認証局(CA)を使用します。 異なるCAで署名された証明書は一致しません。

4. 証明書を置き換える

SUSE Multi-Linux Managerインストール環境にあるアクティブな証明書を新しい証明書に置き換えることができます。 考慮すべきケースは2つあります。サーバまたはデータベース証明書のみを置き換える場合と、ルートCAを置き換える場合です。

ルート証明書を置き換えるには、すべての登録済みプロキシとシステムで、サーバレベルで切り替える前にデータベースに新しいCAを登録しておく必要があるため、中断を回避するためのより多くの時間と計画が必要となります。

中間CAで署名されたサードパーティ証明書を使用する場合は、中間CA証明書をサーバまたはデータベースの証明書ファイルに追加する必要があります。

順番が重要です: 最初にサーバ証明書、次に証明書に署名したCAから、ルートCAによって署名されたCAまでを順番に配置します。 ルートCA証明書はサーバ証明書ファイルに追加しないでください。

プロシージャ: 既存の証明書をすべて置き換える
  1. The following considers that you have root-ca.pem, intermediate-ca1.pem, intermediate-ca2.pem, server.pem and server.key files. It may be different depending on the number of intermediate CAs in the server certificate signature chain.

  2. Combine the intermediate CAs and server certificates. The order matters, the server must be first and the intermediate CAs in order. Do not add the root CA last into the chain as it will be passed separately to uyuni-ca and uyuni-db-ca secrets. If there is no intermediate CA, then you can use the server.pem instead of the combined file in the next steps.

    cat server.pem intermediate-ca1.pem intermediate-ca2.pem >combined-server.pem
  3. On the SUSE Multi-Linux Manager container host, at the command prompt, rotate the certificates using mgradm ssl rotate:

    mgradm ssl rotate \
       --ssl-ca-root $path_to_ca_certificate \
       --ssl-server-cert $path_to_combined_server_certificate \
       --ssl-server-key $path_to_server_key

5. Replace certificates on a Proxy

If you are using a SUSE Multi-Linux Manager Proxy, you must regenerate and redeploy the Proxy’s configuration after replacing the certificates on the SUSE Multi-Linux Manager Server. This ensures the Proxy trusts the Server’s new CA and uses its own updated server certificate.

Generating the Proxy configuration using the Web UI is not supported for replacing certificates. You must use spacecmd from the command line.

Procedure: Replacing certificates on a SUSE Multi-Linux Manager Proxy
  1. On your SUSE Multi-Linux Manager Server container host, copy the Root CA certificate (ca.crt), the Proxy certificate (proxy.crt), and the Proxy private key (proxy.key) into the server container:

    for f in ca.crt proxy.crt proxy.key; do
      mgrctl cp $f server:/tmp/$f
    done
  2. If your environment uses one or more intermediate CAs, also copy them into the container:

    mgrctl cp intermediateCA.pem server:/tmp/intermediateCA.pem
  3. Execute spacecmd proxy_container_config inside the server container to generate the new configuration archive, replacing the FQDNs and admin email:

    mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'

    If you copied an intermediate CA in the previous step, append the -i parameter:

    mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 -i /tmp/intermediateCA.pem pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'
  4. Copy the generated configuration archive from the server container to the Server host:

    mgrctl cp server:/tmp/config.tar.gz .
  5. Transfer the config.tar.gz archive to the Proxy host:

    scp config.tar.gz root@pxy.example.com:/root/
  6. On the Proxy host, stop the Proxy:

    mgrpxy stop
  7. Install the new configuration on the Proxy host:

    mgrpxy install config.tar.gz
  8. Start the Proxy:

    mgrpxy start

ルートCAが変更された場合は、SUSE Multi-Linux Managerに接続されているすべてのクライアントに配備する必要があります。 中断を最小限に抑えるため、事前に実行しておくことをお勧めします。

プロシージャ: クライアント上のルートCAの配備
  1. SUSE Multi-Linux Manager Web UIで、システム  概要に移動します。

  2. すべてのクライアントをチェックして、システムセットマネージャに追加します。

  3. システム  システムセットマネージャ  概要に移動します。

  4. In the States field, click Apply to apply the system states.

  5. In the Highstate page, click Apply Highstate to propagate the changes to the clients.