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

第21章 クライアント認証

目次

21.1. pg_hba.confファイル
21.2. ユーザ名マップ
21.3. 認証方式
21.4. Trust認証
21.5. パスワード認証
21.6. GSSAPI認証
21.7. SSPI認証
21.8. Ident認証
21.9. Peer認証
21.10. LDAP認証
21.11. RADIUS認証
21.12. 証明書認証
21.13. PAM認証
21.14. BSD認証
21.15. 認証における問題点
<title>Client Authentication</title>

When a client application connects to the database server, it specifies which <productname>PostgreSQL</productname> database user name it wants to connect as, much the same way one logs into a Unix computer as a particular user. Within the SQL environment the active database user name determines access privileges to database objects &mdash; see <xref linkend="user-manag"/> for more information. Therefore, it is essential to restrict which database users can connect. クライアントアプリケーションがデータベースサーバに接続する時、Unixコンピュータに特定のユーザとしてログインする時と同じように、どのPostgreSQLユーザ名で接続するかを指定します。 SQL 環境の中では存在するユーザ名でデータベースオブジェクトへのアクセス権限が決まります。 詳しい情報は第22章を参照してください。 ですから、どのデータベースユーザがデータベースに接続できるかを制限することが基本となります。

注記

As explained in <xref linkend="user-manag"/>, <productname>PostgreSQL</productname> actually does privilege management in terms of <quote>roles</quote>. In this chapter, we consistently use <firstterm>database user</firstterm> to mean <quote>role with the <literal>LOGIN</literal> privilege</quote>. 第22章で説明されていますが、実はPostgreSQLロールによって権限の管理を行っています。 この章では、LOGIN権限を持つロールを、一貫してデータベースユーザという呼び方で使用します。

<firstterm>Authentication</firstterm> is the process by which the database server establishes the identity of the client, and by extension determines whether the client application (or the user who runs the client application) is permitted to connect with the database user name that was requested. 認証はデータベースサーバがクライアントの身元を識別し、その延長としてクライアントアプリケーション(もしくはクライアントアプリケーションを実行するユーザ)が要求されたデータベースユーザ名で接続することができるかどうかを決定する手順です。

<productname>PostgreSQL</productname> offers a number of different client authentication methods. The method used to authenticate a particular client connection can be selected on the basis of (client) host address, database, and user. PostgreSQLは異なったクライアント認証方法を複数提供します。 特定のクライアント接続の認証に使用する方法は、(クライアントの)ホストアドレス、データベース、およびユーザに従って選択できます。

<productname>PostgreSQL</productname> database user names are logically separate from user names of the operating system in which the server runs. If all the users of a particular server also have accounts on the server's machine, it makes sense to assign database user names that match their operating system user names. However, a server that accepts remote connections might have many database users who have no local operating system account, and in such cases there need be no connection between database user names and OS user names. PostgreSQLデータベースユーザ名は稼働しているサーバのオペレーティングシステムのユーザ名とは論理的に分かれています。 もし特定のサーバの全てのユーザがサーバマシン上にもアカウントを持っている場合、そのオペレーティングシステムのユーザ名に一致するデータベースユーザ名を割り当てることは理にかなっています。 しかし、リモート接続を受け付けるサーバは、ローカルなオペレーティングシステムのアカウントを持たないデータベースユーザを多く持っている場合もあります。 そのような時にはデータベースユーザ名とOSのユーザ名との間の関連性は必要ありません。