spring-cloud-bindings icon indicating copy to clipboard operation
spring-cloud-bindings copied to clipboard

Add sslmode, sslcert, and sslkey for PostgreSQL RDBMS

Open voor opened this issue 1 year ago • 0 comments

  • When a Service Binding exists that provides private-key for type postgresql then spring cloud bindings should add sslkey to the JDBC url that points to the file location that contains the contents for the private-key.
  • When a Service Binding exists that provides certificates for type postgresql then spring cloud bindings should add sslcert to the JDBC url that points to the file location that contains the contents for the certificates.

I see there is already a way to add some additional DB options: https://github.com/spring-cloud/spring-cloud-bindings/blob/7f20fb23ba134a58bf1733b1dce5f87fe9322e5b/spring-cloud-bindings/src/main/java/org/springframework/cloud/bindings/boot/PostgreSqlBindingsPropertiesProcessor.java#L111 I'm wondering if this can already be leveraged to add in missing parameters for sslcert and sslkey which are necessary for TLS Authentication to Postgres databases.

So this issue might just be documenting how to add those parameters, and how to populate them with a TLS certificate added through certificates and private-key are populated as well-known Secret Entries , but at first glance I don't think this functionality works properly.

voor avatar Jul 10 '23 15:07 voor