ribbybibby / ssl_exporter

Exports Prometheus metrics for TLS certificates
Apache License 2.0
507 stars 95 forks source link

Add support for postgresql protocol #77

Closed tarvip closed 2 years ago

tarvip commented 2 years ago

With postgresql to initiate SSL-encrypted connection specific combination of bytes must be sent to the server.

Message flow is described on following page https://www.postgresql.org/docs/13/protocol-flow.html#id-1.10.5.7.11

And SSLRequest message format is described on https://www.postgresql.org/docs/13/protocol-message-formats.html

The value of SSLRequest message becomes to bytes that is used in the code