bug(r2dbc): enable_iam_auth throws java.lang.ClassCastException #686
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Due to a limitation in R2DBC, extra options specified through the r2dbc url are automatically typed as
String
. Therefore, setting the enable_iam_auth option in the r2dbc connection url (r2dbc:gcp:postgres://{INSTANCE_CONNECTION_NAME}/{DATABASE_NAME}?ENABLE_IAM_AUTH=true
) results in the following error :Perhaps doing something similar to CoreSocketFactory#create where we call
Boolean.parseBoolean()
could help address this. Enabling IAM auth through the JDBC connection url (jdbc:postgresql://google/{DATABASE_NAME}?socketFactory=com.google.cloud.sql.postgres.SocketFactory&cloudSqlInstance={INSTANCE_CONNECTION_NAME}?enableIamAuth=true&sslmode=disable
works as expected.The text was updated successfully, but these errors were encountered: