Even though the Documentation on the user-setup is quite good, the Documentation about groups and ldap is missing some informations. So here is what I had to do, to get this working.
In this environment I already had two IPA-Servers set up with replication. These will take care of LDAP and DNS for me. My Client is joined to the IPA-Domain.
First, let's create a resouce for our ldap-connection, the parameters are pretty self explanatory.
[archy@icinga2 ~]$ sudo vim /etc/icingaweb2/resources.ini
...
[auth-ipa]
type = "ldap"
hostname = "ipasrv02.archyslife.lan"
port = "636"
root_dn = "dc=archyslife,dc=lan"
bind_dn = "uid=icinga-bind,cn=users,cn=accounts,dc=archyslife,dc=lan"
bind_pw = "some_secret_password"
encryption = "ldaps"
...
Next, let's take care of the user-authentication using our LDAP-Connection.
[archy@icinga2 ~]$ sudo vim /etc/icingaweb2/authentication.ini
...
[ldap-user-auth]
backend = "ldap"
resource = "auth-ipa"
user_class = "inetOrgPerson"
user_name_attribute = "uid"
...
And let's make groups accessible through ldap.
[agerth@icinga2 ~]$ sudo cat /etc/icingaweb2/groups.ini
...
[ldap-group-auth]
backend = "ldap"
resource = "auth-ipa"
user_class = "member"
user_name_attribute = "uid"
group_class = "groupofnames"
group_name_attribute = "cn"
group_filter = "cn=icinga-*"
user_backend = "ldap-user-auth"
...
Last, create a new administrator-role for your ldap-admins group. In my case 'icinga-admins'.
[archy@icinga2 ~]$ sudo cat /etc/icingaweb2/roles.ini
...
[ldap-admins]
groups = "icinga-admins"
permissions = "*"
...
That concludes LDAP-Integration, you are now able to login and have administrative rights with users that are member of the icinga-admins group.
Feel free to comment / suggest a topic.
Comments
Post a Comment