Add a feature to support supplementary groups

Bug #1160348 reported by Jaime Sicam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-pam-for-mysql
Fix Released
Wishlist
Sergei Glushchenko

Bug Description

The limitation of the PAM plugin for proxy users is that a lookup for a group is limited to the initial group and not its supplementary groups as discussed in https://bugs.launchpad.net/percona-pam-for-mysql/+bug/1091566

Testing PAM authentication with initial and supplementary groups

Create proxy user:
mysql> create user ''@'' identified with auth_pam as 'mysqld,developer=developer_user';

Note:
mysqld => PAM
''@'' => Proxy user
developer => Unix Group
developer_user => Proxied User

Create proxied user:
mysql> create user developer_user@localhost identified by 'sample_password';

Configure proxy:
mysql> grant proxy on developer_user@localhost to ''@'';
mysql> FLUSH PRIVILEGES;

Create group:
#groupadd developer;

Create users:
#useradd -g developer devuser1
#passwd devuser1
#useradd devuser2
#passwd devuser2

#usermod -G developer devuser2

Testing access:
#mysql -u devuser1 -p
mysql> select user(), current_user(), @@proxy_user;
+--------------------+--------------------------+--------------+
| user() | current_user() | @@proxy_user |
+--------------------+--------------------------+--------------+
| devuser1@localhost | developer_user@localhost | ''@'' |
+--------------------+--------------------------+--------------+

#mysql -u devuser2 -p
mysql> select user(), current_user(), @@proxy_user;
+--------------------+----------------+--------------+
| user() | current_user() | @@proxy_user |
+--------------------+----------------+--------------+
| devuser2@localhost | @ | NULL |
+--------------------+----------------+--------------+

Related branches

Changed in percona-pam-for-mysql:
assignee: nobody → Sergei Glushchenko (sergei.glushchenko)
status: New → In Progress
Changed in percona-pam-for-mysql:
status: In Progress → Fix Committed
Changed in percona-pam-for-mysql:
importance: Undecided → Wishlist
Changed in percona-pam-for-mysql:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-97

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.