Sunday, June 16, 2013

oracle.sysman.emas.sdk.wsm.WsmServiceAccessException: Cannot locate service: oracle.wsm.policymanager.IPolicyService

Error:-

Either the WSDL URL is invalid or the WSDL file is not valid or incorrect. - oracle.sysman.emas.sdk.wsm.WsmServiceAccessException: Cannot locate service: oracle.wsm.policymanager.IPolicyService

Solution:-

Log into EM then select the domain in use and use the following the menu path,  WebLogic Domain --> Web Services --> Platform Policy Configuration

From there, select the Policy Accessor tab., then click Add to add a property.

In the Add Property window, specify the following values:

a)  In the Name field, enter this property: "java.naming.provider.url"

Value: t3:// soaserver01.com:9200,soaserver02.com:9200,soaserver03.com:9200

(Use your server and port value here. The port number should be of the managed server on which wsm-pm is installed)

Click Apply

Restart Weblogic Server.

Saturday, June 15, 2013

WSM-02120 : Unable to connect to the policy access service

Error:-
Cannot locate policy manager query/update service. Policy manager service look up did not find a valid service, due to: Unable to connect to WS Policy Manager. <- :="" access="" available="" connect="" connection="" destination="" exception="" i="" is:="" is="" java.net.connectexception:="" javax.naming.communicationexception="" nested="" no="" oot="" oracle.wsm.policymanager.policymanagerexception:="" policy="" refused="" router="" service.="" soaserver01.com="" soaserver02.com="" soaserver03.com:9200:="" t3s:="" the="" to="" unable="" unreachable="" wsm-02120="">

Solution:-
Log into EM then select the domain in use and use the following the menu path,  WebLogic Domain> Web Services > Platform Policy Configuration
From there, select the Policy Accessor tab., then click Add to add a property.
In the Add Property window, specify the following values:
a)  In the Name field, enter this property: "java.naming.provider.url"
Value: t3:// soaserver01.com:9200,soaserver02.com:9200,soaserver03.com:9200
(Use your server and port value here. The port number should be of the managed server on which wsm-pm is installed)
Click Apply
Restart Weblogic Server.

Wednesday, June 12, 2013

Oracle BAM icommand hangs after entering password

I faced issue in BAM wherein Oracle BAM Command Utility hanged after entering username and password. As shown in the screenshot below.





The issue got fixed after updating BAMICommandConfig.xml file @$ORACLE_SOA_HOME/bam/config

You need to update ServerName and ServerPort parameter in this file. As shown below where physoaserver.abc.com is the node on which BAM is installed and 9112 is the Port assigned to BAM.
 
  <ServerName>physoaserver.abc.com</ServerName>
  <ServerPort>9112</ServerPort>

Once you have updated the ServerName and ServerPort, try executing the icommand again. This time it will not hang.
In case of HA cluster environment, update the file on all the nodes on which BAM is installed. The ServerName will be the hostname of that machine.

Tuesday, June 11, 2013

Create/Remove Security Policy at weblogic JMS Queue

While working with client, we got one requirement where we have to implement security at weblogic JMS queue level. Few of the JMS queues were used by non integration components. The Client wanted that only specific users should be able to push/send data into these queue. The problem was to add security policy to hundreds of queues in various environment. It was a tedious job so I wrote below WLST function after going through few blogs and Oracle documentation. I am sharing it with you hoping that it will help you and save your time ;-)

The function when invoke, enable security at JMS Queue level.

def jmsQueueSecurityEnable():
    try:
        print('=======================================================')
        print('Enabling Security on JMS Queue')
        print('=======================================================')
        customUsers=users.split(',')
        customUsersStr=''
        for i in customUsers:
            customUsersStr=customUsersStr+'{Usr('+i+')}|'
        customerUsersList=customUsersStr[0:len(customUsersStr)-1]
        cd('/SecurityConfiguration/'+domain_name+'/Realms/myrealm/Authorizers/XACMLAuthorizer')
        queueList=addQueueName.split(',')
        for i in queueList:
            resourceId='type=, application='+ApplicationName+', destinationType=queue, resource='+i+', action='+action+''
            print('resourceID='+resourceId)
            cmo.createPolicy(resourceId,customerUsersList)
            print('Added policy to queue= '+i)
    except Exception, e:
        print('Exception is '+e)
        dumpStack()
        raise


When jmsQueueSecurityDisable is invoke, it removes all the security from the JMS Queue.

def jmsQueueSecurityDisable():
    try:
        print('=======================================================')
        print('Disabling Security on JMS Queue')
        print('=======================================================')
        cd('/SecurityConfiguration/'+domain_name+'/Realms/myrealm/Authorizers/XACMLAuthorizer')
        queueList=removeQueueName.split(',')
        for i in queueList:
            resourceId='type=, application='+ApplicationName+', destinationType=queue, resource='+i+', action='+action+''
            print('resourceID='+resourceId)
            cmo.removePolicy(resourceId)
            print('Disabled policy on queue= '+i)
    except Exception, e:
        print('Exception is '+e)
        dumpStack()
        raise


I created a property file to read the values as shown below

#===========================================================================================
# Details
#===========================================================================================
domain_name=Oracle_SOA1
ApplicationName=JMSModule
action=send
users=user1,user2,user3
#===========================================================================================
# Resource Details to Add Policy
#===========================================================================================
addQueueName=SampleQueue,
SampleQueue1,SampleQueue3
 #===========================================================================================
# Resource Details to Remove Policy
#===========================================================================================
removeQueueName=SampleQueue4,
SampleQueue5


You can customize the functions as per your requirement.


Thursday, September 13, 2012

Oracle Enterprise Gateway (11.1.1.6) Installation Steps on Linux 64 bit


Oracle Enterprise Gateway (OEG) is an gateway product under Oracle Identity Management offered by Oracle to simplify and secure SOA deployment across domain boundaries or in the cloud.
I am uploading the steps to install OEG 11.1.1.6 on non-clustered enviroment on RHEL 64 bits.
Kindly download the guide from the below URL
https://docs.google.com/open?id=0B8FYRGkltbL_LTNrbzFJN05XU0k 
Please get back to me in case you face any issue with the installation of OEG.