sspi
Use SSPI to authenticate the user. This is only available on Windows. See Section 20.7 for details.
当前阅读 PG 18·选择有来源记录的版本
此版本暂无所选语言的定义,以下显示原始英文内容。
- Method
- sspi
- Configuration
- pg_hba.conf
- Inventory
- User-visible source authentication method
- aliases
- 未知
- manual path
- /docs/18/sspi-auth.html
- signature
- 未知
版本定义 PG 18
20.7. SSPI Authentication
SSPI is a Windows technology for secure authentication with single sign-on. PostgreSQL will use SSPI in negotiate mode, which will use Kerberos when possible and automatically fall back to NTLM in other cases. SSPI and GSSAPI interoperate as clients and servers, e.g., an SSPI client can authenticate to an GSSAPI server. It is recommended to use SSPI on Windows clients and servers and GSSAPI on non-Windows platforms.
When using Kerberos authentication, SSPI works the same way GSSAPI does; see Section 20.6 for details.
The following configuration options are supported for SSPI:
include_realm-
If set to 0, the realm name from the authenticated user principal is stripped off before being passed through the user name mapping (Section 20.2). This is discouraged and is primarily available for backwards compatibility, as it is not secure in multi-realm environments unless
krb_realmis also used. It is recommended to leaveinclude_realmset to the default (1) and to provide an explicit mapping inpg_ident.confto convert principal names to PostgreSQL user names. compat_realm-
If set to 1, the domain's SAM-compatible name (also known as the NetBIOS name) is used for the
include_realmoption. This is the default. If set to 0, the true realm name from the Kerberos user principal name is used.Do not disable this option unless your server runs under a domain account (this includes virtual service accounts on a domain member system) and all clients authenticating through SSPI are also using domain accounts, or authentication will fail.
upn_username-
If this option is enabled along with
compat_realm, the user name from the Kerberos UPN is used for authentication. If it is disabled (the default), the SAM-compatible user name is used. By default, these two names are identical for new user accounts.Note that libpq uses the SAM-compatible name if no explicit user name is specified. If you use libpq or a driver based on it, you should leave this option disabled or explicitly specify user name in the connection string.
map-
Allows for mapping between system and database user names. See Section 20.2 for details. For an SSPI/Kerberos principal, such as
username@EXAMPLE.COM(or, less commonly,username/hostbased@EXAMPLE.COM), the user name used for mapping isusername@EXAMPLE.COM(orusername/hostbased@EXAMPLE.COM, respectively), unlessinclude_realmhas been set to 0, in which caseusername(orusername/hostbased) is what is seen as the system user name when mapping. krb_realm-
Sets the realm to match user principal names against. If this parameter is set, only users of that realm will be accepted. If it is not set, users of any realm can connect, subject to whatever user name mapping is done.
Documented method options and alternatives
| Option or term | Meaning |
|---|---|
| include_realm | If set to 0, the realm name from the authenticated user principal is stripped off before being passed through the user name mapping ( Section 20.2 ). This is discouraged and is primarily available for backwards compatibility, as it is not secure in multi-realm environments unless krb_realm is also used. It is recommended to leave include_realm set to the default (1) and to provide an explicit mapping in pg_ident.conf to convert principal names to PostgreSQL user names. |
| compat_realm | If set to 1, the domain's SAM-compatible name (also known as the NetBIOS name) is used for the include_realm option. This is the default. If set to 0, the true realm name from the Kerberos user principal name is used. Do not disable this option unless your server runs under a domain account (this includes virtual service accounts on a domain member system) and all clients authenticating through SSPI are also using domain accounts, or authentication will fail. |
| upn_username | If this option is enabled along with compat_realm , the user name from the Kerberos UPN is used for authentication. If it is disabled (the default), the SAM-compatible user name is used. By default, these two names are identical for new user accounts. Note that libpq uses the SAM-compatible name if no explicit user name is specified. If you use libpq or a driver based on it, you should leave this option disabled or explicitly specify user name in the connection string. |
| map | Allows for mapping between system and database user names. See Section 20.2 for details. For an SSPI/Kerberos principal, such as username@EXAMPLE.COM (or, less commonly, username/hostbased@EXAMPLE.COM ), the user name used for mapping is username@EXAMPLE.COM (or username/hostbased@EXAMPLE.COM , respectively), unless include_realm has been set to 0, in which case username (or username/hostbased ) is what is seen as the system user name when mapping. |
| krb_realm | Sets the realm to match user principal names against. If this parameter is set, only users of that realm will be accepted. If it is not set, users of any realm can connect, subject to whatever user name mapping is done. |
比较版本
完整来源事实
attributes
{"configuration":"pg_hba.conf","inventory":"User-visible source authentication method","method":"sspi"}来源引用
- Matching PostgreSQL source archive
- PostgreSQL 18 English manual
- PostgreSQL 18 English manual
- 固定 PostgreSQL 源码归档
定义来源
center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
正文语言: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f