spring-cloud-bindings
spring-cloud-bindings copied to clipboard
Add sslmode, sslcert, and sslkey for PostgreSQL RDBMS
- When a Service Binding exists that provides
private-key
for typepostgresql
then spring cloud bindings should addsslkey
to the JDBC url that points to the file location that contains the contents for theprivate-key
. - When a Service Binding exists that provides
certificates
for typepostgresql
then spring cloud bindings should addsslcert
to the JDBC url that points to the file location that contains the contents for thecertificates
.
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.