1<!-- doc/src/sgml/client-auth.sgml -->
2
3<chapter id="client-authentication">
4 <!--
5 <title>Client Authentication</title>
6 -->
7 <title>クライアント認証</title>
8
9 <indexterm zone="client-authentication">
10  <!--
11  <primary>client authentication</primary>
12  -->
13  <primary>クライアント認証</primary>
14 </indexterm>
15
16 <para>
17  <!--
18  Since <productname>Pgpool-II</productname> is a middleware that works between
19  <productname>PostgreSQL</> servers and a <productname>PostgreSQL</> database client, so when a client application
20  connects to the <productname>Pgpool-II</productname>, <productname>Pgpool-II</productname>
21  inturn connects to the <productname>PostgreSQL</> servers using the same credentials to serve the incomming
22  client connection. Thus, all the access privileges and restrictions defined for the user in <productname>PostgreSQL</>
23  gets automatically applied to all <productname>Pgpool-II</productname> clients, with an exceptions of
24  the authentications on <productname>PostgreSQL</> side that depends on the client's IP addresses or hostnames.
25  Reason being the connections to the <productname>PostgreSQL</> server are made by <productname>Pgpool-II</productname>
26  on behalf of the connecting clients and <productname>PostgreSQL</> server can only see the IP address of the
27  <productname>Pgpool-II</productname> server and not that of the actual client.
28  Therefore, for the client host based authentications <productname>Pgpool-II</productname> has the
29  <literal>pool_hba</literal> mechanism similar to the <literal>pg_hba</literal> mechanism for
30  authenticating the incomming client connections.
31  -->
32  <productname>Pgpool-II</productname>は<productname>PostgreSQL</>サーバと<productname>PostgreSQL</>データベースクライアントの間で動作するミドルウェアであるため、クライアントアプリケーションが<productname>Pgpool-II</productname>に接続したときには、今度は<productname>Pgpool-II</productname>がクライアントが提供したのと同じ認証情報を使って<productname>PostgreSQL</>サーバに接続します。
33  したがって、<productname>PostgreSQL</>のユーザに対し定義された全てのアクセス権限と制約が、自動的に全ての<productname>Pgpool-II</productname>クライアントに適用されます。
34  例外はクライアントのIPアドレスやホスト名に依存する<productname>PostgreSQL</>側での認証です。
35  それは、<productname>PostgreSQL</>サーバへの接続は<productname>Pgpool-II</productname>によって作られ、<productname>PostgreSQL</>サーバは実際のクライアントではなく<productname>Pgpool-II</productname>のIPアドレスしか見ることができないからです。
36  このため、クライアントホストに基づく認証のため、<productname>Pgpool-II</productname>は<literal>pg_hba</literal>と同様にクライアント接続の認証処理を行う<literal>pool_hba</literal>のメカニズムを持っています。
37 </para>
38
39 <sect1 id="auth-pool-hba-conf">
40  <!--
41  <title>The <filename>pool_hba.conf</filename> File</title>
42  -->
43  <title><filename>pool_hba.conf</filename>ファイル</title>
44
45  <indexterm zone="auth-pool-hba-conf">
46   <primary>pool_hba.conf</primary>
47  </indexterm>
48
49  <para>
50   <!--
51   Just like the <filename>pg_hba.conf</filename> file for <productname>PostgreSQL</>,
52   <productname>Pgpool-II</productname> supports a similar client authentication
53   function using a configuration file called <filename>pool_hba.conf</filename>.
54   <productname>Pgpool-II</productname> installation also includes the sample
55   <filename>pool_hba.conf.sample</filename> file in the default configuration directory
56   (<literal>"/usr/local/etc"</literal>).
57   By default, pool_hba authentication is disabled, and setting <varname>enable_pool_hba</varname>
58   to <literal>on</literal> enables it. see the <xref linkend="guc-enable-pool-hba"> configuration parameter.
59   -->
60   <productname>PostgreSQL</>の<filename>pg_hba.conf</filename>と同じように<productname>Pgpool-II</productname>でも<filename>pool_hba.conf</filename>とよばれる設定ファイルを使った同様のクライアント認証機能をサポートしています。
61   <productname>Pgpool-II</productname>をインストールするとデフォルトインストール先の設定ファイルディレクトリ(<literal>"/usr/local/etc"</literal>)にサンプルの<filename>pool_hba.conf.sample</filename>が含まれています。
62   デフォルトではpool_hbaによる認証は無効になっており、<varname>enable_pool_hba</varname>を<literal>on</literal>に設定することで有効になります。
63   <xref linkend="guc-enable-pool-hba">設定パラメータをご覧ください。
64  </para>
65
66  <para>
67   <!--
68   The format of the <filename>pool_hba.conf</filename> file follows very closely <productname>PostgreSQL</>'s <filename>pg_hba.conf</filename> format.
69
70   The general format of the <filename>pool_hba.conf</filename> file is
71   a set of records, one per line. Blank lines are ignored, as is any
72   text after the <literal>#</literal> comment character.
73   Records cannot be continued across lines.
74   A record is made
75   up of a number of fields which are separated by spaces and/or tabs.
76   Fields can contain white space if the field value is double-quoted.
77   Quoting one of the keywords in a database, user, or address field (e.g.,
78   <literal>all</> or <literal>replication</>) makes the word lose its special
79   meaning, and just match a database, user, or host with that name.
80   -->
81   <filename>pool_hba.conf</filename>のフォーマットは<productname>PostgreSQL</>の<filename>pg_hba.conf</filename>のものとほとんど同じです。
82   <filename>pool_hba.conf</filename>ファイルの一般的な書式は、1行につき1つのレコードというレコードの集合です。
83   空行はコメント用の<literal>#</literal>文字以降の文字と同じく無視されます。
84   レコードは行をまたいで続けることはできません。
85   レコードはスペースもしくはタブ、もしくはその両方で区切られた、複数のフィールドで構成されています。
86   フィールドには、フィールド値が二重引用符付きの場合空白文字を含むことができます。
87   データベース、ユーザもしくはアドレスフィールド内のキーワード(例:<literal>all</>または<literal>replication</>)の一つを引用するとその特別な意味が失われ、その名称のデータベース、ユーザもしくはホストと一致するようになります。
88  </para>
89
90  <para>
91   <!--
92   Each record specifies a connection type, a client IP address range
93   (if relevant for the connection type), a database name, a user name,
94   and the authentication method to be used for connections matching
95   these parameters. The first record with a matching connection type,
96   client address, requested database, and user name is used to perform
97   authentication. There is no <quote>fall-through</> or
98   <quote>backup</>: if one record is chosen and the authentication
99   fails, subsequent records are not considered. If no record matches,
100   access is denied.
101   -->
102   それぞれのレコードは接続形式、(接続形式に対して意味を持つのであれば)クライアントのIPアドレス範囲、データベースの名前、ユーザ名およびこれらのパラメータに一致する接続で使用される認証方法を指定します。
103   接続形式、クライアントアドレス、要求されたデータベース、およびユーザ名に一致する最初のレコードが認証処理に使用されます。
104   「失敗時の継続」や、 あるいは「バックアップ」はありません。
105   これは、もしあるレコードが選択されて認証に失敗した場合、後続のレコードは考慮されないということです。
106   どのレコードも一致しない時はアクセスが拒否されます。
107  </para>
108
109  <para>
110   <!--
111   A record can have one of the following formats
112   -->
113   レコードは以下の書式のうちの1つの形式を取ります。
114   <synopsis>
115    local      <replaceable>database</replaceable>  <replaceable>user</replaceable>  <replaceable>auth-method</replaceable>  <optional><replaceable>auth-options</replaceable></optional>
116    host       <replaceable>database</replaceable>  <replaceable>user</replaceable>  <replaceable>CIDR-address</replaceable>  <replaceable>auth-method</replaceable>  <optional><replaceable>auth-options</replaceable></optional>
117   </synopsis>
118   <!--
119   The meaning of the fields is as follows:
120   -->
121   フィールドの意味は以下のようになっています。
122
123   <variablelist>
124    <varlistentry>
125     <term><literal>local</literal></term>
126     <listitem>
127      <para>
128       <!--
129       This record matches connection attempts using Unix-domain
130       sockets.  Without a record of this type, Unix-domain socket
131       connections are disallowed.
132       -->
133       このレコードはUnixドメインソケットを使用する接続に対応します。
134       この種類のレコードを使用しないと、Unixドメインソケット経由の接続は拒否されます
135      </para>
136     </listitem>
137    </varlistentry>
138
139    <varlistentry>
140     <term><literal>host</literal></term>
141     <listitem>
142      <para>
143       <!--
144       This record matches connection attempts made using TCP/IP.
145       <literal>host</literal> records match either
146       <acronym>SSL</acronym> or non-<acronym>SSL</acronym> connection
147       attempts.
148       -->
149       このレコードは、TCP/IPを使用した接続に対応します。
150       <literal>host</literal>レコードは、<acronym>SSL</acronym>もしくは非<acronym>SSL</acronym>接続のいずれかに対応します。
151      </para>
152      <note>
153       <para>
154	<!--
155	Remote TCP/IP connections will not be possible unless
156	the server is started with an appropriate value for the
157	<xref linkend="guc-listen-addresses"> configuration parameter,
158	since the default behavior is to listen for TCP/IP connections
159	only on the local loopback address <literal>localhost</>.
160	-->
161	サーバのデフォルトの動作は、ローカルループバックアドレスである<literal>localhost</literal>のみTCP/IP接続を監視しています。
162	よってサーバにおいて<xref linkend="guc-listen-addresses">パラメータが適切な値に設定された状態で起動されていない限り、リモートのTCP/IP接続はできません。
163       </para>
164      </note>
165     </listitem>
166    </varlistentry>
167
168    <varlistentry>
169     <term><replaceable>database</replaceable></term>
170     <listitem>
171      <para>
172       <!--
173       Specifies which database name(s) this record matches.  The value
174       <literal>all</literal> specifies that it matches all databases.
175       -->
176       このレコードで対応するデータベース名を指定します。
177       <literal>all</literal>という値は、全てのデータベースと対応することを指定します。
178       <note>
179	<para>
180	 <!--
181	 <literal>"samegroup"</literal> for database field is not supported:
182	 -->
183	 databaseフィールド値として<literal>"samegroup"</literal>はサポートされません
184	</para>
185	<para>
186	 <!--
187	 Since <productname>Pgpool-II</productname> does not know anything about
188	 users in the <productname>PostgreSQL</> backend server, the database name is simply
189	 compared against the entries in the database field of <filename>pool_hba.conf</filename>.
190	 -->
191	 <productname>Pgpool-II</productname>は<productname>PostgreSQL</>バックエンドサーバにあるユーザ情報を事前に知る事ができないため、データベース名は<filename>pool_hba.conf</filename>にあるdatabaseフィールドの項目のみと比較されます。
192	</para>
193       </note>
194      </para>
195     </listitem>
196    </varlistentry>
197
198    <varlistentry>
199     <term><replaceable>user</replaceable></term>
200     <listitem>
201      <para>
202       <!--
203       Specifies which database user name(s) this record
204       matches. The value <literal>all</literal> specifies that it
205       matches all users.  Otherwise, this is the name of a specific
206       database user
207       -->
208       このレコードで対応するデータベースユーザ名を指定します。
209       <literal>all</literal>という値は、全てのユーザが対応することを指定します。
210       それ以外の場合には特定のデータベースユーザの名前となります。
211       <note>
212	<para>
213	 <!--
214	 group names following <literal>"+"</literal> for user field is not supported:
215	 -->
216	 userフィールド値として"+"を使ったグループ指定はサポートされません
217
218	</para>
219	<para>
220	 <!--
221	 This is for the same reason as for the <literal>"samegroup"</literal> of database field.
222	 A user name is simply checked against the entries in the user field of
223	 <filename>pool_hba.conf</filename>.
224	 -->
225	 上記の<literal>"samegroup"</literal>と同じ理由で、ユーザ名は単純に<filename>pool_hba.conf</filename>にあるuserフィールドの項目のみ対してチェックされます。
226	</para>
227       </note>
228      </para>
229     </listitem>
230    </varlistentry>
231
232    <varlistentry>
233     <term><replaceable>address</replaceable></term>
234     <listitem>
235      <para>
236       <!--
237       Specifies the client machine address(es) that this record matches.
238       An IP address range is specified using standard numeric notation
239       for the range's starting address, then a slash (<literal>/</literal>)
240       and a <acronym>CIDR</> mask length.  The mask
241       length indicates the number of high-order bits of the client
242       IP address that must match.  Bits to the right of this should
243       be zero in the given IP address.
244       There must not be any white space between the IP address, the
245       <literal>/</literal>, and the CIDR mask length.
246       -->
247       このレコードに対応しているクライアントマシンのアドレスを指定します。
248       IPアドレスの範囲は、範囲の開始アドレス、続いてスラッシュ(<literal>/</literal>)と<acronym>CIDR</>マスクの長さという標準の数値表記で指定されます。
249       CIDRマスク長とは、クライアントIPアドレスが一致しなければならない、高位のビット数を表すものです。
250       指定するIPアドレスのこれより右側のビットには、0を指定しなければなりません。
251       IPアドレスと<literal>/</literal>、およびCIDRマスク長の間には空白を入れてはいけません。
252       <note>
253	<para>
254	 <!--
255	 Pv6 IP address/mask is currently not supported
256	 -->
257	 現在、IPv6アドレス/マスク表記法はサポートされません
258	</para>
259       </note>
260      </para>
261
262      <para>
263       <!--
264       This field only applies to <literal>host</literal> records.
265       -->
266       このフィールドは<literal>host</literal>レコードにのみ適用されます。
267      </para>
268     </listitem>
269    </varlistentry>
270
271    <varlistentry>
272     <term><replaceable>auth-method</replaceable></term>
273     <listitem>
274      <para>
275       <!--
276       Specifies the authentication method to use when a connection matches
277       this record. The possible choices are summarized here; details
278       are in <xref linkend="auth-methods">.
279       -->
280       接続がこのレコードに一致する場合に使用する認証方式を指定します。
281       使用できる選択肢は以下にまとめていますが、詳しく<xref linkend="auth-methods">を参照してください。
282
283	<variablelist>
284	 <varlistentry>
285	  <term><literal>trust</></term>
286	  <listitem>
287	   <para>
288	    <!--
289	    Allow the connection unconditionally. This method
290	    allows anyone that can connect to the
291	    <productname>Pgpool-II</productname>.
292	    -->
293	    接続を無条件で許可します。
294	    この方式は、<productname>Pgpool-II</productname>に接続できる全てのユーザを許可します。
295	   </para>
296	  </listitem>
297	 </varlistentry>
298
299	 <varlistentry>
300	  <term><literal>reject</></term>
301	  <listitem>
302	   <para>
303	    <!--
304	    Reject the connection unconditionally. This is useful for
305	    <quote>filtering out</> certain hosts, for example a
306	    <literal>reject</> line could block a specific host from connecting.
307	    -->
308	    接続を無条件に拒否します。
309	    特定のホストをあるグループから「除外」するために便利です。
310	    例えば、1行の<literal>reject</literal>は特定のホストが接続することを拒否します。
311	   </para>
312	  </listitem>
313	 </varlistentry>
314
315	 <varlistentry>
316	  <term><literal>md5</></term>
317	  <listitem>
318	   <para>
319	    <!--
320	    Require the client to supply a double-MD5-hashed password for
321	    authentication.
322	    -->
323	    クライアントに対して認証時に二重MD5ハッシュ化パスワードを要求します。
324
325	    <note>
326	     <para>
327	      <!--
328	      To use <literal>md5</literal> authentication, you need to register
329	      the user name and password in <filename>"pool_passwd"</filename>.
330	      See <xref linkend="auth-md5"> for more details.
331	      -->
332	      <literal>md5</literal>認証を使うには、ユーザ名とパスワードを<filename>pool_passwd</filename>というパスワードファイルに登録する必要があります。
333	      詳細は<xref linkend="auth-md5">を参照してください。
334	     </para>
335	    </note>
336	   </para>
337	  </listitem>
338	 </varlistentry>
339
340	 <varlistentry>
341	  <term><literal>pam</></term>
342	  <listitem>
343	   <para>
344	    <!--
345	    Authenticate using the Pluggable Authentication Modules
346	    (PAM) service provided by the operating system.
347	    See <xref linkend="auth-pam"> for details.
348	    -->
349	    オペレーティングシステムによって提供されるPAM(Pluggable Authentication Modules)サービスを使用した認証です。
350	    詳細は<xref linkend="auth-pam">を参照してください
351	   </para>
352	   <para>
353	    <!--
354	    PAM authentication is supported using user information on the host
355	    where <productname>Pgpool-II</productname> is running.
356	    To enable PAM support the <productname>Pgpool-II</productname>
357	    must be configured with <command>"&#045;&#045;with-pam"</command>
358	    -->
359	    <productname>Pgpool-II</productname>が稼働するホスト上のユーザ情報を使ったPAM認証を利用することができます。
360	    PAMサポートを有効にするには、<productname>Pgpool-II</productname>が<command>"--with-pam"</command>をつけてconfigureされていなければなりません。
361	   </para>
362	   <para>
363	    <!--
364	    To enable PAM authentication, you must create a service-configuration file
365	    for <productname>Pgpool-II</productname> in the system's PAM configuration
366	    directory (that is usually located at <literal>"/etc/pam.d"</literal>).
367	    A sample service-configuration file is also installed as <literal>"share/pgpool.pam"</literal>
368	    under the install directory.
369	    -->
370	    PAM認証を有効にするには、<productname>Pgpool-II</productname>のサービス設定ファイルをシステムのPAM設定ディレクトリ(通常は<literal>"/etc/pam.d"</literal>にあります)に作成しなければなりません。
371	    サービス設定ファイルのサンプルはインストールディレクトリ下に<literal>"share/pgpool.pam"</literal>としてインストールされています。
372	   </para>
373	  </listitem>
374	 </varlistentry>
375	</variablelist>
376
377      </para>
378     </listitem>
379    </varlistentry>
380
381    <varlistentry>
382     <term><replaceable>auth-options</replaceable></term>
383     <listitem>
384      <para>
385       <!--
386       After the <replaceable>auth-method</> field, there can be field(s) of
387       the form <replaceable>name</><literal>=</><replaceable>value</> that
388       specify options for the authentication method.
389       -->
390       <replaceable>auth-method</>フィールドの後ろに、認証方式のオプションを指定する、<replaceable>name</>=<replaceable>value</>の形式のフィールドが存在する可能性があります。
391      </para>
392     </listitem>
393    </varlistentry>
394   </variablelist>
395  </para>
396
397  <para>
398   <!--
399   Since the <filename>pool_hba.conf</filename> records are examined
400   sequentially for each connection attempt, the order of the records is
401   significant. Typically, earlier records will have tight connection
402   match parameters and weaker authentication methods, while later
403   records will have looser match parameters and stronger authentication
404   methods. For example, one might wish to use <literal>trust</>
405   authentication for local TCP/IP connections but require a password for
406   remote TCP/IP connections. In this case a record specifying
407   <literal>trust</> authentication for connections from 127.0.0.1 would
408   appear before a record specifying password authentication for a wider
409   range of allowed client IP addresses.
410   -->
411   <filename>pool_hba.conf</filename>レコードは接続が試みられる度に順番に検査されますので、レコードの順序はとても大切です。
412   典型的には、始めの方のレコードには厳しい接続照合パラメータと緩い認証方式があるのに対し、終わりの方のレコードにはより緩い照合パラメータとより厳しい認証方式があります。
413   例えば、ローカルTCP接続では<literal>trust</>認証方式、リモートTCP接続に対してはパスワードを要求したいとします。
414   この場合、広範囲にわたって許可されるクライアントのIPアドレスに対するパスワード認証を指定するレコードの前に127.0.0.1からの接続に対する<literal>trust</>認証指定のレコードが置かれなければなりません。
415  </para>
416
417  <tip>
418   <para>
419    <!--
420    All pool_hba authentication options described in this section are
421    about the authentication taking place between a client and the
422    <productname>Pgpool-II</productname>.
423    A client still has to go through the <productname>PostgreSQL</>'s authentication
424    process and must have the <literal>CONNECT</> privilege for the
425    database on the backend <productname>PostgreSQL</> server.
426    -->
427    ここで説明された全てのpool_hba認証のオプションはクライアントと<productname>Pgpool-II</productname>の間についてだということに注意してください。
428    クラインアントは依然として、<productname>PostgreSQL</>による認証を通過しなければなりませんし、バックエンド<productname>PostgreSQL</>サーバ上のデータベースに対して<literal>CONNECT</>権限を持っていなければなりません。
429   </para>
430   <para>
431    <!--
432    As far as pool_hba is concerned, it does not matter if a user name
433    and/or database name given by a client
434    (i.e. <command>psql -U testuser testdb</command>)
435    really exists in the backend. pool_hba only cares if a match in the
436    <filename>pool_hba.conf</filename> can be found or not.
437    -->
438    pool_hbaにとってはクライアントに指定されたユーザ名やデータベース名(例. psql -U testuser testdb)が実際にバックエンド上に存在するかどうかは問題ではありません。
439    pool_hbaは<filename>pool_hba.conf</filename>の値とマッチするかどうかのみを気にします。
440   </para>
441  </tip>
442
443  <para>
444   <!--
445   Some examples of <filename>pool_hba.conf</filename> entries are below.
446   See the next section for details on the different authentication methods.
447   -->
448   <filename>pool_hba.conf</filename>ファイルの例をいくつか以下に示します。
449   各種認証方式の詳細については次の節をご覧ください。
450  </para>
451
452  <example id="example-pg-hba.conf">
453   <!--
454   <title>Example <filename>pool_hba.conf</filename> Entries</title>
455   -->
456   <title><filename>pool_hba.conf</filename>の項目の例</title>
457   <programlisting>
458    # Allow any user on the local system to connect to any database with
459    # any database user name using Unix-domain sockets (the default for local
460    # connections).
461    #
462    # TYPE  DATABASE        USER            ADDRESS                 METHOD
463    local   all             all                                     trust
464
465    # The same using local loopback TCP/IP connections.
466    #
467    # TYPE  DATABASE        USER            ADDRESS                 METHOD
468    host    all             all             127.0.0.1/32            trust
469
470    # Allow any user from host 192.168.12.10 to connect to database
471    # "postgres" if the user's password is correctly supplied.
472    #
473    # TYPE  DATABASE        USER            ADDRESS                 METHOD
474    host    postgres        all             192.168.12.10/32        md5
475   </programlisting>
476  </example>
477 </sect1>
478
479 <sect1 id="auth-methods">
480  <!--
481  <title>Authentication Methods</title>
482  -->
483  <title>認証方式</title>
484  <para>
485   <!--
486   The following subsections describe the authentication methods in more detail.
487   -->
488   以下の小節では、認証方式について詳細に説明します。
489  </para>
490
491  <sect2 id="auth-trust">
492   <!--
493   <title>Trust Authentication</title>
494   -->
495   <title>trust認証</title>
496
497   <para>
498    <!--
499    When <literal>trust</> authentication is specified,
500    <productname>Pgpool-II</productname> assumes that anyone who can
501    connect to the server is authorized to access connect with
502    whatever database user name they specify.
503    -->
504    <literal>trust</literal>認証が指定されると<productname>Pgpool-II</productname>は、サーバに接続できる全ての人に対してその人が指定する任意のデータベースユーザ名としてのアクセス権限が付与されていると想定します
505   </para>
506  </sect2>
507
508  <sect2 id="auth-md5">
509   <!--
510   <title>MD5 Password Authentication</title>
511   -->
512   <title>MD5パスワード認証</title>
513
514   <indexterm>
515    <primary>MD5</>
516   </indexterm>
517
518   <para>
519    <!--
520    This authentication method is the password-based authentication
521    methods in which MD-5-hashed password is sent by client.
522    Since <productname>Pgpool-II</productname> does not has the visibility
523    of <productname>PostgreSQL</>'s database user password and client application only sends
524    the MD5-hash of the password, so <literal>md5</literal> authentication
525    in <productname>Pgpool-II</productname> is supported using the
526    <xref linkend="guc-pool-passwd"> authentication file.
527    -->
528    この認証方法はMD-5ハッシュ化されたパスワードがクライアントから送信されるパスワードベースの認証方法です。
529    <productname>Pgpool-II</productname>は<productname>PostgreSQL</>データベースユーザパスワードを見ることができず、クライアントプリケーションはMD5ハッシュ化されたパスワードを送るのみです。
530    そのため、<productname>Pgpool-II</productname>の<literal>md5</literal>認証は<xref linkend="guc-pool-passwd">認証ファイルを使ってサポートしています。
531   </para>
532
533   <sect3 id="md5-authentication-file-format">
534    <!--
535    <title>Authentication file format</title>
536    -->
537    <title>認証ファイル形式</title>
538
539    <para>
540     <!--
541     This <literal>pool_passwd</literal> file should contain lines in the following format:
542     -->
543     <literal>pool_passwd</literal>ファイルは以下の形式の行を含みます。
544     <programlisting>
545      "username:encrypted_passwd"
546     </programlisting>
547    </para>
548   </sect3>
549
550   <sect3 id="setting-md5-authentication">
551    <!--
552    <title>Setting md5 Authentication</title>
553    -->
554    <title>md5認証の設定</title>
555    <indexterm zone="setting-md5-authentication">
556     <primary>MD5</primary>
557    </indexterm>
558
559    <para>
560     <!--
561     here are the steps to enable <literal>md5</literal> authentication:
562     -->
563     以下が<literal>md5</literal>認証を有効にする手順です。
564    </para>
565    <para>
566     <!--
567     1- Login as the database's operating system user and type
568     <command>"pg_md5 &#045;&#045;md5auth &#045;&#045;username=username password"</command>
569     user name and <literal>md5</literal> encrypted password are registered
570     into pool_passwd.
571     If pool_passwd does not exist yet, pg_md5 command will automatically create it for you.
572     -->
573     1. データベースのOSユーザとしてログインし、<command>"pg_md5 --config-file=pgpool.confへのパス --md5auth --username=ユーザ名 パスワード"</command> を実行します。
574     pool_passwdがまだ存在していなかった場合は、pg_md5コマンドが自動的にこれを生成します。
575     <note>
576      <para>
577       <!--
578       user name and password must be identical to those registered in <productname>PostgreSQL</> server
579       -->
580       ユーザ名とパスワードは、<productname>PostgreSQL</>に登録したものと完全に同じでなければなりません。
581      </para>
582     </note>
583    </para>
584
585    <para>
586     <!--
587     2- Add an appropriate md5 entry to <filename>pool_hba.conf</filename>.
588     See <xref linkend="auth-pool-hba-conf"> for more details.
589     -->
590     2. <filename>pool_hba.conf</filename>にmd5認証のエントリを作成します。
591     詳細については<xref linkend="auth-pool-hba-conf">を参照してください。
592    </para>
593    <para>
594     <!--
595     3- After changing md5 password(in both pool_passwd and <productname>PostgreSQL</> of course),
596     reload the <productname>Pgpool-II</> configurations.
597     -->
598     3. (もちろんpool_passwdと<productname>PostgreSQL</>の両方で)のmd5パスワードを変更したら、<productname>Pgpool-II</>設定の再読み込みを実行してください。
599    </para>
600   </sect3>
601
602  </sect2>
603
604  <sect2 id="auth-pam">
605   <!--
606   <title>PAM Authentication</title>
607   -->
608   <title>PAM認証</title>
609
610   <indexterm zone="auth-pam">
611    <primary>PAM</primary>
612   </indexterm>
613
614   <para>
615    <!--
616    This authentication method uses PAM (Pluggable
617    Authentication Modules) as the authentication mechanism. The
618    default PAM service name is <literal>pgpool</literal>.
619    PAM authentication is supported using user information on
620    the host where <productname>Pgpool-II</productname> is executed.
621    For more
622    information about PAM, please read the
623    <ulink url="http://www.kernel.org/pub/linux/libs/pam/">
624    <productname>Linux-PAM</> Page</ulink>.
625    -->
626    この認証方式は認証機構としてPAM(Pluggable Authentication Modules)を使用します。
627    デフォルトのPAMサービス名は<literal>pgpool</literal>です。
628    <productname>Pgpool-II</productname>が稼働するホスト上のユーザ情報を使ったPAM認証を利用することができます。
629    PAMについての詳細は<ulink url="http://www.kernel.org/pub/linux/libs/pam/">Linux-PAM</>ページを読んでください
630   </para>
631
632   <para>
633    <!--
634    To enable PAM authentication, you need to create a service-configuration
635    file for <productname>Pgpool-II</productname> in the system's
636    PAM configuration directory (which is usually at <literal>"/etc/pam.d"</literal>).
637    A sample service-configuration file is installed as
638    <filename>"share/pgpool-II/pgpool.pam"</filename> under the install directory.
639    -->
640    PAM認証を有効にするには、<productname>Pgpool-II</productname>のサービス設定ファイルをシステムのPAM設定ディレクトリ(通常は<literal>"/etc/pam.d"</literal>にあります)に作成しなければなりません。
641    サービス設定ファイルのサンプルはインストールディレクトリ下に<literal>"share/pgpool-II/pgpool.pam"</literal>としてインストールされています。
642   </para>
643
644   <note>
645    <para>
646     <!--
647     To enable PAM support the <productname>Pgpool-II</productname>
648     must be configured with <command>"&#045;&#045;with-pam"</command>
649     -->
650     PAMサポートを有効にするには、<productname>Pgpool-II</productname>が<command>"--with-pam"</command>をつけてconfigureされていなければなりません。
651    </para>
652   </note>
653  </sect2>
654
655  <sect2 id="auth-gssapi">
656   <!--
657   <title>GSSAPI Authentication</title>
658   -->
659   <title>GSSAPI認証</title>
660
661   <indexterm zone="auth-gssapi">
662    <primary>GSSAPI</primary>
663   </indexterm>
664
665   <para>
666    <!--
667    GSSAPI is an industry-standard protocol for secure authentication
668    defined in RFC 2743.  Currently
669    <productname>Pgpool-II</productname> does not support GSSAPI.
670    Clients should not use GSSAPI authentication, or should use
671    "prefer GSSAPI authentication if possible" option (this is the
672    default setting of <productname>PostgreSQL</productname> clients).
673    If latter is chosen, <productname>Pgpool-II</productname> requests
674    non-GSSAPI authentication to client, and the clients will fall
675    back to non-GSSAPI authentication method. Thus, usually users do
676    not need to worry about that <productname>Pgpool-II</productname>
677    does not accept GSSAPI authentication.
678    -->
679    GSSAPIは、RFC 2743で定義されている安全な認証のための業界標準のプロトコルです。
680    今の所<productname>Pgpool-II</productname>はGSSAPIをサポートしていません。
681    クライアントはGSSAPI認証要求を行わないようにするか、「可能ならばGSSAPI認証を使う」オプションを選択しなければなりません(これは<productname>PostgreSQL</productname>クライアントのデフォルト設定です)。
682    後者を選択した場合、<productname>Pgpool-II</productname>はGSSAPIを使わない認証方式をクライアントにリクエストし、その結果クライアントはGSSAPIを使わない認証方式を使用するので、通常ユーザはGSSAPI認証方式を<productname>Pgpool-II</productname>が受け入れないことを意識する必要はありません。
683   </para>
684  </sect2>
685 </sect1>
686
687 </chapter>
688