はじめに
本ドキュメントでは、CVIM Rest APIのTLS証明書の再構成の方法についてご紹介します。この方法を利用することで証明書の更新などの管理を行うことができます。
前提条件
本ドキュメントで紹介する内容は CVIM 4.2.1, 4.2.2 に基づいています。その他のバージョンでは内容が異なる場合があります。
内容
1. 事前準備
CVMのManagementノードにログインして作業を行います。
作業を実施する前に現在のファイルのバックアップを別の任意のディレクトリに作成します。
# ls -lZ {/var/www/mercury/*,~/openstack-configs/*mercury*}
2. 関連ファイルのコピー
新しい(あるいは別に用意した)鍵、証明書、ルート証明書のファイルを /root/openstack-configs フォルダにコピーします。
# cp <new-ca-root-cert> ~/openstack-configs/mercury-ca.crt
# cp <new-key-file> ~/openstack-configs/mercury.key
# cp <new-cert-file> ~/openstack-configs/mercury.crt
3. 再構成
以下のコマンドで再構成します。
# cd ~/installer/tools
# ./restapi.py -a reconfigure-tls
実行例:
# cd ~/installer/tools
# ./restapi.py -a reconfigure-tls
Trust Chain Verification Success
TLS certificate and private key pair verified
[WARNING] REST API Server is running already.
Do you want to continue the reconfigure-tls? [yY/nN]: y
Reconfiguring TLS for REST API server in quiet mode. This will take some time.
###################################################
192.168.0.100 will be used as FQDN for REST API TLSConfiguration
Info: '--fqdn' Option can be used to change it.
####################################################
REST API Reconfiguring TLS Finished Successfully.
------- REST API script execution completed -------
#
4. httpdの再起動
systemctl コマンドで httpd を再起動します。
# systemctl restart httpd
5. 確認
実施した作業が証明書の更新であった場合は以下のコマンドで有効期限を確認します。
# openssl x509 -noout -dates -in /var/www/mercury/mercury-ca.crt
関連情報
https://community.cisco.com/t5/-/-/ta-p/4820017
[CVIM] 証明書の有効期限の確認方法について