Forum Home » General » General Questions

Thread: Run time policy application on webservices via FuseESB

 
This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Aug 24, 2012 8:09 AM Last Post By: ffang Threads: [ Previous | Next ]
techlearner123

Posts: 6
Registered: 08/23/12
Run time policy application on webservices via FuseESB
Posted: Aug 23, 2012 11:42 AM
 
  Click to reply to this thread Reply
Hi,

Could someone please let me know that "Does FuseESB support Run time policy management (WS-Policy,WS-Security) on webservices." If yes could you please guide me to relevant links.
ffang

Posts: 1,320
Registered: 12/24/07
Re: Run time policy application on webservices via FuseESB
Posted: Aug 24, 2012 12:10 AM   in response to: techlearner123 in response to: techlearner123
 
  Click to reply to this thread Reply
Hi,

Yes, FUSE ESB support CXF out of the box, and CXF support ws-policy/ws-security.
Take a look at those links to get more details[1][2][3]

[1]http://fusesource.com/docs/mirrors/cxf/index/ws--support/ws-policy.html
[2]http://fusesource.com/docs/mirrors/cxf/index/ws--support/ws-security.html
[3]http://fusesource.com/docs/mirrors/cxf/index/ws--support/ws-securitypolicy.html

Freeman
techlearner123

Posts: 6
Registered: 08/23/12
Re: Run time policy application on webservices via FuseESB
Posted: Aug 24, 2012 7:04 AM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Dear Freeman,

Thanks for replying.

I have gone through the links.
I know Fuse supports WS-Policy but I want to apply WS-Policy at runtime on webservices as mentioned in 3rd option of the following link.
Does FuseESB supports any such kind of configuration. Many thanks in advance.
Any sample implementation or guidance for me how to implement.

Link: http://fusesource.com/docs/mirrors/cxf/index/ws--support/ws-policy/how-to-define-policies.html

3rd Option from the link.
Dynamically via message property

Sometimes policies cannot be configured statically, because they are obtained or calculated dynamically for concrete message (for example using Policy Server or Service Registry). For such cases CXF provide a possibility to load policy dynamically and set it into the message context property. It can be done for example in custom interceptor that fulfils the following:

1.Get policy from external location and build it for current message.

2.Parse WS-Policy XML using Neethi library.

3.Store result Policy object into PolicyConstants.POLICY_OVERRIDE message content property.
Important is that this custom policy interceptor is called before CXF PolicyInInterceptor or PolicyOutInterceptor. Than CXF will automatically recognize Policy stored into this property and use it with highest priority.

ffang

Posts: 1,320
Registered: 12/24/07
Re: Run time policy application on webservices via FuseESB
Posted: Aug 24, 2012 8:09 AM   in response to: techlearner123 in response to: techlearner123
 
  Click to reply to this thread Reply
Hi,

Yeah, FUSE ESB support it, but I haven't a full example at hand.
I think the guidance is already in the linked I showed you.

1.Get policy from external location and build it for current message.

2.Parse WS-Policy XML using Neethi library.

3.Store result Policy object into PolicyConstants.POLICY_OVERRIDE message content property.
Important is that this custom policy interceptor is called before CXF PolicyInInterceptor or PolicyOutInterceptor. Than CXF will automatically recognize Policy stored into this property and use it with highest priority.

Freeman