SSL connection to AWS RDS Postgres

Discussion of issues, suggestions and bugs of Devart Excel Add-ins, our product line for connecting Excel to external data from cloud applications and databases
Post Reply
hannesk
Posts: 2
Joined: Fri 25 Sep 2020 13:56

SSL connection to AWS RDS Postgres

Post by hannesk » Fri 25 Sep 2020 14:41

I am trying to connect Postgres hosted as RDS service.

If I don't use SSL the connections works ok. Also I have been able to use the SSL connection with psql command-line client (using sslmode=verify-ca) and pgAdmin too. So server configuration should be ok.

My connection string looks like:

Code: Select all

User Id=user;Password=*****;Host=xxx.rds.amazonaws.com;Database=dbname;Unicode=True;Persist Security Info=True;SSLMode=Require;SSL CA Cert=C:\rds-combined-ca-bundle.pem
(I don't know if the a rds-ca-2019-root.pem is enough or if I need the combined one, but I tried with both. Also unsure if I need double escape for \ so I tried both)

The error I get always when "Test Connection" is "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Inner error: An existing connection was forcibly closed by the remote host.".

Situation looks a bit same as this:
viewtopic.php?t=33971

dm-m
Devart Team
Posts: 8
Joined: Tue 06 Aug 2019 07:43

Re: SSL connection to AWS RDS Postgres

Post by dm-m » Tue 29 Sep 2020 08:11

Hello,

Thank you for contacting us.

We raised a ticket with our development team to investigate this.

Once there are any details, we will let you know.

hannesk
Posts: 2
Joined: Fri 25 Sep 2020 13:56

Re: SSL connection to AWS RDS Postgres

Post by hannesk » Tue 06 Oct 2020 14:20

Could you please haste this investigation. We'd wish to purchase your software (multiple licenses), but as currently it does not work for our use case, so we will need find alternative options to access database from Excel. Using the connection non-encrypted is not an option.

Note, following works ok on this same computer from powershell command-line:

Code: Select all

psql.exe "user=user host=xxx.rds.amazonaws.com dbname=dbname sslrootcert=C:\\rds-ca-2019-root.pem sslmode=verify-ca"

psql (12.1, server 12.2)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

dbname=>

dm-m
Devart Team
Posts: 8
Joined: Tue 06 Aug 2019 07:43

Re: SSL connection to AWS RDS Postgres

Post by dm-m » Tue 13 Oct 2020 12:39

Hello,

Thank you for getting back to us.

It seems that WS RDS PostgreSQL is configured for only TLS protocol 1.2. Our PostgreSQL provider is using TLS Protocol=1.1 for backwards compatibility with old servers.

Please enable "SSL TLS Protocol=1.2" parameter in the connection details for PostgreSQL:
https://www.screencast.com/t/OzpcmMhapku

We are looking forward to hearing from you, should you have any questions.

Post Reply