Let's take a look at the tasks that Tom (the EMM administrator) and Kim (the device owner) have to do, from downloading WSO2 EMM to registering the Android device.
Before you begin
EMM supports devices on Android version 4.2.x to 7.0 (Android Jelly Beans to Nougat).
Install Oracle Java SE Development Kit (JDK) version 1.7.* or 1.8.* and set the
JAVA_HOMEenvironment variable. For more information on setting upJAVA_HOMEon your OS, see Installing the Product.Start WSO2 EMM by navigating to the
<EMM_HOME>/bindirectory using the command prompt and executingwso2server.bat --run(for Windows) orwso2server.sh(for Linux.)
Example: Starting WSO2 EMM on a Linux OS.cd <EMM_HOME>/bin ./wso2server.shAccess the WSO2 EMM console by navigating to
https://<EMM_HOST>:<EMM_PORT>/emm.
Let's get started!
Configuring WSO2 EMM
The MobX system administrator needs to do the following configurations to allow users like Kiim to register their devices with WSO2 EMM and to allow EMM administrators like Tom to monitor the devices.
Configuring the email client
Configure the email client to send out registration confirmation emails through WSO2 EMM to the respective users.
In WSO2 EMM, user registration confirmation emails are disabled by default, so the admin needs to provide the required configuration details to enable it.
Create an email account to send out emails to users that register with WSO2 EMM (e.g., tom-mobx@gmail.com).
Open the
<EMM_HOME>/repository/conf/axis2/axis2.xmlfile, uncomment themailtotransportSender section, and configure the EMM email account.<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender"> <parameter name="mail.smtp.host">smtp.gmail.com</parameter> <parameter name="mail.smtp.port">587</parameter> <parameter name="mail.smtp.starttls.enable">true</parameter> <parameter name="mail.smtp.auth">true</parameter> <parameter name="mail.smtp.user">synapse.demo.0</parameter> <parameter name="mail.smtp.password">mailpassword</parameter> <parameter name="mail.smtp.from">synapse.demo.0@gmail.com</parameter> </transportSender>Example:
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender"> <parameter name="mail.smtp.host">smtp.gmail.com</parameter> <parameter name="mail.smtp.port">587</parameter> <parameter name="mail.smtp.starttls.enable">true</parameter> <parameter name="mail.smtp.auth">true</parameter> <parameter name="mail.smtp.user">tom-mobx</parameter> <parameter name="mail.smtp.password">$mobx1234</parameter> <parameter name="mail.smtp.from">tom-mobx@gmail.com</parameter> </transportSender>
Specifying the WSO2 EMM server
WSO2 EMM uses a web agent to enroll devices. Tom follows the steps given below to configure the agent and the device management app to communicate with the WSO2 EMM server:
Tip by Tom
If you are directly editing the JSON files, be sure to use straight double quotes (") instead of curly double quotes (”), or you will run into errors.
Correct: "
Wrong: ”
Open the
config.jsonfile that is in the<EMM_HOME>/repository/deployment/server/jaggeryapps/emm-web-agent/app/confdirectory. This file configures the web agent to handle device enrollments.
Configure thehostattribute that is undergeneralConfigby providing the entire server address.Example:
"generalConfig" : { "host" : "http://10.10.10.253:9763", "companyName" : "WSO2 Enterprise Mobility Manager", "browserTitle" : "WSO2 EMM", "copyrightText" : "\u00A9 %date-year%, WSO2 Inc. (http://www.wso2.org) All Rights Reserved." }Open the
config.jsonfile that is in the<EMM_HOME>/repository/deployment/server/jaggeryapps/emm/app/confdirectory. This file configures WSO2 EMM to manage devices.
Configure thehostattribute that is undergeneralConfigby providing the entire server address.Example:
"generalConfig" : { "host" : "https://10.10.10.253:9443", "companyName" : "WSO2 Carbon Device Manager", "browserTitle" : "WSO2 Device Manager", "copyrightPrefix" : "\u00A9 %date-year%, ", "copyrightOwner" : "WSO2 Inc.", "copyrightOwnersSite" : "http://www.wso2.org", "copyrightSuffix" : " All Rights Reserved." }Start WSO2 EMM.
If you started WSO2 EMM previously, stop it usingCRTL+Cand restart WSO2 EMM../wso2server.sh
Creating users and a sample policy
Follow the steps given below to create the two users Kim and Tom, and a configured passcode policy. This is done so that it will be easy for you to try out the EMM quick start guide.
Copy the file to a preferred location, navigate to the file via the command prompt, and run the script.
cd <EMM_QSG_SAMPLE-PACK> ./emm-qsg.shEnter your email address when prompted.
Example:
Enter your email address and press enter : kim@wso2.com
Check out the WSO2 EMM dashboard by signing in to the WSO2 EMM console using tom as the username and tomemm as the password: https://<EMM_HOST>:<EMM_PORT>/emm.
You will then see the new emm-user role, 3 new policies, and 2 new users that were added using these scripts.
Updating the passcode policy
As a security measure, the MobX management has requested Tom to update the passcode policy for all Android devices so that a device user can only enter the wrong password four times. If a user fails to enter the correct password in the fourth attempt, the device will not be accessible for 15 minutes. This can be regulated in WSO2 EMM by updating the passcode policy that was already in place. Tom follows the steps given below to update the policy:
Access the WSO2 EMM console by navigating to
https://<EMM_HOST>:<EMM_PORT>/emm.Enter tom as the username and tomemm as the password.
Click LOG IN.
The EMM console dashboard appears, giving you easy access to the devices, users, and policies in your organization.
Click View under POLICIES.
Click the edit logo that is on the passcode policy for Android devices.
Update the passcode profile that is already in place by defining the maximum fail attempts as 4, and click CONTINUE.
The passcode policy that was created for this scenario has the following groups assigned. You can optionally update the groups.
Tom had selected the default ownership type ANY for the set device ownership type.
Tom has selected the set user role/s option and then selected the emm-user role from the item list.
Tom has selected Enforce as the action that needs to be carried out when a device has not complied with a policy.
Click CONTINUE.
Optionally, you can update the name and the description of the policy.
Click SAVE to save the configured profile or click SAVE & PUBLISH to save and publish the configured profile as an active policy to the database. It is mandatory that the policy is assigned to Kim's mobile device, so Tom clicks SAVE & PUBLISH to make the policy active immediately.