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

CONJ 164 plugin implementation #22

Closed
wants to merge 11 commits into from

Conversation

grooverdan
Copy link

Added plugin implementation for mysql_clear_password and mysql_native_password. dialog partially there.

Adds MySQLServerCapabilities.PLUGIN_AUTH to the default capabilities of
the client.

Correctly decodes server announced capabilities by reading the second
short value representing the high values.

Parses out the plugin name from the server protocol.

Correctly produces a MySQLClientAuthPacket based on server capabilities
and extends this to potentially allow for other client authentication
plugins in future.
@rusher
Copy link
Collaborator

rusher commented Jul 21, 2015

thanks for mergin will failover version, there was a lot to do !

@grooverdan
Copy link
Author

after checking dialog plugin needs a bit more work. I'll try to add test cases too.

@rusher
Copy link
Collaborator

rusher commented Jul 24, 2015

Seem's good !

Maybe the "processPlugin" method can be put in a new Object like MySQLGreetingReadPacket ? MySQLProtocol is big enough :)

So, i'll wait for change on dialog and test cases, or maybe you can send a new request without the dialog part as first Request, i will add test cases ?

@rusher rusher mentioned this pull request Jul 24, 2015
@grooverdan
Copy link
Author

Added the bits to plugin dialog to correct it, but still needs a callback

Maybe the "processPlugin" method can be put in a new Object like MySQLGreetingReadPacket ? MySQLProtocol is big enough :)

Yes. I imagine once https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html (defaultAuthenticationPlugin) is implemented a consistent form for the rest of the plugins would be a obvious.

or maybe you can send a new request without the dialog part as first Request,

Is what's here now acceptable?

i will add test cases ?

Sounds good. Here is what I did for a python implementation also extending the client implementation to support plugins which does include tests. PyMySQL/PyMySQL/pull/353
The only thing I haven't done is the following which would need a dialog callback implemented.

INSTALL PLUGIN two_questions SONAME 'dialog_examples';
INSTALL PLUGIN three_questions SONAME 'dialog_examples';

@rusher
Copy link
Collaborator

rusher commented Nov 24, 2015

Thanks for you contribution daniel.

Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

diego.

@grooverdan
Copy link
Author

take it under the BSD-new license

@rusher rusher closed this Mar 30, 2016
@rusher
Copy link
Collaborator

rusher commented Mar 30, 2016

Close since this part has been totally rewritten, and functionnality implemented

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