Skip to main content

Posts

Configuring Multi Data Source in Weblogic (Load-Balancing between Data Sources)

We can Create a Multi data Source in Weblogic which can perform Load balancing/ Fail-over among multiple generic Data sources. The Applications deployed on Weblogic will point to this Multi data Source and This Multidata source will do the load balancing/ fail-over internally. Below are the steps to create a Multi data source: Login to the weblogic console and click services. Click on Data Sources and create a new generic data source. Provide all the connection details and test the connection with Database. After this create another generic Data source. MultiData Source will do a load balancing between these 2 data sources.  After both the data sources are created. Click on Services--> Data Sources. Create a new Multi Data Source. Provide the name of the Multi data source, JNDI name of the Data Source and select either load balancing or Fail-Over from Algorithm type.  Select the server where Multidata source will be deployed (Se...

Retrieving OAM OAuth access token through Java

Create a OAuth client in OAM. Encode the username and password of the client in "username:password" format. This can be achieved from https://www.base64encode.org/ site. Once OAuth client is created it can be checked using below command: curl -i -H 'Authorization: Basic <Encoded Username:Password>' -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" --request POST http://<OAM_host>:14100/ms_oauth/oauth2/endpoints/oauthservice/tokens -d 'grant_type=password&username=<OAM_Admin>&password=<OAM_Admin_Pwd>'   If the response is 200 and access token is retrieved then OAuth service is working fine. Same access token can be retrieved using below sample code : import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; import org.json.JSONObject; import java.net.HttpURLConnection; import java.net.URL; public class CheckRest { public static void main(Stri...

Account Provisioning through API - OIM 11g R2

public class AccountManagement { OIMClient client=ClientOIM.initialise(); oracle.iam.provisioning.api.ApplicationInstanceService appInstanceService=client.getService(oracle.iam.provisioning.api.ApplicationInstanceService.class); ProvisioningService provisioningService=client.getService(ProvisioningService.class); ClientOIM oim=new ClientOIM(); public void provisionAccount(String accName,String userID) { try { if (accName!=null && !accName.equals("") && userID!=null && !userID.equals("") ) { ApplicationInstance appInstance=appInstanceService.findApplicationInstanceByName(accName); long appKey=appInstance.getApplicationInstanceKey(); System.out.println("AppKey is "+appKey); FormInfo formInfo=appInstance.getAccountForm(); String formKey=String.valueOf(formInfo.getFormKey()); System.out.println("formKey is "+formKey); HashMap parentData=new HashMap(); /*Madator...

Searching and creating Organization Through API- OIM 11g R2

public class OrgManagement { static OrganizationManager orgManager=null; static OIMClient client=null; static Organization organization=null; public static void createOrg(String orgName, String orgType) { try { client=ClientOIM.initialise(); if (orgName!=null && orgType!=null) { orgManager=client.getService(OrganizationManager.class); System.out.println("OrgManagement :: createOrg :: org is "+orgManager); HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); mapAttrs.put(OrganizationManagerConstants.AttributeName.ORG_NAME.getId(),orgName); mapAttrs.put(OrganizationManagerConstants.AttributeName.ORG_TYPE.getId(),orgType); Organization org=new Organization(null,mapAttrs); orgManager.create(org); System.out.println("OrgManagement :: createOrg ::  Organization created"); } }  catch (OrganizationManagerException e) { // TODO Auto-generated catch block e.printStackTrace(); ...

Installation of Oracle Unified Directory (OUD) 11.1.2.2 - High Level Steps

Download the OUD from the Fusion Middleware download page: http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/oid-11gr2-2104316.html  Unzip the Software and run ./runInstaller -jreloc <JDK_location> from Disk1. Provide the existing middleware location and it will install the OUD home under middleware (Oracle_OUD1). OUD can be installed in 3 different modes 1. Replication gateway 2. OUD-Proxy and 3. Directory server. Navigate to <Middleware_home>/Oracle_OUD1/ and run oud-proxy-setup for installing OUD as proxy server, oud-replication-gateway-setup for replication mode and oud-setup for directory server. Run oud-setup command and provide details like ports, root domain values to complete the setup. After running oud-setup command a instance of OUD would be created as as_inst1 in middleware. to start and stop the OUD navigate to <Middleware_home>/as_inst1/OUD/bin and run start-ds and stop-ds commands. OVD/OID ODSM can not connect to OUD fo...

Providing System Admin Role to a user : OIM 11g R2 PS2

Login to the identity console with existing Admin credentials (xelsysadm). Create a user to whom System admin roles have to be assigned. Click on the Organization and search for Top organization. Select the System Admin role from the Admin Roles tab and select assign from action. Search the newly created user and add selected. Click apply and user will be provided the system role. Other Admin roles can also be provided by same method.

To Show Certification configuration in Sysadmin Console- OIM 11g R2 PS2

By default the certification configuration is not seen when a Admin user logs into the sysadmin console. To see this configuration login to the sysadmin console -->System Configuration. In the system configuration tab search for System Property "Display Certification or Attestation" If both is given as the value then certification and attestation both will be shown. To show only certification or attestation provide the value of either certification or attestation.