Re: Socketfactory implementation example
Posted by: Todd Farmer
Date: October 28, 2014 03:00PM

Hi Ralph,

You might consider looking at the testsuite.UnreliableSocketFactory class, which is used as a test harness for simulating failover between MySQL Servers (while only truly being connected to one).

You mention two-way handshake, and it's not immediately apparent to me what you are trying to achieve. Since you seem to be interested in authentication, it might be better for you to consider writing a class which implements com.mysql.jdbc.AuthenticationPlugin. This is the standard client-side plugin infrastructure for extending authentication. There's naturally a server-side component to this as well, and I'm assuming you may be writing an authentication plugin for MySQL Server (

All of the above glosses over the fact that there are already several options for "two-way authentication". You can use SSL with client-side certificate verification, and the sha256_password authentication plugin supports distributed server RSA public key (serverRSAPublicKeyFile). Maybe look quickly at these options to see if they already meet the use case you have in mind.

Hope that helps!

Todd Farmer
MySQL @ Oracle

Options: ReplyQuote

Written By
Re: Socketfactory implementation example
October 28, 2014 03:00PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.