RoleSync
Product Information
Category | RoleSync |
Sub-category | |
Website | |
Product version | |
Documentation | |
API Documentation |
About RoleSync
The RoleSync web service provides the link between the Customer Roles defined on the institution’s backend systems, and the App Roles, defined in App Manager in the campusM Cloud.
Roles can be retrieved from a single source of data, including Authentication and Student Records systems. These Customer Role(s) determines the set of tiles and services that will be available to the end user.
If a Customer Role changes on the institution’s backend system or is no longer applicable, the SetRolesUpdated service is invoked on the campusM cloud. The next time the end user enters the app, the RoleSync web service is triggered to update the App Roles for the end user.
RoleSync requires a customer Connect Layer.
For more information on using Roles in campusM app manager, refer here.
Roles API
Below are steps for a native app login process, covering where the Roles API fits into the standard login process.
- User: Installs and opened the campusM app.
- User: Selects the relevant profile and enters their credentials when prompted.
- User: Clicks the Login button.
- App: Calls the login/roles service deployed by the campusM team on the Connect Layer server.
- campusM Connect Layer server: Authenticates the user against the institution’s AD/ LDAP server.
- If step 5 is successful, the Roles API is called, to get a list of user roles.
- If step 5 is unsuccessful, the app returns a Not Authorised response.
- campusM Connect Layer server: If step 6 is successful, returns back to the app with a successful response, including the user roles.
- campusM Connect Layer server: If step 6 is unsuccessful, no roles are returned. The App shows content only from the Default role
Integration Overview
The campusM integration for RoleSync supports the following functionality:
- Allow users to view the set of tiles services applicable to their Customer Role(s)
Integration Method
- REST Service
- Database View
- LDAP Attribute
Prerequisites
REST Service integration method
Prerequisite | Additional Information |
---|---|
Provide the Base URL | |
Authentication Options: 1. No authentication 2. Base64 username and password (system-level username/password which can get info on behalf of each user) 3. Bearer token (system-level token which can get info on behalf of each user) |
|
Indicate which method (GET or POST) and parameter values to use to retrieve user identifier (typically username, email address or student ID) |
|
Ensure response is returned (only) in the following JSON format, keeping the array structure even for single value. | {"roles": ["role1", "role2"]} |
Ensure that the APIs and web services are available for calls from the Connect Layer server(s) | |
Provide a minimum of three (3) test accounts containing comprehensive and typical data, including the following:
|
|
Database view integration method
Prerequisite | Additional Information |
---|---|
Provide Database Connection Details:
|
|
Ensure the Connect Layer server(s) can connect to the database | Required to allow Ex Libris to develop and test the created web services |
The database view must include the following columns:
|
One column for user roles is required per user and all roles must be stored in a single column separated by a comma (',') |
Provide a minimum of three (3) test accounts containing comprehensive and typical data, including the following:
|
|
LDAP property integration method
Prerequisite | Additional Information |
---|---|
Provide the LDAP attribute name that will be used to retrieve the user roles |
|
|
|
User Experience
Sample Request
https://<roleswebservice.university.edu>/rest/roles \ -X POST \ --data "client_credentials&username=campusm150" \ --user "sys-wsclient:SERVICE_PASSWORD"
Sample Response
{"roles":[“student”,”medical-student”,”second-year”]}
Offline Functionality
Configuration Options
N/A
Updating User Roles via campusM API
When a user role has changed, the institution needs to call the campusM setRolesUpdated API service. The following steps describe the update process:
- The user is currently logged in to the app.
- User roles have changed—for example, a new role was added, or an existing role removed.
- Institution: Calls the campusM setRolesUpdated API, including the user email address.
- The user launches the app.
- The app calls the startup service on campusM, which informs the app that the roles of this user require an update.
- The app calls the login service on the campusM Connect Layer, triggering the institution Roles API to retrieve the user’s new roles.
- The app presents the content and tiles according to the new user roles.
Sample SetRolesUpdated Service Request
https://campusm_client:<password>@<app URL>/axis2v3/services/CampusMService
e.g. - https://campusm_client:<password>@demo-na.campusm.exlibrisgroup.com/axis2v3/services/CampusMService
Note: URL password, orgCode and password should be provided by your Ex Libris project or support contact by opening a CRM Salesforce request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="http://campusm.gw.com/campusm"> <soapenv:Header/> <soapenv:Body> <cam:setRolesUpdatedRequest> <cam:orgCode>123</cam:orgCode> <cam:password>xyz</cam:password> <!--Optional:--> <cam:emails> <!--1 or more repetitions:--> <cam:email>user@campusM.com</cam:email> </cam:emails> </cam:setRolesUpdatedRequest> </soapenv:Body> </soapenv:Envelope>
Suggested Testing Guidelines
- User can see the tiles that match their user roles