We are using kubernetes to host an instance of keycloak 4.0.0.Final together with a postgres 9.6 database as storage.
This works well, but now we want to move the database to a hosted Cloud SQL instance.
The Cloud SQL instance is setup, running and I can connect from my local machine with psql using SSL as well as through keycloak using non-SSL. Obviously, we want to connect using SSL for keycloak as well.
However, when I add the JDBC SSL configuration to keycloak:
ssl=true&sslmode=verify-ca&sslcert=/certs/client-cert.pem&sslkey=/certs/client-key.pem&sslrootcert=/certs/server-ca.pem
I get an error from keycloak saying:
org.postgresql.util.PSQLException: Could not read SSL key file /certs/client-key.pem
and in the stack trace:
Caused by: java.io.IOException: extra data given to DerValue constructor
Investigating this error has lead me to these reports, but not closer to finding a solution.