In OSB 11 g, there is a out of box support for OWSM Agents at the domain level which can perform policy enforcements for the web services running in the domain.
To install the agent, check Oracle Service Bus OWSM Extension, when creating the domain using the domain configuration wizard.
This will create the domain with the necessary deployments for the OWSM agent to work. You will also need to setup the mds-owsm datasource in the later datasource configuration section of the configuration wizard. This datastore will be used by the OWSM agent for policy enforcement.
At a recent customer I faced the below issue when accessing the sbconsole to apply an OWSM policy for a proxy service.
oracle.wsm.policymanager.PolicyManagerException: WSM-02118 : The query service cannot be created. [Possible Cause : While trying to lookup ‘QueryService#oracle.wsm.policymanager.ejb.IStringQueryServiceRemote’ didn’t find subcontext ‘QueryService#oracle’. Resolved ”]
This particular domain was initially created without OWSM support. The admin guy who created the domain forgot to check the OWSM checkbox in the domain configuration Wizard. Domain had a 2 managed server OSB cluster. Later, an attempt was made to extend the domain to enable OWSM. This was done incorrectly and OWSM components were targeted on admin server instead of the OSB cluster.
I had to re-arrange targeting of OWSM components to fix this issue. The below checklist can be used to ensure owsm agent is configured correctly in the domain. This will be useful if you face any issues in applying OWSM policies to the proxy or business services and suspect an incorrect agent configuration.
1. The owsm data source mds-owsm is deployed on both admin and osb server (or osb cluster) and is active
2. The deployment OWSM Policy Support in OSB Initializer Application is deployed on both admin and osb server ( or OSB cluster) and is active
3. The deployment wsm-pm is deployed only on the OSB server ( or OSB Cluster) and is active.