You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Alejandro <al...@gmail.com> on 2016/09/22 15:24:45 UTC

WS-Security Policy Problem with algorithm suite

Hi, I've make a policy that support some algorithm suite, but when I used it
I discoverd that CXF load only the first algorithm that appear in the suite,
if you change the order always load the first one.

This is the algorithm suite
<sp:AlgorithmSuite>
						<wsp:Policy>
							<sp:Basic128Rsa15 />
							<sp:Basic256Rsa15 />
							<sp:Basic128Sha256Rsa15 />
							<sp:Basic256Sha256Rsa15 />
						</wsp:Policy>
					</sp:AlgorithmSuite>

That happend en CXF 2.7.18, any idea about that?

Regards



--
View this message in context: http://cxf.547215.n5.nabble.com/WS-Security-Policy-Problem-with-algorithm-suite-tp5772956.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WS-Security Policy Problem with algorithm suite

Posted by Colm O hEigeartaigh <co...@apache.org>.
Let me ask you a question - what exactly are you trying to do with multiple
AlgorithmSuites?

On the client/outbound side, it will always pick the first AlgorithmSuite,
as it can only use one to secure the request. On the receiving side, it's
valid to use ExactlyOne to specify a list of AlgorithmSuites that are
acceptable.

I don't know why you are seeing the error message below. When experimenting
with the code I discovered a bug where it reports "ExactlyOne" as below,
instead of giving the failing AlgorithmSuite. However, all of the algorithm
suites you have listed below are valid.

Could you try with a more up-to-date version of CXF to see if it still
reports an error? 2.7.x is no longer supported.

Colm.

On Thu, Sep 22, 2016 at 5:22 PM, Alejandro <al...@gmail.com> wrote:

> Hi, I've tried to put
> <sp:AlgorithmSuite>
>                                                 <wsp:Policy>
>                                                         <wsp:ExactlyOne>
>
> <sp:Basic128Rsa15 />
>
> <sp:Basic256Rsa15 />
>
> <sp:Basic128Sha256Rsa15 />
>
> <sp:Basic256Sha256Rsa15 />
>                                                         </wsp:ExactlyOne>
>                                                 </wsp:Policy>
>                                         </sp:AlgorithmSuite>
>
> But I've get this errror:
>  org.apache.cxf.ws.security.policy.WSSPolicyException: Invalid algorithm
> suite ExactlyOne.
>
> Where is the problem?
>
> Regards
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.co
> m/WS-Security-Policy-Problem-with-algorithm-suite-tp5772956p5772966.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: WS-Security Policy Problem with algorithm suite

Posted by Alejandro <al...@gmail.com>.
Hi, I've tried to put 
<sp:AlgorithmSuite>
						<wsp:Policy>
							<wsp:ExactlyOne>
								<sp:Basic128Rsa15 />
								<sp:Basic256Rsa15 />
								<sp:Basic128Sha256Rsa15 />
								<sp:Basic256Sha256Rsa15 />
							</wsp:ExactlyOne>
						</wsp:Policy>
					</sp:AlgorithmSuite>

But I've get this errror:
 org.apache.cxf.ws.security.policy.WSSPolicyException: Invalid algorithm
suite ExactlyOne.

Where is the problem?

Regards



--
View this message in context: http://cxf.547215.n5.nabble.com/WS-Security-Policy-Problem-with-algorithm-suite-tp5772956p5772966.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WS-Security Policy Problem with algorithm suite

Posted by Colm O hEigeartaigh <co...@apache.org>.
Yes it's not valid. You need to wrap the multiple policies in an
"ExactlyOne" instead. See this email thread:

http://cxf.547215.n5.nabble.com/ws-policies-AlgorithmSuite-td5739309.html

Colm.

On Thu, Sep 22, 2016 at 4:24 PM, Alejandro <al...@gmail.com> wrote:

> Hi, I've make a policy that support some algorithm suite, but when I used
> it
> I discoverd that CXF load only the first algorithm that appear in the
> suite,
> if you change the order always load the first one.
>
> This is the algorithm suite
> <sp:AlgorithmSuite>
>                                                 <wsp:Policy>
>                                                         <sp:Basic128Rsa15
> />
>                                                         <sp:Basic256Rsa15
> />
>
> <sp:Basic128Sha256Rsa15 />
>
> <sp:Basic256Sha256Rsa15 />
>                                                 </wsp:Policy>
>                                         </sp:AlgorithmSuite>
>
> That happend en CXF 2.7.18, any idea about that?
>
> Regards
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.
> com/WS-Security-Policy-Problem-with-algorithm-suite-tp5772956.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com