[pgpool-general-jp: 1016] Re: pgpool-IIのクライアント認証で、応答が返ってこない
Tatsuo Ishii
ishii @ sraoss.co.jp
2011年 11月 19日 (土) 19:07:13 JST
> 毎々、お世話になっております。
> 山下です。
>
> 以下の構成で、クライアント認証を実施した場合、応答が返ってこないのですが、何か設定不備がありますでしょうか?
> (192.168.bbb.1/24からの接続時にのみmd5認証を通したいです。)
それはちょっと難しいです。まず、md5認証を行うためには、
pgpool->PostgreSQLがmd5認証になっていなければなりません。
> また、そもそもですが、PostgreSQLから見ると、pgoolからクエリが投げられているという認識で合っていますでしょうか?
> (pool接続しているクライアントのIPがDB側に伝播されないという理解です。)
はい、その認識で合っています。IPがDB側に伝搬されないため、クライアント
IPによってmd5認証を行うかどうかの切り分けはできません。ユーザ名やデータ
ベース名は伝搬されるため、ユーザ名やデータベース名によってmd5認証を行う
/行わないをpg_hba.confに設定してあれば、クライアントのユーザ名やDB名でmd5認証を行う
/行わないを切り分けることはできます。
それはそれとして、以下の現象(無限ループ?)はおかしいので、調べておきます。
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
> ■環境
> ・PostgreSQL 9.0.5
> ・pgpool-II 3.1.0
>
> ■構成
> pgpool-II -------- --------- PostgreSQL(host all all 192.168.0.0/16
> trust) ※テスト用に全てOKとしています
>
> (pool_hba.conf)
> host all all 192.168.aaa.1/24 trust
> host all all 192.168.bbb.1/24 md5
>
> ■関連設定
> ※pool_passwd等は設置済み
>
> pgpool.conf
>
> ==================================================================
>
> # - Authentication -
>
> enable_pool_hba = on
> # Use pool_hba.conf for client authentication
> authentication_timeout = 60
> # Delay in seconds to complete
> client authentication
> # 0 means no timeout.
>
> # - SSL Connections -
>
> ssl = off
>
> ==================================================================
>
> pool_passwdにユーザーを作成し、そのユーザーとパスワードで接続したところ、以下のような状況になります。
> (debug level 1で出力しています)
>
> 2011-11-17T14:42:24+09:00 localhost pgpool[29776]: connection
> received: host=192.168.3.232 port=49024
> 2011-11-17T14:42:24+09:00 localhost pgpool[29776]:
> read_startup_packet: application_name: psql
> 2011-11-17T14:42:24+09:00 localhost pgpool[29776]: Protocol Major: 3
> Minor: 0 database: isite user: postgres
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: pool_ssl: SSL
> requested but SSL support is not available
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth: auth kind: 0
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth: backend
> key data received
> 2011-11-17T14:42:30+09:00 localhost pgpool[29778]: s_do_auth:
> transaction state: I
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: pool_ssl: SSL
> requested but SSL support is not available
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth: auth kind: 0
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> parameter status data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth: backend
> key data received
> 2011-11-17T14:42:40+09:00 localhost pgpool[29778]: s_do_auth:
> transaction state: I
> 2011-11-17T14:42:50+09:00 localhost pgpool[29778]: pool_ssl: SSL
> requested but SSL support is not available
>
> 以降これが、繰り返されます。
>
> その他、必要な情報等ございましたら、ご教授下さい。
>
> 以上、宜しくお願い致します。
> _______________________________________________
> pgpool-general-jp mailing list
> pgpool-general-jp @ sraoss.jp
> http://www.sraoss.jp/mailman/listinfo/pgpool-general-jp
pgpool-general-jp メーリングリストの案内