Enportal/5.5/admin/user administration/ldap configuration/tutorial
Overview
Using the LazyLoad Process
In enPortal, you can use the "LazyLoad" process to create Portal users "On-Demand" so that when a user tries to log in to enPortal, the portal will contact LDAP and create this user and authenticate it.
- You have a local ldap server running on ldap://laptop:10565
- In dc=example-corp,dc=com you have created three users: jadams, jsmith, jtaylor within ou=people.
- Create an ldapRepository pointing to the ldap server and give it credentials to login.
- Create a domainAdapter "testOne". Since you do not have a RoleAdapter you need a way of associating roles to the users defined in this domain. So create a /HelpDesk role; and assign it as the defaultRole using the General tab; change the pluggable authenticator to "com.edgetech.eportal.session.impl.LDAPSessionAuthenticatorExtendedWithLazyLoad". Then switching to the Search tab you fill in Search Base ="ou=people,dc=example-corp,dc=com".
- Save the changes.
- Open a new browser (or log out of the existing portal session) and attempt to log in to the portal using: domain = "testOne", user = "jadams", password = "pw".
- The portal then:
- receives the request.
- accesses LDAP to see if the user can authenticate. If there is a failure, it returns to the login page.
- on auth success; checks to see if user is defined. If the user exists, skip the next step.
- creates the user account in the testOne domain, if the user does not exist.
- checks to see if the domain dn or user dn is has any ldap group assignments (this will only occur if RoleAdapters were defined for the LDAPRepository definition). Reset the role assignments.
- checks to see if the user has a role assignment. If so, it looks up provisioned content and renders the page.
Making LDAP Groups Map to enPortal Roles
If the decision is made to use LDAP, you should also define Groups in LDAP that can be used to create roles in the portal. The following is a scenario:
- Inside of ou=groups,dc=example-corp,dc=com
- Create three Groups named: HelpDesk, Operator, and Manager.
- Inside of these Groups edit the membership to assign Users to Groups.
- Logging back into the portal, navigate to the LDAPRepository that was created and define a new RoleAdapter named "/MSP" (The fully qualified portal role). On the Search Base In enter "ou=groups,dc=example-corp,dc=com".
- Then for each Group add the following memberships:
- Manager assigned jadams as members.
- Operator assigned jadams, jsmith as members.
- HelpDesk assigned jadams, jsmith, jtaylor as members
- Run portal ldapsync command and the roles /MSP/Manager, /MSP/Operator, and /MSP/HelpDesk are defined.
- Provision some content (views / channels) to these roles.
- Log out and then log in using: domain = "testOne", user = "jsmith", password = "pw".
- The user will be logged in and they will have /portalAdministration, Operator and HelpDesk roles available. Note: it is recommended to remove /portalAdministration as the default role for the DomainAdapter.
Importing a User Without a Role Adapter Defined
It is possible to import a user without a Role adapter defined. However, a Role must be assigned to the user for the user to be able to log in to the system. The best way for the Role assignment to be made is for the Role assignment to be imported with the user.
Passing Single Sign-on Credentials to Applications
Sometimes you will want to set the Single Sign-on (SSO) configuration for products integrated into AppBoard/enPortal that are also using LDAP. The goal is to have AppBoard/enPortal pass the login credentials from LDAP to the back-end application, when the same credentials are used to access enPortal and the back-end application.
You can use the following expression when configuring the SSO token. It will pass the same credentials entered by the user logging in to AppBoard, to the backend application:
- username: ${shim:session.credentials.username}
- password: ${shim:session.credentials.password}