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

Revert "Support for authentication plugins" #644

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

cmurphy
Copy link
Contributor

@cmurphy cmurphy commented Jan 22, 2015

Reverts #640

Authentication plugins are not supported on older versions of MySQL [1], which are installed by default on most supported operating systems. We would like to come up with a better way of supporting this feature without breaking the providers for older version of MySQL. In the mean time, we're reverting this pull request while we work out an alternate implementation.

[1] http://dev.mysql.com/doc/refman/5.5/en/pluggable-authentication.html

@cmurphy
Copy link
Contributor Author

cmurphy commented Jan 22, 2015

@dveeden we discovered that #640 broke our acceptance tests, we think because authentication plugins aren't supported in the default mysql version. Example error:

Error: Could not prefetch mysql_user provider 'mysql': Execution of '/usr/bin/mysql -NBe SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD, PLUGIN FROM mysql.user WHERE CONCAT(user, '@', host) = 'root@127.0.0.1'' returned 1: ERROR 1054 (42S22) at line 1: Unknown column 'PLUGIN' in 'field list'

We'd love to see another pull request for this where some of the implementation details for supporting different versions are worked out.

underscorgan pushed a commit that referenced this pull request Jan 22, 2015
Revert "Support for authentication plugins"
@underscorgan underscorgan merged commit 0623654 into master Jan 22, 2015
@dveeden
Copy link
Contributor

dveeden commented Jan 24, 2015

I've updated the code to include version specific code:
Original:

SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, 
MAX_UPDATES, PASSWORD, PLUGIN 
FROM mysql.user WHERE CONCAT(user, '@', host) = 'root@127.0.0.1'

New:

SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, 
MAX_UPDATES, PASSWORD /*!50508 , PLUGIN */ 
FROM mysql.user WHERE CONCAT(user, '@', host) = 'root@127.0.0.1'

This statement works on all MySQL version, but will only return the PLUGIN column for the versions (5.5.7+) which support plugins.

https://dev.mysql.com/doc/refman/5.7/en/comments.html

@DavidS DavidS deleted the revert-640-auth-plugins branch July 14, 2015 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants