[Maria-discuss] Getting PAM auth to work with JDBC
I've got the PAM authentication to work, as long as I use a plain command line MariaDB client or HeidiSQL. But I need things to work with JDBC as well. I've found some instructions what seem to indicate that I need to somehow make the JDBC connection use SQL and plain-text authentication. But I have not been able to find specific instructions on doing that. (The instructions, I've seen seem to mainly point to other documents in a circular/byzantine way.) Has someone got the combination of a JDBC client and an PAM-enabled MariaDB server to work? If so: Can you shed some light on the steps you went through? Thanks in advance. -- Regards, Troels Arvin http://troels.arvin.dk
I have. Not much time to reply, but one major thing I had to do form my notes: 4. modify my.cnf and add line with: pam_use_cleartext_plugun requires restart!!!! For Old Workbench to work with this, set the environment variable LIB_MYSQL_CLEARTEXT_PLUGIN=1 For recet Workbench, in the connections dialog, on the Advanced tab, check Enable Cleartext Authentication Plugin Problem: Password is sent uncrypted!!!! If i remember correclty, nothing needs to happen on JDBC-side to get this to work. But, I had the LIB_MYSQL_CLEARTEXT_PLUGIN=1 in the environment. YMMV. HTH, Adam On Tue, Jul 7, 2015 at 5:44 AM, Troels Arvin <troels@arvin.dk> wrote:
I've got the PAM authentication to work, as long as I use a plain command line MariaDB client or HeidiSQL. But I need things to work with JDBC as well.
I've found some instructions what seem to indicate that I need to somehow make the JDBC connection use SQL and plain-text authentication. But I have not been able to find specific instructions on doing that. (The instructions, I've seen seem to mainly point to other documents in a circular/byzantine way.)
Has someone got the combination of a JDBC client and an PAM-enabled MariaDB server to work? If so: Can you shed some light on the steps you went through?
Thanks in advance.
-- Regards, Troels Arvin http://troels.arvin.dk
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
I completed the MariaDB Connector/J implementation a bit more and it now responds to mysql_clear_password (if pam_use_cleartext_plugin was set) and it responds with a password the dialog plugin is requested (CONJ-164). https://github.com/MariaDB/mariadb-connector-j/pull/22 https://github.com/grooverdan/mariadb-connector-j/tree/CONJ-164 for a branch to try out for yourself. Feedback welcome (on CONJ-164) especially on how to implement a callback for the dialog plugin. Code contributions on a GUI also welcome. ----- On 7 Jul, 2015, at 9:44 PM, Troels Arvin troels@arvin.dk wrote:
I've got the PAM authentication to work, as long as I use a plain command line MariaDB client or HeidiSQL. But I need things to work with JDBC as well.
I've found some instructions what seem to indicate that I need to somehow make the JDBC connection use SQL and plain-text authentication. But I have not been able to find specific instructions on doing that. (The instructions, I've seen seem to mainly point to other documents in a circular/byzantine way.)
Has someone got the combination of a JDBC client and an PAM-enabled MariaDB server to work? If so: Can you shed some light on the steps you went through?
Thanks in advance.
-- Regards, Troels Arvin http://troels.arvin.dk
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- -- Daniel Black, Engineer @ Open Query (http://openquery.com.au) Remote expertise & maintenance for MySQL/MariaDB server environments.
participants (3)
-
Adam Scott
-
Daniel Black
-
Troels Arvin