You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by matpil <ma...@cervedgroup.com> on 2013/04/23 12:32:59 UTC

add security policy to wsdl (first)

HI,
in my architecture I've a component that provide to generate a wsdl (java
first) and a component that call the wsdl and exposes this to internet.
Now I'd like to add a ws security policy to wsdl in my second component (I
don't want to touch anything in my first component).
I found some "manual" configuration, but nothing that provide to generate
automatically that WSS.

Exists something like this?

Anyone have some ideas?

Regards,
--
matpil



--
View this message in context: http://cxf.547215.n5.nabble.com/add-security-policy-to-wsdl-first-tp5726642.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: add security policy to wsdl (first)

Posted by matpil <ma...@cervedgroup.com>.
Uhm… simple :)

I’ll try this solution (I’ve to do this by code).

Tnx again!




--
View this message in context: http://cxf.547215.n5.nabble.com/add-security-policy-to-wsdl-dynamically-tp5726642p5726718.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: add security policy to wsdl (first)

Posted by Glen Mazza <gl...@gmail.com>.
On 04/24/2013 10:22 AM, matpil wrote:
> tnx for your reply.
> maybe I'm wrong but in your examples I don't find a way to add a
> <wsp:policy> to an exist wsdl.

Umm...copy and paste?  :)  Choose a WSDL that already has the security 
policy statements you want and add it to your own WSDL.

> Now I'm trying to read the wsdl with "javax.wsdl.Definition" to add the
> security namespace
>      wsdlDefinition.addNamespace("wsp",
> "http://schemas.xmlsoap.org/ws/2004/09/policy");
>      wsdlDefinition.addNamespace("sp",
> "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy");
> and <wsp:policy>...</wsp:policy>.
>

Are you doing Java-first?  There's not many security policy examples 
around for that.  I had assumed it was only your first component you 
were doing Java-first, not the second where you wanted to add WS-Policy.

Glen

> Ok for the namespace...  but I've some problem with "policy tag".
>
> Is it the best way or suggest another way?
>
>
> Regars,
> matpil
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/add-security-policy-to-wsdl-dynamically-tp5726642p5726713.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: add security policy to wsdl (first)

Posted by matpil <ma...@cervedgroup.com>.
tnx for your reply.
maybe I'm wrong but in your examples I don't find a way to add a
<wsp:policy> to an exist wsdl.
Now I'm trying to read the wsdl with "javax.wsdl.Definition" to add the
security namespace
    wsdlDefinition.addNamespace("wsp",
"http://schemas.xmlsoap.org/ws/2004/09/policy");
    wsdlDefinition.addNamespace("sp",
"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy");
and <wsp:policy>...</wsp:policy>.

Ok for the namespace...  but I've some problem with "policy tag".

Is it the best way or suggest another way?


Regars,
matpil



--
View this message in context: http://cxf.547215.n5.nabble.com/add-security-policy-to-wsdl-dynamically-tp5726642p5726713.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: add security policy to wsdl (first)

Posted by Glen Mazza <gl...@gmail.com>.
Relying on the WSDLs for already existing CXF samples is probably the 
best way to go (my security examples may also help: 
http://www.jroller.com/gmazza/entry/blog_article_index). Netbeans will 
generate WSDLs w/security policies for GlassFish Metro that can be used 
with minor modifications with CXF (primarily, removing the 
GlassFish-specific keystore config info, as that's stored outside of the 
WSDL with CXF.)

Glen

On 04/23/2013 06:32 AM, matpil wrote:
> HI,
> in my architecture I've a component that provide to generate a wsdl (java
> first) and a component that call the wsdl and exposes this to internet.
> Now I'd like to add a ws security policy to wsdl in my second component (I
> don't want to touch anything in my first component).
> I found some "manual" configuration, but nothing that provide to generate
> automatically that WSS.
>
> Exists something like this?
>
> Anyone have some ideas?
>
> Regards,
> --
> matpil
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/add-security-policy-to-wsdl-first-tp5726642.html
> Sent from the cxf-user mailing list archive at Nabble.com.