You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Venkat Reddy <vr...@gmail.com> on 2004/09/09 08:58:20 UTC

Re: [WSS4j] SecurityTokenReference - Can it be added to the same document twice ?

May be it's possible in future, when we get our push parser, to use
the same instance for inserting more than one element to the stream ?

--Venkat

On Wed, 8 Sep 2004 22:15:55 +0200, Werner Dittmann
<we...@t-online.de> wrote:
> Hi,
> 
> presumably you are using the same instance to add the STR the second time?
> Well, I'm not quite sure but this may confuse the document tree somehow
> because
> when its converted into the real DOM tree you would add the _same_ Element
> (the same instance) twice. AFAIK this is not possible in DOM. Try to
> instantiate
> a second STR with the same information (when you use clone be careful to
> deep
> clone the element inside the STR)....if possible just instantiate another
> STR and
> provide the same info.
> 
> Regards,
> Werner
> 
> ----- Original Message -----
> From: "Dimuthu Leelarathne" <mu...@opensource.lk>
> To: <fx...@ws.apache.org>
> Sent: Wednesday, September 08, 2004 7:22 PM
> Subject: [WSS4j] SecurityTokenReference - Can it be added to the same
> document twice ?
> 
> > Hi All,
> >
> > The problem is "Can I add the same SecurityTokenReference element to the
> > same document twice ? "
> >
> > I want to refer to the same SAML Token as below by using
> > <wsse:SecurityTokenReference> element inside DerivedKeyTokens, i.e. both
> > derivedKey tokens are refering the same SAML token.
> >
> > <wsse:Security>
> >
> >  <saml:Assertion AssertionID="uuid:8f8a6868-cb87-4d90-8f5d-f6efdb6a83f4"
> ...>
> >  ..............
> >  ...........
> >  </saml:Assertion>
> >
> > <wsc:DerivedKeyToken wsu:Id="947861714">
> >       <wsse:SecurityTokenReference>
> >        <wsse:Reference URI="uuid:8f8a6868-cb87-4d90-8f5d-f6efdb6a83f4"
> >
> ValueType="http://www.docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-
> token-profile-1.0#SAMLAssertion-1.0"/>
> >        </wsse:SecurityTokenReference>
> > <wsc:Label>WSSecureConversationWSSecureConversation</wsc:Label>
> >                <wsc:Nonce>nonce.....</wsc:Nonce>
> >         <wsc:Generation>0</wsc:Generation>
> > </wsc:DerivedKeyToken>
> >
> > <wsc:DerivedKeyToken wsu:Id="1950256298">
> >       <wsse:SecurityTokenReference>
> >        <wsse:Reference URI="uuid:8f8a6868-cb87-4d90-8f5d-f6efdb6a83f4"
> >
> ValueType="http://www.docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-
> token-profile-1.0#SAMLAssertion-1.0"/>
> >        </wsse:SecurityTokenReference>
> >        <wsc:Label>WSSecureConversationWSSecureConversation</wsc:Label>
> >        <wsc:Nonce>nonce.....</wsc:Nonce>
> >        <wsc:Generation>0</wsc:Generation>
> > </wsc:DerivedKeyToken>
> > </wsse:Security>
> >
> > But my problem is when I try to append <wsse:SecurityTokenReference> to
> > the second derived key <wsse:SecurityTokenReference> is removed from the
> > firs DerivedKey. So the actual result I get is as below. Only the second
> > element contains the added <wsse:SecurityTokenReference> element.
> >
> >  <saml:Assertion AssertionID="uuid:8f8a6868-cb87-4d90-8f5d-f6efdb6a83f4"
> ...>
> >  ..............
> >  ...........
> >  </saml:Assertion>
> >
> > <wsc:DerivedKeyToken wsu:Id="947861714">
> >        <wsc:Label>WSSecureConversationWSSecureConversation</wsc:Label>
> >          <wsc:Nonce>nonce.....</wsc:Nonce>
> >         <wsc:Generation>0</wsc:Generation>
> > </wsc:DerivedKeyToken>
> >
> > <wsc:DerivedKeyToken wsu:Id="1950256298">
> >       <wsse:SecurityTokenReference>
> >        <wsse:Reference URI="uuid:8f8a6868-cb87-4d90-8f5d-f6efdb6a83f4"
> >
> ValueType="http://www.docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-
> token-profile-1.0#SAMLAssertion-1.0"/>
> >        </wsse:SecurityTokenReference>
> >        <wsc:Label>WSSecureConversationWSSecureConversation</wsc:Label>
> >        <wsc:Nonce>nonce.....</wsc:Nonce>
> >        <wsc:Generation>0</wsc:Generation>
> > </wsc:DerivedKeyToken>
> > </wsse:Security>
> >
> > Is this a bug?
> >
> > I have the same experience when I am trying to add the same
> > <wsse:SecurityTokenReference> element into serveral
> > xenc:EncryptedData/KeyInfo elements withing the same documnet, i.e. only
> > the last xenc:EncryptedData/KeyInfo contains the added
> > <wsse:SecurityTokenReference>.  Am I repeatedly doing somethign wrong ?
> >
> > Thank you in advance,
> > Dimuthu
> > --
> > Lanka Software Foundation  http://www.opensource.lk
> >
> >
> 
>