pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRegarding SSL Enablement in PostgreSQL Database on different port
5+ messages / 5 participants
[nested] [flat]
* Regarding SSL Enablement in PostgreSQL Database on different port
@ 2023-05-02 09:43 sujay kadam <sujaykadam02@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: sujay kadam @ 2023-05-02 09:43 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi PostgreSQL Team,
I want to enable SSL in PostgreSQL Database on a new port.
I don’t want the default port that is 5432 SSL enabled, but I want to
configure another port to enable SSL on it.
As per my requirement, I cannot use the same port for normal connection and
SSL connection.
Hence, we require a new port to be SSL enabled.
Please guide us with proper information and links to achieve the above task.
Thanks & Regards,
Sujay Kadam
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Regarding SSL Enablement in PostgreSQL Database on different port
@ 2023-05-02 10:13 Magnus Hagander <magnus@hagander.net>
parent: sujay kadam <sujaykadam02@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Hagander @ 2023-05-02 10:13 UTC (permalink / raw)
To: sujay kadam <sujaykadam02@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On Tue, May 2, 2023 at 11:43 AM sujay kadam <sujaykadam02@gmail.com> wrote:
>
> Hi PostgreSQL Team,
>
>
> I want to enable SSL in PostgreSQL Database on a new port.
>
> I don’t want the default port that is 5432 SSL enabled, but I want to configure another port to enable SSL on it.
>
> As per my requirement, I cannot use the same port for normal connection and SSL connection.
>
> Hence, we require a new port to be SSL enabled.
>
>
> Please guide us with proper information and links to achieve the above task.
That is now how SSL in PostgreSQL works. It will always run on the
same port, and PostgreSQL will only listen on one port.
You can probably do some hacky solution to it by running something
like pgbouncer on a different port and enable SSL only in that one.
But it will be a hack. I would recommend instead reviewing your
requirements and see if you can make them work with how PostgreSQL is
designed.
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Regarding SSL Enablement in PostgreSQL Database on different port
@ 2023-05-02 19:15 Tomas Pospisek <tpo2@sourcepole.ch>
parent: Magnus Hagander <magnus@hagander.net>
0 siblings, 2 replies; 5+ messages in thread
From: Tomas Pospisek @ 2023-05-02 19:15 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 02.05.23 12:13, Magnus Hagander wrote:
> On Tue, May 2, 2023 at 11:43 AM sujay kadam <sujaykadam02@gmail.com> wrote:
>>
>> Hi PostgreSQL Team,
>>
>>
>> I want to enable SSL in PostgreSQL Database on a new port.
>>
>> I don’t want the default port that is 5432 SSL enabled, but I want to configure another port to enable SSL on it.
>>
>> As per my requirement, I cannot use the same port for normal connection and SSL connection.
>>
>> Hence, we require a new port to be SSL enabled.
>>
>>
>> Please guide us with proper information and links to achieve the above task.
>
> That is now how SSL in PostgreSQL works. It will always run on the
> same port, and PostgreSQL will only listen on one port.
>
> You can probably do some hacky solution to it by running something
> like pgbouncer on a different port and enable SSL only in that one.
> But it will be a hack. I would recommend instead reviewing your
> requirements and see if you can make them work with how PostgreSQL is
> designed.
Oh, I think your idea to use pgbouncer to take care of the SSL
termination is elegant. I don't think me I'd characterize it as a hack
if properly set up. Why do you consider it a hack?
*t
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Regarding SSL Enablement in PostgreSQL Database on different port
@ 2023-05-02 19:25 Rob Sargent <robjsargent@gmail.com>
parent: Tomas Pospisek <tpo2@sourcepole.ch>
1 sibling, 0 replies; 5+ messages in thread
From: Rob Sargent @ 2023-05-02 19:25 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 5/2/23 13:15, Tomas Pospisek wrote:
>
> Oh, I think your idea to use pgbouncer to take care of the SSL
> termination is elegant. I don't think me I'd characterize it as a hack
> if properly set up. Why do you consider it a hack?
> *t
>
>
>
Let me guess: postgres IS NOT listening on the other port, pgbouncer is
with it's own users and mappings and protocol setup and then sending
what ever's encrypted to the actual port postgres is listening on
which could have been used directly (with maybe on less cert?)
I use pgbouncer btw. For balance.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Regarding SSL Enablement in PostgreSQL Database on different port
@ 2023-05-02 19:26 Christophe Pettus <xof@thebuild.com>
parent: Tomas Pospisek <tpo2@sourcepole.ch>
1 sibling, 0 replies; 5+ messages in thread
From: Christophe Pettus @ 2023-05-02 19:26 UTC (permalink / raw)
To: Tomas Pospisek <tpo2@sourcepole.ch>; +Cc: pgsql-general@lists.postgresql.org
> On May 2, 2023, at 12:15, Tomas Pospisek <tpo2@sourcepole.ch> wrote:
>
> Oh, I think your idea to use pgbouncer to take care of the SSL termination is elegant. I don't think me I'd characterize it as a hack if properly set up. Why do you consider it a hack?
It's really only a hack in the sense that pgbouncer is being introduced just to do TLS. You might be able to do the same thing by running stunnel on the PostgreSQL host on a different port, and have it forward to PostgreSQL.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-05-02 19:26 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 09:43 Regarding SSL Enablement in PostgreSQL Database on different port sujay kadam <sujaykadam02@gmail.com>
2023-05-02 10:13 ` Magnus Hagander <magnus@hagander.net>
2023-05-02 19:15 ` Tomas Pospisek <tpo2@sourcepole.ch>
2023-05-02 19:25 ` Rob Sargent <robjsargent@gmail.com>
2023-05-02 19:26 ` Christophe Pettus <xof@thebuild.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox