バージョンごとのドキュメント一覧

21.8. Ident認証 #

<title>Ident Authentication</title>

The ident authentication method works by obtaining the client's operating system user name from an ident server and using it as the allowed database user name (with an optional user name mapping). This is only supported on TCP/IP connections. ident認証方式は、クライアントのオペレーティングシステムのユーザ名をidentサーバから入手し、それを(オプションのユーザ名マップとともに)許可されているデータベースのユーザ名として使用します。 これはTCP/IP接続のみサポートされます。

注記

When ident is specified for a local (non-TCP/IP) connection, peer authentication (see <xref linkend="auth-peer"/>) will be used instead. identが(TCP/IPではない)ローカル接続で指定されている場合、 peer認証(21.9を参照してください)が代わりに使用されます。

The following configuration options are supported for <literal>ident</literal>: 次の設定オプションはidentのためにサポートされています。

map

Allows for mapping between system and database user names. See <xref linkend="auth-username-maps"/> for details. システムとデータベースユーザ名の間のマッピングを許可します。 詳細は21.2を参照してください。

The <quote>Identification Protocol</quote> is described in <ulink url="https://tools.ietf.org/html/rfc1413">RFC 1413</ulink>. Virtually every Unix-like operating system ships with an ident server that listens on TCP port 113 by default. The basic functionality of an ident server is to answer questions like <quote>What user initiated the connection that goes out of your port <replaceable>X</replaceable> and connects to my port <replaceable>Y</replaceable>?</quote>. Since <productname>PostgreSQL</productname> knows both <replaceable>X</replaceable> and <replaceable>Y</replaceable> when a physical connection is established, it can interrogate the ident server on the host of the connecting client and can theoretically determine the operating system user for any given connection. 身元特定(Identification)プロトコルについてはRFC 1413で説明されています。 事実上全てのUnix系のオペレーティングシステムの配布には、デフォルトでTCPポート113を監視するidentサーバが付属しています。 identサーバの基本的な機能はどのユーザがポートXからの接続を開始し、自分のポートYへの接続を初期化したのか?というような質問に答えることです。 PostgreSQLは物理的な接続が確立された時にXYの両方を認識するので、接続するクライアントのホスト上のidentサーバに応答指令信号を送ることができ、理論的には与えられたどの接続にもオペレーティングシステムユーザを決定できます。

The drawback of this procedure is that it depends on the integrity of the client: if the client machine is untrusted or compromised, an attacker could run just about any program on port 113 and return any user name they choose. This authentication method is therefore only appropriate for closed networks where each client machine is under tight control and where the database and system administrators operate in close contact. In other words, you must trust the machine running the ident server. Heed the warning: この手続きの欠点は、クライアントの正直さに頼るところが大きいということです。 もしクライアントマシンが信用されない、もしくは危険に晒されている場合、攻撃者はポート113上でほぼどんなプログラムでも実行することができ、どのユーザ名でも好きに選んで返すことができます。 したがってこの認証方式は、各々のクライアントマシンが厳格な管理下にあり、データベースとシステム管理者が密接に連絡を取り合って動作している、外界から閉ざされたネットワークにのみ適していると言えます。 言い換えると、identサーバが稼働しているマシンを信用しなければなりません。 次の警告に注意してください。

 

The Identification Protocol is not intended as an authorization or access control protocol. 身元特定プロトコルは、認証、あるいはアクセス管理プロトコルには意図されていません。

 
 --RFC 1413

Some ident servers have a nonstandard option that causes the returned user name to be encrypted, using a key that only the originating machine's administrator knows. This option <emphasis>must not</emphasis> be used when using the ident server with <productname>PostgreSQL</productname>, since <productname>PostgreSQL</productname> does not have any way to decrypt the returned string to determine the actual user name. いくつかの身元特定サーバは、ユーザ名を(マシンの管理者のみが知っているキーで)暗号化して返すような非標準のオプションを持っています。 このオプションは、身元特定サーバとPostgreSQLとを一緒に使用する場合には、使用してはいけません。 理由はPostgreSQLは、返された文字列を復号化して本当のユーザを決定するための手段を持っていないためです。