2.11. サーバー側の暗号化の設定
ストレージ管理者は、SSL 経由で暗号化された要求を送信できない場合に、HTTP を使用して Ceph Object Gateway に要求を送信するようにサーバー側の暗号化を設定できます。
以下の手順では、HAProxy をプロキシーおよびロードバランサーとして使用します。
前提条件
- ストレージクラスター内のすべてのノードへの root レベルのアクセス。
- 稼働中の Red Hat Ceph Storage クラスターがある。
- Ceph Object Gateway がインストールされている。
- HAProxy がインストールされている。
手順
haproxy.cfg
ファイルを編集します。例
frontend http_web bind *:80 mode http default_backend rgw frontend rgw-https bind *:443 ssl crt /etc/ssl/private/example.com.pem default_backend rgw backend rgw balance roundrobin mode http server rgw1 10.0.0.71:8080 check server rgw2 10.0.0.80:8080 check
http
フロントエンドへのアクセスを許可する行をコメントアウトし、代わりにhttps
フロントエンドを使用するように HAProxy に指示する手順を追加します。例
# frontend http_web # bind *:80 # mode http # default_backend rgw frontend rgw-https bind *:443 ssl crt /etc/ssl/private/example.com.pem http-request set-header X-Forwarded-Proto https if { ssl_fc } http-request set-header X-Forwarded-Proto https # here we set the incoming HTTPS port on the load balancer (eg : 443) http-request set-header X-Forwarded-Port 443 default_backend rgw backend rgw balance roundrobin mode http server rgw1 10.0.0.71:8080 check server rgw2 10.0.0.80:8080 check
クラスターのすべてのノードで、以下のパラメーターを Ceph 設定ファイルの
[global]
セクションに追加します。rgw_trust_forwarded_https=true
HAProxy を有効にして起動します。
[root@haproxy]# systemctl enable haproxy [root@haproxy]# systemctl start haproxy
Ansible の実行時に
rgw_trust_forwarded_https=true
が Ceph 設定ファイルから削除されないようにするには、ceph-ansibleall.yml
ファイルを編集し、ceph_conf_overrides / global
セクションのrgw_trust_forwarded_https
をtrue
に設定します。ceph_conf_overrides: global: rgw_trust_forwarded_https: true
- 変更が完了したら、ceph-ansible Playbook を実行して、すべての Ceph ノードの設定を更新します。