[MXS-2294] Document how to configure user and group mapping for PAM authenticators Created: 2019-01-26 Updated: 2019-03-13 Resolved: 2019-02-25 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Authenticator, Documentation |
| Affects Version/s: | 2.3.3 |
| Fix Version/s: | 2.3.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Esa Korhonen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Sprint: | MXS-SPRINT-75, MXS-SPRINT-76 | ||||||||||||||||||||||||||||||||
| Description |
|
MaxScale's PAM authenticators support user and group mapping, but the documentation doesn't show how to configure it: https://mariadb.com/kb/en/mariadb-maxscale-23-pam-authenticator/ The process should probably be documented, similar to the MariaDB Server documentation that describes how to configure it from start to finish: Here's how I was able to configure it: I started with a 2-node Galera Cluster and a MaxScale 2.3.3 instance with the following configuration:
1.) First, on both backend nodes, I created the monitor user in PAM and set the user's password:
2.) Then, on both backend nodes and the maxscale node, I created the PAM user and group that I want to test:
3.) Then, on both backend nodes and the maxscale node, I also had to create a PAM user with the same name as the MariaDB user that my group is going to be mapped to:
Because of this: 4.) Then, on both backend nodes and the maxscale node, I compiled and installed the pam_user_map PAM module:
5.) Then, on both backend nodes and the maxscale node, I configured my user and group mapping in /etc/security/user_map.conf:
6.) Then, on both backend nodes, I installed the PAM authentication plugin:
7.) Then, on both backend nodes and the maxscale node, I configured the PAM service in /etc/pam.d/mariadb:
8.) Then, on both backend nodes, I gave the mysql user access to /etc/shadow:
9.) Then, on the maxscale instance, I gave the maxscale user access to /etc/shadow:
10.) Then, on both backend nodes, I created my monitor user:
11.) Then, on both backend nodes, I created my dba user:
12.) Then, on the backend nodes, I created my anonymous proxy user. First, I had to do some cleanup:
Because of this: https://mariadb.com/kb/en/library/create-user/#fixing-a-legacy-default-anonymous-account And then I created my anonymous proxy user:
13.) Then, I restarted both backend nodes and maxscale. 14.) Then, I tested it out:
|