forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb0b39f7
committed
GSSAPI encryption support
On both the frontend and backend, prepare for GSSAPI encryptionsupport by moving common code for error handling into a separate file.Fix a TODO for handling multiple status messages in the process.Eliminate the OIDs, which have not been needed for some time.Add frontend and backend encryption support functions. Keep thecontext initiation for authentication-only separate on both thefrontend and backend in order to avoid concerns about changing therequested flags to include encryption support.In postmaster, pull GSSAPI authorization checking into a sharedfunction. Also share the initiator name between the encryption andnon-encryption codepaths.For HBA, add "hostgssenc" and "hostnogssenc" entries that behavesimilarly to their SSL counterparts. "hostgssenc" requires either"gss", "trust", or "reject" for its authentication.Similarly, add a "gssencmode" parameter to libpq. Supported values are"disable", "require", and "prefer". Notably, negotiation will only beattempted if credentials can be acquired. Move credential acquisitioninto its own function to support this behavior.Add a simple pg_stat_gssapi view similar to pg_stat_ssl, for monitoringif GSSAPI authentication was used, what principal was used, and ifencryption is being used on the connection.Finally, add documentation for everything new, and update existingdocumentation on connection security.Thanks to Michael Paquier for the Windows fixes.Author: Robbie Harwood, with changes to the read/write functions by me.Reviewed in various forms and at different times by: Michael Paquier, Andres Freund, David Steele.Discussion:https://www.postgresql.org/message-id/flat/jlg1tgq1ktm.fsf@thriss.redhat.com1 parent5f6fc34 commitb0b39f7
File tree
35 files changed
+2575
-197
lines changed- doc/src/sgml
- src
- backend
- catalog
- libpq
- postmaster
- utils/adt
- bin/psql
- include
- catalog
- libpq
- interfaces/libpq
- test
- kerberos/t
- regress/expected
- tools/msvc
35 files changed
+2575
-197
lines changedLines changed: 62 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| 111 | + | |
| 112 | + | |
111 | 113 |
| |
112 | 114 |
| |
113 | 115 |
| |
| |||
128 | 130 |
| |
129 | 131 |
| |
130 | 132 |
| |
131 |
| - | |
| 133 | + | |
132 | 134 |
| |
133 |
| - | |
| 135 | + | |
| 136 | + | |
134 | 137 |
| |
135 | 138 |
| |
136 | 139 |
| |
| |||
176 | 179 |
| |
177 | 180 |
| |
178 | 181 |
| |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
179 | 218 |
| |
180 | 219 |
| |
181 | 220 |
| |
| |||
450 | 489 |
| |
451 | 490 |
| |
452 | 491 |
| |
453 |
| - | |
454 |
| - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
455 | 495 |
| |
456 | 496 |
| |
457 | 497 |
| |
| |||
703 | 743 |
| |
704 | 744 |
| |
705 | 745 |
| |
706 |
| - | |
| 746 | + | |
707 | 747 |
| |
708 |
| - | |
709 |
| - | |
710 |
| - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
711 | 753 |
| |
712 | 754 |
| |
713 | 755 |
| |
714 |
| - | |
| 756 | + | |
| 757 | + | |
715 | 758 |
| |
716 | 759 |
| |
717 | 760 |
| |
| |||
1058 | 1101 |
| |
1059 | 1102 |
| |
1060 | 1103 |
| |
1061 |
| - | |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1068 | 1114 |
| |
1069 | 1115 |
| |
1070 | 1116 |
| |
|
Lines changed: 58 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1316 | 1316 |
| |
1317 | 1317 |
| |
1318 | 1318 |
| |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1319 | 1376 |
| |
1320 | 1377 |
| |
1321 | 1378 |
| |
| |||
7948 | 8005 |
| |
7949 | 8006 |
| |
7950 | 8007 |
| |
7951 |
| - | |
| 8008 | + | |
7952 | 8009 |
| |
7953 | 8010 |
| |
7954 | 8011 |
| |
|
Lines changed: 57 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
339 | 347 |
| |
340 | 348 |
| |
341 | 349 |
| |
| |||
2281 | 2289 |
| |
2282 | 2290 |
| |
2283 | 2291 |
| |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
2284 | 2341 |
| |
2285 | 2342 |
| |
2286 | 2343 |
| |
|
Lines changed: 72 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2037 | 2037 |
| |
2038 | 2038 |
| |
2039 | 2039 |
| |
2040 |
| - | |
2041 |
| - | |
2042 |
| - | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
2043 | 2047 |
| |
2044 | 2048 |
| |
2045 | 2049 |
| |
2046 | 2050 |
| |
2047 | 2051 |
| |
2048 | 2052 |
| |
2049 | 2053 |
| |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
2050 | 2062 |
| |
2051 | 2063 |
| |
2052 | 2064 |
| |
| |||
2143 | 2155 |
| |
2144 | 2156 |
| |
2145 | 2157 |
| |
2146 |
| - | |
2147 |
| - | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2148 | 2176 |
| |
2149 | 2177 |
| |
2150 | 2178 |
| |
| |||
2561 | 2589 |
| |
2562 | 2590 |
| |
2563 | 2591 |
| |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
2564 | 2631 |
| |
2565 | 2632 |
| |
2566 | 2633 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
787 | 787 |
| |
788 | 788 |
| |
789 | 789 |
| |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
790 | 798 |
| |
791 | 799 |
| |
792 | 800 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 |
|
0 commit comments
Comments
(0)