You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Fred Dushin (JIRA)" <ji...@apache.org> on 2008/04/15 20:25:06 UTC

[jira] Commented: (WSS-112) DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.

    [ https://issues.apache.org/jira/browse/WSS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589176#action_12589176 ] 

Fred Dushin commented on WSS-112:
---------------------------------

I just submitted a change (r648361) to revert to the processor-per-request behavior from previous versions of this module.  

Could I ask you to confirm that this addresses this issue?

Thanks, and apologies for the disruption!

> DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.
> -------------------------------------------------------------------------------------
>
>                 Key: WSS-112
>                 URL: https://issues.apache.org/jira/browse/WSS-112
>             Project: WSS4J
>          Issue Type: Bug
>         Environment: Rampart latest, Wss4J latest
>            Reporter: Rasmus Rhein Helwigh
>            Assignee: Ruchith Udayanga Fernando
>
> org.apache.ws.security.WSSConfig.getProcessor returns a cached Processor
> public Processor getProcessor(QName el) throws WSSecurityException {
>         Processor p = (Processor) processorMap.get(el);
>         return p;
>     }
> This causes problem if two DerivedKeyProcessors are needed for the same message, as the second processor will overwrite the first.
> A fix could be to Create a new instance each time. 
> Check out this hack:
>  public Processor getProcessor(QName el) throws WSSecurityException {
>         Processor p = (Processor) processorMap.get(el);        
>         try {
> 	return (Processor) Loader.loadClass(p.getClass().getName()).newInstance();
> } catch (InstantiationException e) {
> 	throw new WSSecurityException("Unable to get processor",e);			
> } catch (IllegalAccessException e) {
> 	throw new WSSecurityException("Unable to get processor",e);
> } catch (ClassNotFoundException e) {
> 	throw new WSSecurityException("Unable to get processor",e);
> }                     
>  }
> I can try and make a better fix if requested. WCF <-> Wss4j interop will work a lot better with this fix..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: [jira] Commented: (WSS-112) DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.

Posted by Werner Dittmann <We...@t-online.de>.
+1

Looks ok to me.

Regards,
Werner

Fred Dushin (JIRA) schrieb:
>     [ https://issues.apache.org/jira/browse/WSS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589176#action_12589176 ] 
> 
> Fred Dushin commented on WSS-112:
> ---------------------------------
> 
> I just submitted a change (r648361) to revert to the processor-per-request behavior from previous versions of this module.  
> 
> Could I ask you to confirm that this addresses this issue?
> 
> Thanks, and apologies for the disruption!
> 
>> DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.
>> -------------------------------------------------------------------------------------
>>
>>                 Key: WSS-112
>>                 URL: https://issues.apache.org/jira/browse/WSS-112
>>             Project: WSS4J
>>          Issue Type: Bug
>>         Environment: Rampart latest, Wss4J latest
>>            Reporter: Rasmus Rhein Helwigh
>>            Assignee: Ruchith Udayanga Fernando
>>
>> org.apache.ws.security.WSSConfig.getProcessor returns a cached Processor
>> public Processor getProcessor(QName el) throws WSSecurityException {
>>         Processor p = (Processor) processorMap.get(el);
>>         return p;
>>     }
>> This causes problem if two DerivedKeyProcessors are needed for the same message, as the second processor will overwrite the first.
>> A fix could be to Create a new instance each time. 
>> Check out this hack:
>>  public Processor getProcessor(QName el) throws WSSecurityException {
>>         Processor p = (Processor) processorMap.get(el);        
>>         try {
>> 	return (Processor) Loader.loadClass(p.getClass().getName()).newInstance();
>> } catch (InstantiationException e) {
>> 	throw new WSSecurityException("Unable to get processor",e);			
>> } catch (IllegalAccessException e) {
>> 	throw new WSSecurityException("Unable to get processor",e);
>> } catch (ClassNotFoundException e) {
>> 	throw new WSSecurityException("Unable to get processor",e);
>> }                     
>>  }
>> I can try and make a better fix if requested. WCF <-> Wss4j interop will work a lot better with this fix..
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org