| 1 | = LDAP UI Installation = |
| 2 | |
| 3 | Native LDAP store doesn't come with a GUI. Therefore, as administrators we may have to provide a nice user interface to our users. This UI should have the capability of changing details of users password resets, etc. To do these actions there are lot of open source packages as well as commercialized products. |
| 4 | |
| 5 | On this tutorial we will go through two UI setups that will focus on different outputs. |
| 6 | |
| 7 | 1/ Apache Directory Studio (For Admins) |
| 8 | |
| 9 | Download and install |
| 10 | The latest version of Apache Directory Studio can be downloaded from the Apache Directory Studio Downloads page, at this address : http://directory.apache.org/studio/downloads.html . |
| 11 | |
| 12 | Installation steps https://directory.apache.org/studio/users-guide/apache_directory_studio/download_install.html |
| 13 | |
| 14 | Once the installation succeeds open the Apache Directory Studio. |
| 15 | |
| 16 | Creating the ldap connection: |
| 17 | |
| 18 | Go to File --> new --> ldap browser --> ldap connection --> next |
| 19 | |
| 20 | Enter your deatils: |
| 21 | |
| 22 | Connection Name: LDAP Server |
| 23 | Hostname: ldap://idp.instXY.ac.lk |
| 24 | port: 389 |
| 25 | Encrypted Method: Use STARTTLS |
| 26 | Provider: Apache Directory LDAP Client API |
| 27 | |
| 28 | Next |
| 29 | |
| 30 | Authentication Method: Simple Authentication |
| 31 | Bind Dn: cn=admin,dc=thilinapathirana,dc=xyz |
| 32 | Bind Password: |
| 33 | |
| 34 | Click Check Authentication to make sure your credentials work. For the first time it ask to trust the self signed certificate. |
| 35 | |
| 36 | Select Always trust this Certificate and click OK |
| 37 | |
| 38 | Then click Finish. |
| 39 | |
| 40 | To connect, double click the connection just created from Connections list. |
| 41 | |
| 42 | Once connected you can browse through the directory using the LDAP Browser. |
| 43 | |
| 44 | When modifying entries you may use a ldif file or the GUI. |
| 45 | |
| 46 | Using GUI to create an OU: |
| 47 | |
| 48 | Select root location for the OU (eg. dc=instXY,dc=ac,dc=lk) |
| 49 | Select New Entry on Right click Menu |
| 50 | Then Create entry from Scratch --> Next |
| 51 | Select OrganizationalUnit and click Add and Next |
| 52 | Type OU as the RDN and the desired value in-front of it then Next and Finish |
| 53 | |
| 54 | |
| 55 | Adding a User Group |
| 56 | |
| 57 | Select root location for the OU (eg. ou=Group,dc=instXY,dc=ac,dc=lk) |
| 58 | Select New Entry on Right click Menu |
| 59 | Then Create entry from Scratch --> Next |
| 60 | Select groupofNames and click Add and Next |
| 61 | Type CN as the RDN and the desired value in-front of it then Next |
| 62 | |
| 63 | You will prompt with a user add window as DN Editor. Select a user from browser and click OK |
| 64 | |
| 65 | |
| 66 | Adding a new User |
| 67 | |
| 68 | Select root location for the OU (eg. ou=People,dc=instXY,dc=ac,dc=lk) |
| 69 | Select New Entry on Right click Menu |
| 70 | Then Create entry from Scratch --> Next |
| 71 | Select inetOrgPerson and click Add |
| 72 | Select eduPerson and click Add and Next |
| 73 | Type uid as the RDN and the desired usernsme value in-front of it then Next |
| 74 | |
| 75 | Enter desired values for cn (First Name) and sn (last Name) |
| 76 | |
| 77 | Enter new attribute from right lick menu of as userPassword and click finish. when it asks, enter the new users password and select Plaintext as the hash method and click OK |
| 78 | |
| 79 | You may add any new attribute as well. |
| 80 | |
| 81 | Then click finish |
| 82 | |
| 83 | |
| 84 | More documentation can be found on https://directory.apache.org/studio/users-guide/ |
| 85 | |
| 86 | |
| 87 | 2/ Keycloak Server (For End Users) |
| 88 | |
| 89 | Keycloak is an open source identity and access management solution, we will use keycloak to provide a friendly self care portal to users allowing services such as password resets. |
| 90 | |
| 91 | wget https://downloads.jboss.org/keycloak/4.4.0.Final/keycloak-4.4.0.Final.tar.gz |
| 92 | tar -xvzf keycloak-4.4.0.Final.tar.gz |
| 93 | cd keycloak-4.3.0.Final/bin/ |
| 94 | ./add-user-keycloak.sh -r master -u ###UserName### -p ###Password### |
| 95 | vim standalone/configuration/standalone.xml |
| 96 | ./standalone.sh -b 0.0.0.0 & |