7.3. サーバー側の暗号化の設定
SSL 経由で暗号化された要求を送信できない場合に、HTTP を使用して Ceph Object Gateway に要求を送信するようにサーバー側の暗号化を設定できます。
以下の手順では、HAProxy をプロキシーおよびロードバランサーとして使用します。
前提条件
- ストレージクラスター内のすべてのノードへの root レベルのアクセス。
- 稼働中の Red Hat Ceph Storage クラスターがある。
- Ceph Object Gateway ソフトウェアのインストール。
- HAProxy ソフトウェアのインストール。
手順
haproxy.cfgファイルを編集します。例
frontend http_web *: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 checkhttpフロントエンドへのアクセスを許可する行をコメントアウトし、代わりにhttpsフロントエンドを使用するように HAProxy に指示する手順を追加します。例
# frontend http_web *: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 checkrgw_trust_forwarded_httpsオプションをtrueに設定します。例
[ceph: root@host01 /]# ceph config set client.rgw rgw_trust_forwarded_https trueHAProxy を有効にして起動します。
[root@host01 ~]# systemctl enable haproxy [root@host01 ~]# systemctl start haproxy