rebus-org / Rebus.PostgreSql

:bus: PostgreSQL persistence for Rebus
https://mookid.dk/category/rebus
Other
17 stars 19 forks source link

Add support for client certificate authentication #4

Closed enriquein closed 7 years ago

enriquein commented 7 years ago

We currently need to support using client certificates to authenticate against Postgres. Although the change is simple, I'm struggling to come up with a way to surface the functionality through the configuration extension methods.

The issue is that in order to configure Npgsql to use a client certificate, you need to add the certificate to the NpgsqlConnection object using the ProvideClientCertificatesCallback event. Seeing as Rebus wraps and hides the connection from the consumer, there is currently no way of providing the certificate.

I'd love submit a pull request implementing this functionality, but like I said, I have no idea how it would be best to provide this functionality. The way I currently had to work around this issue was that on our project I created a configuration function that uses my own ITimeoutManager implementation that in turn calls our own PostgresConnectionHelper. Of course, this is far from ideal.

Any guidance or ideas would be great.

mookid8000 commented 7 years ago

Added by @enriquein in 4.0.0-b05

enriquein commented 7 years ago

Any chance you could also release a v3 nuget with the change? We're currently using Rebus 3. I could pull request the v3 branch I'm currently pointing at to make it easier for you.

mookid8000 commented 7 years ago

oh, sure! I'll just go create a release/3 branch for you to PR against... just a moment

mookid8000 commented 7 years ago

sorry for the long delay – I created the release/3 branch now

enriquein commented 7 years ago

Thanks! Pull request sent.