r2dbc-postgresql icon indicating copy to clipboard operation
r2dbc-postgresql copied to clipboard

Add Kerberos authentication support

Open akiraly opened this issue 3 years ago • 4 comments

Feature Request

The traditional Postgres JDBC driver supports Kerberos authentication (kerberosServerName, jaasApplicationName,... connection properties). In tightly controlled environments it is enforced to use Kerberos, blocking developers from using the r2dbc driver instead of the jdbc one.

Is your feature request related to a problem? Please describe

Can't use r2db driver because it doesn't support kerberos authentication.

Describe the solution you'd like

To be able to use kerberos authentication - similarly to how it works with the postgres jdbc driver.

Describe alternatives you've considered

Maybe some kind of r2dbc to jdbc bridge (is that even possible?) so we can wrap the postgres jdbc into r2dbc and use it that way (together with Spring reactive transaction management).

Teachability, Documentation, Adoption, Migration Strategy

Need to document the new connection properties in the documentation.

akiraly avatar Mar 05 '21 12:03 akiraly

This looks like a duplicate of #315.

In any case, contributions are highly welcome.

mp911de avatar Mar 08 '21 07:03 mp911de

@mp911de I'd like to contribute this feature. Let me know if no one has picked it up already.

frankgh avatar Mar 09 '21 14:03 frankgh

So I muddled this up on the JDBC driver. I tried to emulate what libpq does when making the initial connection. They look for an existing key cache and then send the startup packet. Unfortunately java does not provide a native way to do this (easily) I would suggest using a connection parameter and if the user wants a kerberos encrypted connection then attempt it.

davecramer avatar Mar 09 '21 14:03 davecramer

@frankgh feel free to give it a spin. I'm totally unfamiliar with setting up a Kerberos environment, so any help is appreciated.

mp911de avatar May 17 '22 09:05 mp911de