Announcement Announcement Module
Collapse
No announcement yet.
Mutual Authentication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mutual Authentication

    Hi,
    I am using Spring WS with HttpClient and XmlBeans and would now like to plug in support for Mutual Authentication (SSL). Has anyone done this before? Any starting advice would be great.

    Thanks!

  • #2
    Did you find a solution for the stated issue?

    Comment


    • #3
      If you were to use HTTPClient, you could configure credentials as one of the properties of
      org.springframework.ws.transport.http.CommonsHttpM essageSender. Please see the configuration below. This set up works for valid SSL connection. If you are using self signed digital certificate, then you need customized CommonsHttpMessageSender.

      Code:
      <bean id="messageSender" class="org.springframework.ws.transport.http.CommonsHttpMessageSender" destroy-method="destroy">  
              <!--  <property name="connectionTimeout"/>
              <property name="readTimeout"/> -->        
          	<property name="httpClient">
          		<bean class="org.apache.commons.httpclient.HttpClient" >
          			<property name="httpConnectionManager">
          				<bean class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
          				    <property name="maxConnectionsPerHost" value="10"/>
              				<property name="maxTotalConnections" value="1000"/>
          				</bean>	
          			</property>
          		</bean>
          	</property>
             <property name="credentials">
                    <bean id="usernameCredentials" class="org.apache.commons.httpclient.UsernamePasswordCredentials">
                            <property name="username" value="123456"/>
                            <property name="password" value="123456"/>
                     </bean>
          	</property>
          </bean>

      Comment


      • #4
        It turns out we didnt have to do anything special other than install the certs into the JDK default location. After that it just worked.

        Comment

        Working...
        X