File tree 3 files changed +12
-10
lines changed
3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 19
19
* Unix socket support
20
20
* Notifications: ` LISTEN ` /` NOTIFY `
21
21
* pgpass support
22
-
23
- ## Optional Features
24
-
25
- * GSS (Kerberos) auth (to use, see GoDoc)
22
+ * GSS (Kerberos) auth
26
23
27
24
## Tests
28
25
Original file line number Diff line number Diff line change @@ -1074,9 +1074,9 @@ func isDriverSetting(key string) bool {
1074
1074
return true
1075
1075
case "binary_parameters" :
1076
1076
return true
1077
- case "service " :
1077
+ case "krbsrvname " :
1078
1078
return true
1079
- case "spn " :
1079
+ case "krbspn " :
1080
1080
return true
1081
1081
default :
1082
1082
return false
@@ -1168,13 +1168,13 @@ func (cn *conn) auth(r *readBuf, o values) {
1168
1168
1169
1169
var token []byte
1170
1170
1171
- if spn , ok := o ["spn " ]; ok {
1171
+ if spn , ok := o ["krbspn " ]; ok {
1172
1172
// Use the supplied SPN if provided..
1173
1173
token , err = cli .GetInitTokenFromSpn (spn )
1174
1174
} else {
1175
1175
// Allow the kerberos service name to be overridden
1176
1176
service := "postgres"
1177
- if val , ok := o ["service " ]; ok {
1177
+ if val , ok := o ["krbsrvname " ]; ok {
1178
1178
service = val
1179
1179
}
1180
1180
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ supported:
57
57
* sslkey - Key file location. The file must contain PEM encoded data.
58
58
* sslrootcert - The location of the root certificate file. The file
59
59
must contain PEM encoded data.
60
- * spn - Configures GSS (Kerberos) SPN.
61
- * service - GSS (Kerberos) service name to use when constructing the SPN (default is `postgres`).
62
60
63
61
Valid values for sslmode are:
64
62
@@ -259,5 +257,12 @@ package:
259
257
This package is in a separate module so that users who don't need Kerberos
260
258
don't have to download unnecessary dependencies.
261
259
260
+ When imported, additional connection string parameters are supported:
261
+
262
+ * krbsrvname - GSS (Kerberos) service name when constructing the
263
+ SPN (default is `postgres`). This will be combined with the host
264
+ to form the full SPN: `krbsrvname/host`.
265
+ * krbspn - GSS (Kerberos) SPN. This takes priority over
266
+ `krbsrvname` if present.
262
267
*/
263
268
package pq
You can’t perform that action at this time.
0 commit comments