6.4. サーバー側の暗号化の設定

SSL 経由で暗号化された要求を送信できない場合に、HTTP を使用して Ceph Object Gateway に要求を送信するようにサーバー側の暗号化を設定できます。

以下の手順では、HAProxy をプロキシーおよびロードバランサーとして使用します。

前提条件

  • ストレージクラスター内のすべてのノードへの root レベルのアクセス。
  • 稼働中の Red Hat Ceph Storage クラスター
  • Ceph Object Gateway ソフトウェアのインストール。
  • HAProxy ソフトウェアのインストール。

手順

  1. 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 check

  2. http フロントエンドへのアクセスを許可する行をコメントアウトし、代わりに 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 check

  3. rgw_trust_forwarded_https オプションを true に設定します。

    [ceph: root@host01 /]# ceph config set client.rgw rgw_trust_forwarded_https true

  4. HAProxy を有効にして起動します。

    [root@host01 ~]# systemctl enable haproxy
    [root@host01 ~]# systemctl start haproxy

関連情報