You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "wens sun (JIRA)" <ji...@apache.org> on 2007/10/16 05:35:50 UTC

[jira] Updated: (RAMPART-96) MTOM+Rampart,binary node at client side is converted to plain text node at server side.

     [ https://issues.apache.org/jira/browse/RAMPART-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

wens sun updated RAMPART-96:
----------------------------

    Attachment: MTOM_Security_Problem.PNG

> MTOM+Rampart,binary node at client side is converted to plain text node at server side.
> ---------------------------------------------------------------------------------------
>
>                 Key: RAMPART-96
>                 URL: https://issues.apache.org/jira/browse/RAMPART-96
>             Project: Rampart
>          Issue Type: Bug
>          Components: rampart-core
>    Affects Versions: 1.2, 1.3
>         Environment: xis2 1.2+Rampart1.2 and axis2 1.3+Rampart1.3
> JDK1.5.03,tomcat5.59
>            Reporter: wens sun
>         Attachments: MTOM_Security_Problem.PNG
>
>
> I have problem about MTOM+Rampart, while I add binay node at client and send the binay node to server side, but at server side,
>  I receive the node that is not binay node, is plain text node, why? 
> I already regist the problem at http://www.nabble.com/About-MTOM+Rampart-t4506654.html and
>  there is a picture about the problem.
> I use axis2 1.2+Rampart1.2 and axis2 1.3+Rampart1.3, there is still the problem.
> the detail info is as the following.
> At axis2 client side, I add one binary node in soap message by MTOM, the following is the source code.
>         OMElement imageElement = fac.createOMElement("image", omNs);
>         javax.activation.DataHandler dataHandler = new javax.activation.DataHandler(new FileDataSource("SomeFile"));
>         //create an OMText node with the above DataHandler and set optimized to true
>         OMText textData = fac.createOMText(dataHandler, true);
>         imageElement.addChild(textData);
> At axis2 client side,I use the following ws-policy settings.
> <wsp:Policy wsu:Id="MTOMOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization">
> 	<wsoma:OptimizedMimeSerialization wsp:Optional="true"/>
> 	<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> 
> 		<ramp:user>client</ramp:user>
> 		<ramp:encryptionUser>service</ramp:encryptionUser>
> 		<ramp:passwordCallbackClass>sample.PWCBHandler</ramp:passwordCallbackClass>
> 		<ramp:signatureCrypto>
> 		   <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
>                       <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
>                       <ramp:property name="org.apache.ws.security.crypto.merlin.file">client.jks</ramp:property>
> 	             <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">client</ramp:property>
> 	          </ramp:crypto>
> 		</ramp:signatureCrypto>
> 		<ramp:encryptionCypto>
> 			<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
> 				<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
> 				<ramp:property name="org.apache.ws.security.crypto.merlin.file">client.jks</ramp:property>
> 				<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">client</ramp:property>
> 			</ramp:crypto>
> 		</ramp:encryptionCypto>
> 	</ramp:RampartConfig>
> </wsp:Policy>
> At server side, I use the following ws-policy settings.
>  <wsp:Policy wsu:Id="MTOMOverTransport"  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> 			xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
> 			xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization">
> 			<wsoma:OptimizedMimeSerialization wsp:Optional="true"/>
> 			<ramp:RampartConfig	xmlns:ramp="http://ws.apache.org/rampart/policy">
> 				<ramp:user>service</ramp:user>
> 				<ramp:encryptionUser>client</ramp:encryptionUser>
> 				<ramp:passwordCallbackClass>
>                                    sample.PWCBHandler
> 				</ramp:passwordCallbackClass>
> 				<ramp:signatureCrypto>
> 					<ramp:crypto
> 						provider="org.apache.ws.security.components.crypto.Merlin">
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.keystore.type">
> 							JKS
> 						</ramp:property>
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.file">
> 							service.jks
> 						</ramp:property>
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.keystore.password">
> 							service
> 						</ramp:property>
> 					</ramp:crypto>
> 				</ramp:signatureCrypto>
> 				<ramp:encryptionCypto>
> 					<ramp:crypto
> 						provider="org.apache.ws.security.components.crypto.Merlin">
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.keystore.type">
> 							JKS
> 						</ramp:property>
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.file">
> 							service.jks
> 						</ramp:property>
> 						<ramp:property	name="org.apache.ws.security.crypto.merlin.keystore.password">
> 							service
> 						</ramp:property>
> 					</ramp:crypto>
> 				</ramp:encryptionCypto>
> 			</ramp:RampartConfig>
> 		</wsp:Policy>

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