Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using LDAP (AD) for MySQL authentication

Tags:

I'm trying to come up with a plan to allow users to auth with a MySQL database (many, actually) using LDAP. More specifically, ActiveDirectory. Database will likely be accessed through applications, not web. What are my options?

EDIT:

Okay. It seems that there is no "official" way to allow authentication on MySQL using LDAP. What other options exist? Can we synchronize LDAP users and passwords to the MySQL user table?

like image 750
snicker Avatar asked Aug 25 '09 18:08

snicker


People also ask

Does MySQL support LDAP?

MySQL uses LDAP to fetch user, credential, and group information. LDAP pluggable authentication provides these capabilities: External authentication: LDAP authentication enables MySQL Server to accept connections from users defined outside the MySQL grant tables in LDAP directories.

Can LDAP be used for authorization?

LDAP authorization can be applied only to LDAP authenticated users. LDAP users must belong to one or more LDAP groups, or have one or more LDAP attributes that map to roles in App Connect Enterprise, with appropriate access to the admin REST API.


1 Answers

this is possible with mysql proxy. there's a few things you need to know to make this work:

  • mysql proxy can execute shell commands
  • mysql proxy can intercept and rewrite authentication

these two pages will help you get started:

  • example of running a shell command: http://forge.mysql.com/tools/tool.php?id=79
  • example of intercepting and rewriting authentication: http://web.archive.org/web/20150329071023/http://jan.kneschke.de/2009/6/25/mysql-proxy-roles/
like image 72
longneck Avatar answered Oct 19 '22 06:10

longneck