forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfb5718f
committed
Remove option to fall back from direct to postgres SSL negotiation
There were three problems with the sslnegotiation options:1. The sslmode=prefer and sslnegotiation=requiredirect combination wassomewhat dangerous, as you might unintentionally fall back toplaintext authentication when connecting to a pre-v17 server.2. There was an asymmetry between 'postgres' and 'direct'options. 'postgres' meant "try only traditional negotiation", while'direct' meant "try direct first, and fall back to traditionalnegotiation if it fails". That was apparent only if you knew that the'requiredirect' mode also exists.3. The "require" word in 'requiredirect' suggests that it's somehowmore strict or more secure, similar to sslmode. However, I don'tconsider direct SSL connections to be a security feature.To address these problems:- Only allow sslnegotiation='direct' if sslmode='require' orstronger. And for the record, Jacob and Robert felt that we should dothat (or have sslnegotiation='direct' imply sslmode='require') anyway,regardless of the first issue.- Remove the 'direct' mode that falls back to traditional negotiation,and rename what was called 'requiredirect' to 'direct' instead. Inother words, there is no "try both methods" option anymore, 'postgres'now means the traditional negotiation and 'direct' means a direct SSLconnection.Reviewed-by: Jelte Fennema-Nio, Robert Haas, Jacob ChampionDiscussion:https://www.postgresql.org/message-id/d3b1608a-a1b6-4eda-9ec5-ddb3e4375808%40iki.fi1 parent8ba3462 commitfb5718f
File tree
5 files changed
+200
-253
lines changed- doc/src/sgml
- src/interfaces/libpq
- t
5 files changed
+200
-253
lines changedLines changed: 17 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1773 | 1773 |
| |
1774 | 1774 |
| |
1775 | 1775 |
| |
1776 |
| - | |
1777 |
| - | |
1778 |
| - | |
1779 |
| - | |
1780 |
| - | |
1781 |
| - | |
1782 |
| - | |
1783 |
| - | |
1784 |
| - | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1785 | 1788 |
| |
1786 | 1789 |
| |
1787 | 1790 |
| |
| |||
1799 | 1802 |
| |
1800 | 1803 |
| |
1801 | 1804 |
| |
1802 |
| - | |
1803 |
| - | |
1804 |
| - | |
1805 |
| - | |
1806 |
| - | |
1807 |
| - | |
1808 |
| - | |
1809 |
| - | |
1810 |
| - | |
1811 |
| - | |
1812 |
| - | |
1813 |
| - | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1814 | 1809 |
| |
1815 | 1810 |
| |
1816 | 1811 |
| |
1817 | 1812 |
| |
1818 |
| - | |
1819 |
| - | |
1820 |
| - | |
1821 |
| - | |
1822 |
| - | |
1823 |
| - | |
1824 |
| - | |
1825 |
| - | |
1826 |
| - | |
1827 |
| - | |
1828 | 1813 |
| |
1829 | 1814 |
| |
1830 | 1815 |
| |
| |||
2065 | 2050 |
| |
2066 | 2051 |
| |
2067 | 2052 |
| |
2068 |
| - | |
| 2053 | + | |
2069 | 2054 |
| |
2070 | 2055 |
| |
2071 | 2056 |
| |
|
Lines changed: 70 additions & 72 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
| 277 | + | |
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
| |||
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 | 1592 |
| |
1593 |
| - | |
1594 |
| - | |
| 1593 | + | |
1595 | 1594 |
| |
1596 | 1595 |
| |
1597 | 1596 |
| |
| |||
1608 | 1607 |
| |
1609 | 1608 |
| |
1610 | 1609 |
| |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1611 | 1629 |
| |
1612 | 1630 |
| |
1613 | 1631 |
| |
| |||
3347 | 3365 |
| |
3348 | 3366 |
| |
3349 | 3367 |
| |
3350 |
| - | |
3351 |
| - | |
3352 |
| - | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
3353 | 3371 |
| |
3354 |
| - | |
| 3372 | + | |
3355 | 3373 |
| |
3356 |
| - | |
3357 |
| - | |
3358 |
| - | |
3359 |
| - | |
3360 |
| - | |
3361 |
| - | |
3362 |
| - | |
3363 |
| - | |
3364 |
| - | |
3365 |
| - | |
3366 |
| - | |
3367 |
| - | |
3368 |
| - | |
3369 | 3374 |
| |
3370 |
| - | |
3371 |
| - | |
3372 |
| - | |
3373 |
| - | |
3374 |
| - | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
3375 | 3378 |
| |
3376 |
| - | |
3377 |
| - | |
| 3379 | + | |
3378 | 3380 |
| |
3379 |
| - | |
3380 |
| - | |
3381 |
| - | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
3382 | 3406 |
| |
3383 |
| - | |
3384 |
| - | |
3385 |
| - | |
3386 | 3407 |
| |
3387 | 3408 |
| |
3388 | 3409 |
| |
| |||
3453 | 3474 |
| |
3454 | 3475 |
| |
3455 | 3476 |
| |
3456 |
| - | |
3457 |
| - | |
3458 |
| - | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
3459 | 3480 |
| |
3460 |
| - | |
| 3481 | + | |
3461 | 3482 |
| |
3462 | 3483 |
| |
3463 | 3484 |
| |
| |||
4282 | 4303 |
| |
4283 | 4304 |
| |
4284 | 4305 |
| |
4285 |
| - | |
| 4306 | + | |
4286 | 4307 |
| |
4287 | 4308 |
| |
4288 | 4309 |
| |
| |||
4309 | 4330 |
| |
4310 | 4331 |
| |
4311 | 4332 |
| |
4312 |
| - | |
4313 |
| - | |
4314 |
| - | |
4315 |
| - | |
4316 |
| - | |
4317 |
| - | |
| 4333 | + | |
4318 | 4334 |
| |
4319 | 4335 |
| |
4320 | 4336 |
| |
| |||
4354 | 4370 |
| |
4355 | 4371 |
| |
4356 | 4372 |
| |
4357 |
| - | |
| 4373 | + | |
| 4374 | + | |
4358 | 4375 |
| |
4359 | 4376 |
| |
4360 | 4377 |
| |
| |||
4376 | 4393 |
| |
4377 | 4394 |
| |
4378 | 4395 |
| |
4379 |
| - | |
4380 |
| - | |
4381 |
| - | |
4382 |
| - | |
4383 |
| - | |
4384 |
| - | |
4385 |
| - | |
4386 |
| - | |
4387 |
| - | |
4388 |
| - | |
4389 |
| - | |
4390 |
| - | |
4391 | 4396 |
| |
4392 | 4397 |
| |
4393 | 4398 |
| |
| |||
4445 | 4450 |
| |
4446 | 4451 |
| |
4447 | 4452 |
| |
4448 |
| - | |
4449 |
| - | |
4450 |
| - | |
4451 |
| - | |
4452 | 4453 |
| |
4453 |
| - | |
4454 |
| - | |
4455 |
| - | |
4456 |
| - | |
4457 |
| - | |
4458 |
| - | |
4459 |
| - | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
4460 | 4459 |
| |
4461 |
| - | |
4462 |
| - | |
| 4460 | + | |
| 4461 | + | |
4463 | 4462 |
| |
4464 |
| - | |
4465 |
| - | |
| 4463 | + | |
4466 | 4464 |
| |
4467 | 4465 |
| |
4468 | 4466 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1586 | 1586 |
| |
1587 | 1587 |
| |
1588 | 1588 |
| |
1589 |
| - | |
| 1589 | + | |
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 | 1592 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
238 |
| - | |
239 |
| - | |
| 238 | + | |
240 | 239 |
| |
241 | 240 |
| |
242 | 241 |
| |
| |||
395 | 394 |
| |
396 | 395 |
| |
397 | 396 |
| |
398 |
| - | |
399 |
| - | |
| 397 | + | |
400 | 398 |
| |
401 | 399 |
| |
402 | 400 |
| |
|
0 commit comments
Comments
(0)