forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7729113
committed
Remove support for tls-unique channel binding.
There are some problems with the tls-unique channel binding type. It's notsupported by all SSL libraries, and strictly speaking it's not defined forTLS 1.3 at all, even though at least in OpenSSL, the functions used for itstill seem to work with TLS 1.3 connections. And since we had nomechanism to negotiate what channel binding type to use, there would beawkward interoperability issues if a server only supported some channelbinding types. tls-server-end-point seems feasible to support with any SSLlibrary, so let's just stick to that.This removes the scram_channel_binding libpq option altogether, since thereis now only one supported channel binding type.This also removes all the channel binding tests from the SSL test suite.They were really just testing the scram_channel_binding option, whichis now gone. Channel binding is used if both client and server support it,so it is used in the existing tests. It would be good to have some testsspecifically for channel binding, to make sure it really is used, and thedifferent combinations of a client and a server that support or doesn'tsupport it. The current set of settings we have make it hard to write suchtests, but I did test those things manually, by disablingHAVE_BE_TLS_GET_CERTIFICATE_HASH and/orHAVE_PGTLS_GET_PEER_CERTIFICATE_HASH.I also removed the SCRAM_CHANNEL_BINDING_TLS_END_POINT constant. This is amatter of taste, but IMO it's more readable to just use the"tls-server-end-point" string.Refactor the checks on whether the SSL library supports the functionsneeded for tls-server-end-point channel binding. Now the server won'tadvertise, and the client won't choose, the SCRAM-SHA-256-PLUS variant, ifcompiled with an OpenSSL version too old to support it.In the passing, add some sanity checks to check that the chosen SASLmechanism, SCRAM-SHA-256 or SCRAM-SHA-256-PLUS, matches whether the SCRAMexchange used channel binding or not. For example, if the client selectsthe non-channel-binding variant SCRAM-SHA-256, but in the SCRAM messageuses channel binding anyway. It's harmless from a security point of view,I believe, and I'm not sure if there are some other conditions that wouldcause the connection to fail, but it seems better to be strict about thesethings and check explicitly.Discussion:https://www.postgresql.org/message-id/ec787074-2305-c6f4-86aa-6902f98485a4%40iki.fi1 parent7a46068 commit7729113
File tree
15 files changed
+246
-336
lines changed- doc/src/sgml
- src
- backend/libpq
- include
- common
- libpq
- interfaces/libpq
- test/ssl/t
15 files changed
+246
-336
lines changedLines changed: 0 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1245 | 1245 |
| |
1246 | 1246 |
| |
1247 | 1247 |
| |
1248 |
| - | |
1249 |
| - | |
1250 |
| - | |
1251 |
| - | |
1252 |
| - | |
1253 |
| - | |
1254 |
| - | |
1255 |
| - | |
1256 |
| - | |
1257 |
| - | |
1258 |
| - | |
1259 |
| - | |
1260 |
| - | |
1261 |
| - | |
1262 |
| - | |
1263 |
| - | |
1264 |
| - | |
1265 |
| - | |
1266 |
| - | |
1267 |
| - | |
1268 |
| - | |
1269 |
| - | |
1270 |
| - | |
1271 |
| - | |
1272 |
| - | |
1273 |
| - | |
1274 |
| - | |
1275 |
| - | |
1276 | 1248 |
| |
1277 | 1249 |
| |
1278 | 1250 |
| |
|
Lines changed: 7 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1576 | 1576 |
| |
1577 | 1577 |
| |
1578 | 1578 |
| |
1579 |
| - | |
1580 |
| - | |
1581 |
| - | |
1582 |
| - | |
1583 |
| - | |
1584 |
| - | |
| 1579 | + | |
| 1580 | + | |
1585 | 1581 |
| |
1586 | 1582 |
| |
1587 | 1583 |
| |
| |||
1596 | 1592 |
| |
1597 | 1593 |
| |
1598 | 1594 |
| |
1599 |
| - | |
1600 |
| - | |
1601 |
| - | |
1602 |
| - | |
1603 |
| - | |
1604 |
| - | |
1605 |
| - | |
1606 |
| - | |
1607 |
| - | |
1608 |
| - | |
1609 |
| - | |
1610 |
| - | |
1611 |
| - | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
1612 | 1600 |
| |
1613 | 1601 |
| |
1614 | 1602 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2693 | 2693 |
| |
2694 | 2694 |
| |
2695 | 2695 |
| |
2696 |
| - | |
2697 |
| - | |
2698 |
| - | |
2699 |
| - | |
| 2696 | + | |
2700 | 2697 |
| |
2701 | 2698 |
| |
2702 | 2699 |
| |
|
0 commit comments
Comments
(0)