PAM: Use MySQL proxy user and LDAP failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-pam-for-mysql |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Hi,
I have used bzr to get source and have compiled plugin. Then i have installed it onto one server (and one client). That was easy part.
It DOES proper authorization against LDAP and that part is working fine (single user use).
What is NOT working is use of MySQL proxy users (http://
I have spend hours looking for solution, and it is still not clear me how user mapping has to be done...
My Setup on MySQL server side (used latest MySQL 5.5.28, this plugin should work with it?):
---8<---
mysql> CREATE USER ''@'' IDENTIFIED WITH auth_pam AS 'mysql, mysql_ro=readonly';
mysql> CREATE USER 'readonly'
mysql> GRANT SELECT ON *.* TO 'readonly'
mysql> GRANT PROXY ON 'readonly'
---8<---
In LDAP i have my posixAccount set (and also my posixGroup). But, i have created another LDAP posixGroup, to fine grain access:
---8<---
dn: cn=mysql_
cn: mysql_ro
gidnumber: 223
memberuid: predrag_zecevic
objectclass: posixGroup
objectclass: top
---8<---
Is this OK? I would expect PAM plugin to check not only primary group but also secondary groups...
Then, when i connect to MySQL server, following attributes are asked from LDAP server (from access log):
---8<---
[17/Dec/
re shadowFlag shadowInactive shadowLastChange shadowMax shadowMin shadowWarning uidNumber"
[17/Dec/
---8<---
So, it has returned NO groups at all (although it has matched my account) and whole thing fails:
---8<---
mysql -hmy-host -upredrag_zecevic -pmy-password -e "SELECT USER(), CURRENT_USER(), @@proxy_user;"
+------
| USER() | CURRENT_USER() | @@proxy_user |
+------
| <email address hidden> | @ | NULL |
+------
---8<---
I guess that mapping wasn't done at all (according to docs this has to do it: "CREATE USER ''@'' IDENTIFIED WITH auth_pam AS 'mysql, mysql_ro=
Do you have any idea how to fix this problem?
I am not sure if i have set LDAP entries (that is 389-DS from Fedora Project) for group mapping properly.
Documentation on Percona site is not of big usability...
Also, i still do NOT understand why we have to install plugin (at least dialog.so) on client side?
Isn't purpose of PAM client (on server box) to provide authorization against LDAP?
Many thanks for any suggestion, from anybody.
Regards.
Changed in percona-pam-for-mysql: | |
status: | New → Incomplete |
Forgot to mention MySQL version of packages downloaded from dev.mysql.com (if that is relevant):
MySQL-client- 5.5.28- 1.el6.x86_ 64 5.5.28- 1.el6.x86_ 64 5.5.28- 1.el6.x86_ 64 compat- 5.5.28- 1.el6.x86_ 64
MySQL-server-
MySQL-shared-
MySQL-shared-
All running on CentOS 6 x86_64
So, does anyone has idea how to solve this problem?
Thank you.