You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by difoul <fo...@outlook.com> on 2013/08/21 17:13:25 UTC

Cutomize saml aasertion namespace prefix

Hi, 
I am new user of CXF. I'm using cxf 2.6.0. 

I've created a CxfEndpoint with SAML2 wspolicy. 
This Endpoint generates a Saml Assertion with a namespace prefix "saml2". 
The server side expects the prefix "saml" 

How can i change the prefix from "saml2" to "saml" before generating the
assretion signature? 

Saml assertion : 

<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soap:mustUnderstand="1">
                        <saml2:Assertion
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="_569D3BBFE5A7C5B61E137709250230810" IssueInstant="..." Version="2.0"
xsi:type="saml2:AssertionType">
                                <saml2:Issuer>ISSUER</saml2:Issuer>
                                <ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                                        ... 
                                </ds:Signature>
                                <saml2:Subject>
                                        ... 
                                </saml2:Subject>
                                <saml2:Conditions NotBefore="..."
NotOnOrAfter="..."/>
                                <saml2:AuthnStatement AuthnInstant="...">
                                        <saml2:AuthnContext>
                                                ... 
                                        </saml2:AuthnContext>
                                </saml2:AuthnStatement>
                                <saml2:AttributeStatement>
                                        ... 
                                </saml2:AttributeStatement>
                        </saml2:Assertion>
                </wsse:Security>



--
View this message in context: http://cxf.547215.n5.nabble.com/Cutomize-saml-aasertion-namespace-prefix-tp5732824.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Cutomize saml aasertion namespace prefix

Posted by difoul <fo...@outlook.com>.
Thank you very much for your help :)
Unfortunately, am using signed assertions.



--
View this message in context: http://cxf.547215.n5.nabble.com/Cutomize-saml-aasertion-namespace-prefix-tp5732824p5732960.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Cutomize saml aasertion namespace prefix

Posted by Colm O hEigeartaigh <co...@apache.org>.
It's not possible at the moment. Perhaps you could use CXF's transformation
feature to change it (assuming you are not using signed Assertions)?

Colm.


On Thu, Aug 22, 2013 at 2:55 PM, difoul <fo...@outlook.com>wrote:

> Yes, only the prefix.
>
> Thx for your help.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Cutomize-saml-aasertion-namespace-prefix-tp5732824p5732893.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

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

Re: Cutomize saml aasertion namespace prefix

Posted by difoul <fo...@outlook.com>.
Yes, only the prefix.

Thx for your help.



--
View this message in context: http://cxf.547215.n5.nabble.com/Cutomize-saml-aasertion-namespace-prefix-tp5732824p5732893.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Cutomize saml aasertion namespace prefix

Posted by Colm O hEigeartaigh <co...@apache.org>.
Are you sure it's just the prefix that must be "saml" instead of "saml2",
or should the entire Assertion be a SAML 1 Assertion?

Colm.


On Wed, Aug 21, 2013 at 4:13 PM, difoul <fo...@outlook.com>wrote:

> Hi,
> I am new user of CXF. I'm using cxf 2.6.0.
>
> I've created a CxfEndpoint with SAML2 wspolicy.
> This Endpoint generates a Saml Assertion with a namespace prefix "saml2".
> The server side expects the prefix "saml"
>
> How can i change the prefix from "saml2" to "saml" before generating the
> assretion signature?
>
> Saml assertion :
>
> <wsse:Security
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> soap:mustUnderstand="1">
>                         <saml2:Assertion
> xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> ID="_569D3BBFE5A7C5B61E137709250230810" IssueInstant="..." Version="2.0"
> xsi:type="saml2:AssertionType">
>                                 <saml2:Issuer>ISSUER</saml2:Issuer>
>                                 <ds:Signature
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
>                                         ...
>                                 </ds:Signature>
>                                 <saml2:Subject>
>                                         ...
>                                 </saml2:Subject>
>                                 <saml2:Conditions NotBefore="..."
> NotOnOrAfter="..."/>
>                                 <saml2:AuthnStatement AuthnInstant="...">
>                                         <saml2:AuthnContext>
>                                                 ...
>                                         </saml2:AuthnContext>
>                                 </saml2:AuthnStatement>
>                                 <saml2:AttributeStatement>
>                                         ...
>                                 </saml2:AttributeStatement>
>                         </saml2:Assertion>
>                 </wsse:Security>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Cutomize-saml-aasertion-namespace-prefix-tp5732824.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

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