You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sumit Pathak <su...@gmail.com> on 2011/07/05 20:54:35 UTC

How different phase and interceptor works in CXF

I have a question on how different inteceptor and different phase works in
CXF.
a) For example the PolicyBasedWSS4JOutInterceptor is supposed to be called
at PRE_PROTOCOL phase.
b) Where as the SecureConversationOutInterceptor, which handles getting
security token, is called at PREPARE_SEND_ENDING phase, which i beleive
happens after PRE_PROTOCOL PHASE.
c) With in PolicyBasedWSS4JOutInterceptor, handleMessage method, the
appropriate binding  (transport,symmetric,asymetric) get handled.
d) For symmetric binding the token created by
SecureConversationOutInterceptor get used, but as this interceptor get
called after PolicyBasedWSS4JOutInterceptor, how does it gets the token
which needs to be used for signing and encrypting the message.

--
View this message in context: http://cxf.547215.n5.nabble.com/How-different-phase-and-interceptor-works-in-CXF-tp4554321p4554321.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: How different phase and interceptor works in CXF

Posted by mahesh <ma...@mayoo.com>.
I think I would try to answer some of the questions you have asked
For Symmetric binding you will need a external policy as shown below
Also you will need to provide password to your jks having the certs to sign
and encrypt
via a Client Password Callback handler. 

see attached policy as example
http://cxf.547215.n5.nabble.com/file/n4557374/addr-external.xml
addr-external.xml 

--
View this message in context: http://cxf.547215.n5.nabble.com/How-different-phase-and-interceptor-works-in-CXF-tp4554321p4557374.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: How different phase and interceptor works in CXF

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, July 05, 2011 11:54:35 AM Sumit Pathak wrote:
> I have a question on how different inteceptor and different phase works in
> CXF.
> a) For example the PolicyBasedWSS4JOutInterceptor is supposed to be called
> at PRE_PROTOCOL phase.
> b) Where as the SecureConversationOutInterceptor, which handles getting
> security token, is called at PREPARE_SEND_ENDING phase, which i beleive
> happens after PRE_PROTOCOL PHASE.

I have the SecureConversationOutInterceptor living in the PREPARE_SEND phase.   

    public SecureConversationOutInterceptor() {
        super(Phase.PREPARE_SEND);
    }
 
which would be before the PRE_PROTOCOL phase.   Thus, that would answer the 
rest of this.

Dan



> c) With in PolicyBasedWSS4JOutInterceptor, handleMessage method, the
> appropriate binding  (transport,symmetric,asymetric) get handled.
> d) For symmetric binding the token created by
> SecureConversationOutInterceptor get used, but as this interceptor get
> called after PolicyBasedWSS4JOutInterceptor, how does it gets the token
> which needs to be used for signing and encrypting the message.
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-different-phase-and-interceptor-works-i
> n-CXF-tp4554321p4554321.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com