-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in ReceiveStartupMessage during SSL handshake #33
Comments
First, I suggest using the package github.com/jackc/pgx/v5/pgproto3 instead of this package. This package was merged into pgx v5 well over a year ago. Second, I'm not sure what's going in your situation, but my guess is the next thing you need to do on your server after accepting the Also, I would want to validate that psql is doing what you think it is. Use PGSSLMODE=require to ensure it is actually using SSL. It's possible it's working because it's not using SSL at all. |
Thanks.
We decided to move forward without SSL for now.
However, Datagrip and PowerBI drivers are very stringent with the protocol
reject the connection if they don't have all the correct parameters.
This was supposed to be a simple proxy, but I fear we would need to become
as complex as a database server.
Em sáb., 3 de fev. de 2024 11:36, Jack Christensen ***@***.***>
escreveu:
… First, I suggest using the package github.com/jackc/pgx/v5/pgproto3
instead of this package. This package was merged into pgx v5 well over a
year ago.
Second, I'm not sure what's going in your situation, but my guess is the
next thing you need to do on your server after accepting the SSLRequest
PostgreSQL message is to use the crypto/tls package on your net.Conn to
make it act as a TLS server.
Also, I would want to validate that psql is doing what you think it is.
Use PGSSLMODE=require to ensure it is actually using SSL. It's possible
it's working because it's not using SSL at all.
—
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFMKZM2H3EXOCYKXWNIGAHLYRZDQPAVCNFSM6AAAAABCTVERS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGM2DKMRRGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm building a query interface compatible with PostgreSQL and for now the connection works only for a simple cli psql.
Now I'm testing the connection with Datagrip and other IDEs and be compatible with PowerBI and Metabase connectors.
I'm encountering an error when trying to receive a startup message in my Go application using the ReceiveStartupMessage method from my backend package. The error message is 'invalid length of startup packet: 369296125'.
`func (p *PgBackend) handleSSLRequest(sslRequest pgproto3.SSLRequest) (int, error) {
conn := p.conn
}`
After return 'S', I get in Wireshark a TLS "Hello Client" message from Datagrip
What I'm missing here?
The text was updated successfully, but these errors were encountered: