OAM Securing Mobile applications and working with social identities
Exercise 1: Setting up the lab
Practice 1.1: Import ova file
1. Make sure you have VBox installed and configured on your laptops https://www.virtualbox.org/wiki/Downloads
2. Download the AdvancedAccessWorkshopR2PS1.ova file into your laptop.
3. Open the VBox and click on Import Appliance
4. Choose the downloaded file and import.
5. Change the RAM settings to 5900MB
6. Start the import
7. The Virtual machine is successfully created.
8.Login to the Virtual machine. Username is oracle and Password is Oracle123
Practice 1.2: Edit hosts file
1. Obtain the IP of the guest virtual machine by typing ifconfig from inside the terminal.
The IP address after inet addr is the IP of this machine(192.168.56.101)
2. Identify host file in the guest operating system
3. Edit hosts file. Create the following entry for oam.example.com which is host alias in the VM:
Practice 1.3: Start the servers
The following are the relevant directories:
a) MW_HOME - /app/u01/middleware
b) OUD_INSTANCE - /app/u01/middleware/asinst_1
c) IAM_HOME - /app/u01/middleware/Oracle_IDM1
d) DOMAIN_HOME - /app/u01/middleware/user_projects/domains/idm_domain
f) DB_HOME - /app/u01/product/11.2.0/dbhome_1
g) ADT_HOME (Android Development Tools) - /home/oracle/android_dev/adt-bundle-linux-x86_64-
20130219 (containing Eclipse IDE and Android SDK)
h) LABWORKSPACE - /home/oracle/labworkspace (Containing lab files)
i) FQDN for the machine/VM is oam.example.com
j) Key URLs:
OAM Console http://oam.example.com:7001/oamconsole (weblogic/Oracle123)
WLS Console http://oam.example.com:7001/console (weblogic/Oracle123)
EM FMW Control http://oam.example.com:7001/em (weblogic/Oracle123)
1. Make sure the database is up :
a) On terminal window issue following cmds:
sqlplus / as sysdba
2.Start Web Logic Admin Server
In a new terminal, issue the following commands:
The status of Admin Server changes to running mode as shown below.
3.Start Web logic Managed server ( For OAM)
From a new terminal, issue the following commands
The WLS managed server goes to running mode as shown below.
4. Start OUD server
From a new terminal, issue the following commands to start OUD server instance:
OUD Server is successfully started as shown below.
Exercise 2: Demonstrate native mobile login
Practice 2.1: Enable Social and Mobile
In this practice, you verify that Access Manager and Mobile and Social functions within the
OAM suite are enabled.
Login to OAM Console using http://oam.example.com:7001/oamconsole
Click the System Configuration Tab. Double-click the Available Services node under Common
Configuration. Verify that Access Manager and Mobile and Social in the right pane are enabled.
Practice 2.2: Download Android ADT
Android Client SDK :
This SDK serves as a security layer for developing secure mobile applications on Android devices. It
essentially simplifies the development of the applications by taking control of authentication,
authorization, user profile services and secure storage. The minimum Android version supported by the
Mobile and Social Android Client SDK is Android 2.2
Note: This lab has already been done for you and the ADT is downloaded and staged under
This has two sub directories, sdk and eclipse
Practice 2.3: Create a Android Virtual Device (AVD)
1. Launch Eclipse IDE
2. Select a workspace for example /home/oracle/labworkspace. Select the option Use this as the default and do not ask again.
3. From the menu options, go to Windows > AVD Manager.
4. Click on New to create a new AVD.
Specify the property values as shown in the screenshot. Give your device a name (e.g. mydevice) and select a device type to emulate. The lab uses a Galaxy Nexus device running Android 4.2.2. Change the RAM value under Memory Options to 700 from 1024 as emulating RAM greater than 768M may fail (because of lack of resources on VM).
Take the rest of the property value defaults and select OK.
Practice 2.4: Start the Android Virtual Device (AVD)
From the AVD Manager, Select your device (mydevice) and click on Start to start the mydevice in emulator. On the Launch Options window, Click Launch. This should launch the mydevice in the emulator as shown in the screen.
Practice 2.5: Import the Sample Android Project
Open the Eclipse IDE, look for IDMMobileSDK and oracle.mobile.login.activities.LoginActivity packages .
If they are already present , then the packages are already imported. Skip the following steps.
Else perform the following:
1.Choose File > Import. In the "Select and import source" box type "project". Select General- Existing Projects into workspace and click Next.
2. Navigate to the Android Lab zip file and select it.Note that the sample project file(android-lab.zip) includes the OAM Mobile and Social Android SDK (IDMMobileSDK). Expand the IDMMobileSDK and oracle.mobile.login.activities.LoginActivity packages under the left side package explorer. Note: If you don't see the packages, click on the top right corner icon
showing two square icons to show you the design editing environment.
Practice 2.6: Deploying the sample .apk file
Android application package file (APK) is the file format used to distribute and install application software and middleware onto Google's Android operating system; very similar to an MSI package in Windows or a Deb package in Debian-based operating systems like Ubuntu.
The sample application (oracle.mobile.login.activities.LoginActivity.apk) is a compiled binary version of the application that you will deploy to verify that your environment is properly configured. You will view the application in the emulator after it has been deployed.
1. If the android emulator is not already running, launch it now. You can launch it from the /home/oracle/android_dev/adt-bundle-linux-x86_64-20130219/sdk/tools or from Eclipse AVD manager.
To launch it from command prompt:
./emulator -avd mydevice
2. To install the apk file, perform the following on the command line from the /home/oracle/android_dev/adt-bundle-linux-x86_64-20130219/sdk/platform-tools:
./adb -e install /home/oracle/labworkspace/oracle.mobile.login.activities.LoginActivity.apk
It should show a success message, if the apk file is successfully installed.The -e option tells adb to look for a running emulator to install the application.
Practice 2.7: Verify the apk installation using emulator
Navigate to the emulator window. If you notice a Lock icon at the center of the emulator, then unlock
the android device by clicking on the lock icon and sliding it to the right. This will unlock the device and
you will be in the Home screen.
1. Notice the icons on the top right of the emulator - volume control button, lock button, Home, , Menu , Back, Search and DPAD buttons. If these are disabled, perform the following:
Go to /home/oracle/.android/avd/mydevice.avd/config.ini file and set the following properties to
2. Save the file. Close and start the emulator again .Notice the icons are now enabled.
3. Unlock the android device(if you see a lock icon), using the mouse click on the lock icon and slide it to the right.
4. Click on the Apps icon (Circle with the 6 buttons within it) on the bottom tray on the Home screen. This will take you to screen showing all the apps on the android device.
5. Notice the installed app - Login App is now visible on the apps screen.
6. You can manage the Apps including Login app by clicking on the Menu icon on the top right corner. Now click on Manage Apps option at the bottom of the emulator window. It will display all the apps on the device that you can manage. Scroll down to the Login app or start typing in login and it should automatically display you the Login app. Click on the Login app. This brings up the App info page for the Login App. From here you can manage the
app - Force stop the app, uninstall the app, view the storage info about the app, Clear cache or data for the app and view the permissions on the app
Click on the Home icon to go back to the home screen.
Practice 2.8: Create User Profile Service Provider
This has already been done.
Now we will configure the OAM Mobile and Social server (OAMMS) for