Re: Experiments with Postgres and SSL

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Experiments with Postgres and SSL
Дата
Msg-id CAM-w4HNbwZR+Se3S8YYoATKgY9w1BPq25jkRyrToSVNnL+vXjA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Experiments with Postgres and SSL  (Andrey Borodin <amborodin86@gmail.com>)
Ответы Re: Experiments with Postgres and SSL  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-hackers
On Thu, 19 Jan 2023 at 00:45, Andrey Borodin <amborodin86@gmail.com> wrote:

> But..do we have to treat any unknown start sequence of bytes as a TLS
> connection? Or is there some definite subset of possible first bytes
> that clearly indicates that this is a TLS connection or not?

Absolutely not, there's only one MessageType that can initiate a
connection, ClientHello, so the initial byte has to be a specific
value. (0x16)

And probably to implement HTTP/Websocket it would probably only peek
at the first byte and check for things like G(ET) and H(EAD) and so
on, possibly only over SSL but in theory it could be over any
connection if the request comes before the startup packet.

Personally I'm motivated by wanting to implement status and monitoring
data for things like Prometheus and the like. For that it would just
be simple GET queries to recognize. But tunneling pg wire protocol
over websockets sounds cool but not really something I know a lot
about. I note that Neon is doing something similar with a proxy:
https://neon.tech/blog/serverless-driver-for-postgres


--
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: vac_update_datfrozenxid will raise "wrong tuple length" if pg_database tuple contains toast attribute.