Page tree

Apereo CAS SSO

Agiloft supports single sign-on on the web via integration with Apereo CAS (Central Authentication Server). This allows Agiloft to have integrated authentication with products such as uPortal, BlueSocket, TikiWiki, Mule, Liferay, Moodle, and others.

From the user's point of view, the typical integrated scenario is simple. First, they log in to a CAS-enabled product such as uPortal. Then, using a hyperlink from within the portal, the user can easily access the Agiloft system. When Single Sign On via CAS is enabled, you can also configure outbound emails so that any hotlinks that they contain use CAS to authenticate the user and access Agiloft.

Technical Overview

For the typical integrated scenario described above, the following occurs:

  1. When the user logs in to the CAS-enabled product, CAS issues a secure token that is usually stored as a cookie. 

  2. When the user presses the hyperlink to access Agiloft from within the portal, Agiloft uses a client-side redirect to pass the URL contained within the hyperlink to CAS. Note that this is the same process that occurs if the user selects a CAS-aware hotlink from within an email they received from the Agiloft system.
    1. If the user is currently logged in to CAS, CAS verifies the token and redirects the user back to the URL within Agiloft. The location of the Agiloft instance is determined automatically at installation time or overridden when the Hotlink Server Root URL global variable is passed to CAS to tell it where to find the Agiloft instance after authentication is performed.

    2. If the user hasn't logged in to CAS or CAS requires reauthentication, then CAS displays a login form, authenticates the user, and, if successful, performs a client-side redirect back to the URL within Agiloft. As above, the location of the Agiloft instance is determined automatically at installation time or overridden when the Hotlink Server Root URL global variable is passed to CAS to tell it where to find the Agiloft instance after authentication is performed.
  3. When CAS sends the user back to the original URL, the redirect contains another secure token that confirms that authentication has been performed. After verifying the authenticity of the secure token,  Agiloft obtains the username via direct connection to CAS and logs in.  

Note that the hyperlink embedded within the CAS-enabled portal follows the usual rules for Agiloft hyperlinks but uses a special entry point/cas-login and has no user and password credentials specified.

Example

<a href="http://example.agiloft.com/gui2/cas-login?keyID=0&project=Demo&state=Main">http://example.agiloft.com/gui2/login.jsp?keyID=&project=Demo&state=Main</a>

The structure of the URL output is: https://AGILOFT_HOST/gui2/cas-login?KB_NAME&state=main


For  Agiloft hyperlinks, see Hyperlinks.

Setup

To configure Single Sign-on with CAS, complete the following steps on a per-KB basis:

  1. Click the Setup gear in the top-right corner and go to System > Manage Global Variables.

  2. Edit the CAS Server Login URL global variable so that it contains the URL where your CAS is located. For example, https://{yourhost}/cas/login. 

  3. Confirm that the CAS Ticket Validator global variable contains the correct CAS Server version available in your setup. If it doesn't, edit it so that it does. 

  4. If you wish to enable CAS-aware hotlinks in emails, edit the Hotlink Type global variable so that it has a value of CAS. 

  5. Embed a correctly formatted hyperlink to Agiloft within your CAS-enabled product.

Force SSO Login

To force users to log in with SSO, you can prevent them from accessing Agiloft with their username and password. Follow the steps below to make the Password field optional in the Employees table and then remove passwords for employees who should log in with SSO.

  1. First, make the Password field optional in the Employees table:
    1. Go to Setup Employees and go to the Fields tab.
    2. Edit the Password field and go to the Options tab.
    3. Find the Make this a required field setting and change the value from Yes to No.
    4. Click Finish to save the change.
  2. Next, for employees who should always use SSO to log in, reset their passwords to a null value:
    1. Go to the Employees table and select each user who should use SSO from this point on.
      Don't select every user in your system. It's best to leave at least one administrator unchanged, if not the whole admin team, in case you encounter SSO issues in the future that prevent users from logging in with SSO.
    2. Click Edit Fields in the action bar.
    3. Select Password, then click Next.
    4. On the Update tab, select A formula.
    5. In the Password field, enter the variable $global.null and click Next.
    6. On the Confirm tab, clear the Run rules and Update defaults checkboxes, then click Finish.

Now, users whose passwords were reset can only log in with SSO.

If you also allow some external users to log in with SSO, repeat the process for the External Users table.