Posts

[APIM] Send emails to users upon self-sign up aproval

When using the self sign up of WSO2 API manager, the user needs to wait for the admin to approve their signup request. However when the admin approves/rejects the request, users may like to receive an email with the status of the approval. This can be achieved by the extension points provided by APIM. In this article we will consider how this can be achieved, First step is to set up the user sign up work flow as described in the documentation[1]. After following the documentation, you should be able to self sign up and attach a workflow to the to the self sign up process. After self signup, you can login to the admin portal of APIM and approve or reject a request to sign up. This portal can be address through https://HOSTNAME :PORT /admin for example https://10.100.9.174:9443/admin Next we need to extend from UserSignUpWSWorkflowExecutor of APIM and write your own logic to send out an email. In this case, we have overriden the complete method of UserSignUpWSWorkflowExecutor. In the

MDM vendor singing and MDM APNS certificate generation for WSO2 Iot server

Image
When we look at how Apple has created the device management protocol for iOS devices, one thing that we notice is they have tried to make the process as secure as possible. In this article, we will look at what is the MDM APNS certificate and how we can generate and use them. When managing iOS devices, the device management commands are typically executed by a native client available in the iOS operating system itself. When a device management server needs to send a command to this client, the command has to be sent though Apple APNS server. However, since these commands are executed by the operating system it self, using a general APNS certificate, does not make sense. Therefore Apple has made it mandatory that the device management servers use a special MDM APNS certificate when sending commands to a device. These certificates expire annually and the admins have to renew then annually. MDM APNS certificate generation is bit of a complex process and to make things simpler, I ha

iOS device policies in WSO2 Device cloud

Image
Today, many organizations allow employees to bring their devices to work and this introduces new risks to corporate data as people typically use their devices for work purposes. To minimise the risk of exposing corporate data to unintended parties, organization may want to manage the devices of their employees and enforce rules or policies on what each user can do with their devices. WSO2 device cloud is capable of managing devices and enforcing strict policies on devices to increase the information security of an organization. Let's take a look at the policies [1] that are available for iOS devices in WSO2 device cloud. Passcode Policy This is one of the most common policies that provides an OS level security to a device. With the passcode policy, administrators can make sure that every user has a strong passcode for their devices and make the user adhere to the the rules defined by the administrator when setting up a password. When a passcode policy is set on a device

Android device auto enrollment / self enrollment in WSO2 EMM

Image
WSO2 EMM provides capability to auto enroll a device with the server. This is done through the use of mutual SSL/TSL underneath to authenticate clients. To follow this section basics of mutual SSL is needed[1]. Let's see how the enrollment flow works. A user with adequate permission to enroll devices access the certificate section of WSO2 EMM. User generates a certificate signed by a certificate authority, upload this certificate via the certificate section in EMM console. When generating the certificate, user must make sure they provide the serial number of the device as the common name of the certificate. When uploading the certificate to EMM, it is expected to provide the same serial number as well. User also embed the generated client certificate in the Agent and compiles the Agent. Please note that for each device that needs to enroll with EMM needs to have a certificate embedded. As described in the basics of mutual SSL article[1], when the user starts the An

Mutual SSL/TSL authentication

Image
In contrast to usual 1-way SSL where client verifies the identity of the server, in mutual SSL, the server will also validate the identity of the client, so that both parties trust each other. This build a system with very tight security and avoid any need of username/password to be presented from the client, as long as the server is aware of which certificate belongs to which client. Let's take a look at how it all works, Before the process begins the client and server's certificates are stored in there relevant keystores. In case of Java these are jks files, and in WSO2 products certificates are stored in wso2carbon.jks and clienttruststore.jks in server side while the Android agent side certificates are stored in bouncycastle keystores(bks) files found in res/raw in Android agent source code.  These certificates are signed and issued by a certificate authority that both client and server are capable of communicating freely.  1. Client tries to access a protected r

Android device owner concepts

Image
With Android 5.0, Google has introduced Device owner and device profile concepts to make android enterprise ready. Device owner app is an application with special privileges to perform task such as monitor and manage settings and other privileged tasks. This means in a literal sense,the devices ownership is given to the organization managing it making the device owner concept ideal for COPE scenario. Once the device ownership is assigned to an app, in order to remove it, the device needs to be factory reseted, for example in a situation where the device needs to be given to a different user.  When the device ownership is given to a specific app, the app gets access to a set of Android APIs that are only available to device owner app. These APIs are not available to regular Android apps. At a given time there can only be one device owner app in a device, which prevents another device owner app overriding the policies enforced by the first device owner app.  The service app prov

Enroll an Android device with WSO2 EMM

Image
If you need to quickly setup and have a look at the capabilities of WSO2 EMM; easiest to configure and enroll is an Android device. First of all, download, WSO2 EMM from here .  Documentation provides all the information required for downloading the product.  IMPORTANT: Following only shows the out of the box experience of WSO2 EMM and it not a production ready setup. Prior to running the server, make sure you have, a. Installed  Oracle Java SE(JDK/JRE ) version 7 or 8 b. Both the server machine and the Android device you are enrolling are on the same WiFi   network. Once you download the server, extract the zip file to a desired location. Now from command prompt, go to the location of the extracted folder; lets call this EMM_HOME folder.       3. From command prompt, go to bin directory inside EMM_HOME and start the server by issuing following command, On windows -  wso2server.bat On Linux/Mac -  sh wso2server.sh      Once the server start up complete, in the terminal