Skip to content
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

Can not configure allowPublicKeyRetrieval via Options #59

Open
m-kay opened this issue Feb 8, 2023 · 1 comment
Open

Can not configure allowPublicKeyRetrieval via Options #59

m-kay opened this issue Feb 8, 2023 · 1 comment

Comments

@m-kay
Copy link

m-kay commented Feb 8, 2023

Im trying to configure allowPublicKeyRetrieval=true via options in version 1.1.3 but this does not seem to work.

When creating the ConnectionFactory with

val options = ConnectionFactoryOptions.builder()
    .option(ConnectionFactoryOptions.DRIVER, "mariadb")
    .option(ConnectionFactoryOptions.HOST, "localhost")
    .option(ConnectionFactoryOptions.PORT, 63426)
    .option(ConnectionFactoryOptions.DATABASE, "my_database")
    .option(ConnectionFactoryOptions.USER, "test")
    .option(ConnectionFactoryOptions.PASSWORD, "password")
    .option(Option.valueOf("allowPublicKeyRetrieval"), true)
    .build()
val connectionFactory = ConnectionFactories.find(options)
println(connectionFactory.toString())

the following configuration is printed where allowPublicKeyRetrieval is not set correctly.

MariadbConnectionFactory{configuration=MariadbConnectionConfiguration{database='LOANS_SERVICE', hosts={[localhost:63426]}, connectTimeout=PT10S, tcpKeepAlive=false, tcpAbortiveClose=false, transactionReplay=false, password=*, prepareCacheSize=250, socket='null', username='test', allowMultiQueries=false, allowPipelining=true, connectionAttributes=null, sessionVariables=null, sslConfig=SslConfig{sslMode=DISABLE, serverSslCert=null, clientSslCert=null, tlsProtocol=null, clientSslKey=null}, rsaPublicKey='null', cachingRsaPublicKey='null', allowPublicKeyRetrieval=false, isolationLevel=null, useServerPrepStmts=false, autocommit=true, tinyInt1isBit=true, pamOtherPwd=, restrictedAuth=null}}

It seems that this option is not taken into account in MariadbConnectionConfiguration::fromOptions

rusher added a commit that referenced this issue Feb 8, 2023
@rusher
Copy link
Collaborator

rusher commented Feb 8, 2023

will be corrected in 1.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants