Postgresql 中文操作指南

21.3. Authentication Methods #

PostgreSQL 提供多种用户身份验证方法:

PostgreSQL provides various methods for authenticating users:

对于本地连接,通常推荐对等身份验证,尽管在某些情况下,信任身份验证可能就足够了。对于远程连接,密码身份验证是最简单的选择。所有其他选项都需要某种外部安全基础设施(通常是身份验证服务器或用于颁发 SSL 证书的证书颁发机构),或者具有平台相关性。

Peer authentication is usually recommendable for local connections, though trust authentication might be sufficient in some circumstances. Password authentication is the easiest choice for remote connections. All the other options require some kind of external security infrastructure (usually an authentication server or a certificate authority for issuing SSL certificates), or are platform-specific.

以下各节将更详细地描述这些身份验证方法。

The following sections describe each of these authentication methods in more detail.