Disadvantage of gateway.
The call passess from client to gateway to endpoint so security is only between client and gateway
No security between gateway and endpoint.
Clinet<---------------->Gateway-------------------EndPointURL
SO we go for agent which actually implement the logic at the container level itself and cause a call to be secured.
We can have multiple server agent.
First of all we need to check the configuration file agent.properties located in
SOA_HOME\owsm\bin directory.
If you will open up this configuration file then you will find that there are four component
# serveragent - manages webservice providers
# clientagent - manages webservice clients.
# OC4JServerInterceptor - Used an an interceptor for webservice providers on OC4J
# OC4JClientInterceptor - Used an an interceptor for webservice providers on OC4J
We will first see an example of a web service deployed in a oc4j container
We use interceptors when the webservices are on oc4j container we will see an example of OC4JServerInterceptor.
Log in to the owsm console
http://host:port/ccore
Create a new server agent.It will be created with some default component id as shown
Now go to agent.properties file and provide the component id in the following field.
add / replace the component id to agent.component.id
agent.component.id=C0003005
Also check if the following attribute defaults to
agent.componentType – OC4JServerInterceptor
agent.containerType – OC4J
agent.containerVersion – 10.1.3
( this is autogenerated )
Now open up a command console and deploy the server agent.
Go to SOA_HOME\owsm\bin folder and do a wsmadmin installAgent
Now log in to the em console
Choose the container then go to web services tab and select any of the web service which you want to secure through agent.
Once you will go to that web service switch to Administration tab
Now edit it and select the web service agent as shown below and say ok to the changes.
ONce it is added go to edit configuration for the web service agent.
Now restart your server to make the changes
Now when you will invoke the web service which you have secured through agent you will see a log is generate in the owsm as tby default the policy contains a logger parameter,You can further add your own policies as per your requirement.
No comments:
Post a Comment