Skip to content

SSL=False Option isn't working #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
florianrusch opened this issue Oct 13, 2021 · 1 comment
Closed

SSL=False Option isn't working #453

florianrusch opened this issue Oct 13, 2021 · 1 comment
Labels
type: bug A general bug

Comments

@florianrusch
Copy link

Bug Report

Versions

  • Driver: Postgres
  • Database: Postgres 13
  • Java: 11

Current Behavior

We define the SSL ConnectionFactoryOption as false, but it is not recognized. It is always assumed to be true.

class R2dbcConfig() {
	fun r2dbcConnectionFactory(): ConnectionFactory {
		val options = ConnectionFactoryOptions.builder()
			.option(ConnectionFactoryOptions.HOST, "postgres")
			.option(ConnectionFactoryOptions.PORT, 5432)
			.option(ConnectionFactoryOptions.DATABASE, "postgres")
			.option(ConnectionFactoryOptions.USER, "")
			.option(ConnectionFactoryOptions.PASSWORD, "")
			.option(ConnectionFactoryOptions.DRIVER, "postgresql")
			.option(ConnectionFactoryOptions.PROTOCOL, "r2dbc")
			.option(ConnectionFactoryOptions.SSL, false)            <-------
			.build()

		val connectionFactory = ConnectionFactories.get(options)
		val pool = ConnectionPoolConfiguration.builder(connectionFactory)
			.acquireRetry(10)
			.build()

		return ConnectionPool(pool)
	}
}
Stack trace
Caused by: io.r2dbc.postgresql.client.AbstractPostgresSSLHandlerAdapter$PostgresqlSslException: Server support for SSL connection is disabled, but client was configured with SSL mode verify-full

Expected behavior/code

If ConnectionFactoryOptions.SSL was set to be false then the ssl mode should be "disable".

Possible Solution

Change this logic to handle true/false values:

@florianrusch florianrusch added the status: waiting-for-triage An issue we've not yet triaged label Oct 13, 2021
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 13, 2021
@mp911de
Copy link
Collaborator

mp911de commented Oct 13, 2021

Thanks for the report. That's indeed a bug. Do you want to submit a pull request to fix the issue?

govi20 added a commit to govi20/r2dbc-postgresql that referenced this issue Oct 23, 2021
mp911de pushed a commit that referenced this issue Oct 26, 2021
mp911de added a commit that referenced this issue Oct 26, 2021
Reformat code.

[#453][resolves #460]

Signed-off-by: Mark Paluch <[email protected]>
mp911de added a commit that referenced this issue Oct 26, 2021
Reformat code.

[#453][resolves #460]

Signed-off-by: Mark Paluch <[email protected]>
@mp911de mp911de linked a pull request Oct 26, 2021 that will close this issue
4 tasks
@mp911de mp911de added this to the 0.8.11.RELEASE milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants