SSL証明書のインポート

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

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

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

  • SSLサーバ秘密鍵

  • SSLサーバ証明書

  • SSLデータベース機密鍵

  • SSLデータベース証明書

すべてのファイルがPEM形式である必要があります。

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 mgrdadm 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. 新しいインストール用証明書のインポート

デフォルトで、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 podman. 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オプションは複数回指定できます。

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

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

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

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

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

3. 証明書を置き換える

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. SUSE Multi-Linux Managerコンテナホストのコマンドプロンプトで、以下のファイルパスを渡してpodman証明書シークレットを再作成します。

    podman secret create --replace uyuni-ca $path_to_ca_certificate
    podman secret create --replace uyuni-cert $path_to_combined_server_certificate
    podman secret create --replace uyuni-key $path_to_server_key
    
    podman secret create --replace uyuni-db-ca $path_to_database_ca_certificate
    podman secret create --replace uyuni-db-cert $path_to_combined_database_certificate
    podman secret create --replace uyuni-db-key $path_to_database_key
プロシージャ: サーバの再起動
  1. コンテナホストで、サーバを再起動して変更を取得します。

    mgradm restart

プロキシを使用している場合は、各プロキシのホスト名とcnameを使用して、各プロキシ用のサーバ証明書RPMを生成する必要があります。 新しい設定tarballを生成して配備します。

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

CA証明書が更新された場合、Kiwi証明書を含むRPMファイルを再パッケージ化する必要があります。

SUSE Multi-Linux Managerサーバのコンテナホストで、次のコマンドを実行します。

mgrctl exec mgr-package-rpm-certificate-osimage

その後、イメージビルドホストにhighstateを適用し、kiwiが使用する新しい証明書を配備します。

プロシージャ: クライアント上のルート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.