2013-06-07 4 views
2

내 테스트에 액세스하려면 http://hostDesired.com/service?WSDL을 사용합니다. Mule에 직접 실행되는 정규 서비스 프록시입니다.Mule HTTPS 액세스

https://hostDesired.com/service?WSDL을 사용하여 액세스하려면 어떻게 변경해야합니까? 내가 시도하고 작동하지 않았다이었다

<?xml version="1.0" encoding="UTF-8"?> 

<mule xmlns:ssl="http://www.mulesoft.org/schema/mule/ssl" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" 
    xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:https="http://www.mulesoft.org/schema/mule/https" 
    xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:spring="http://www.springframework.org/schema/beans" xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern" 
    xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security" 
    xmlns:ss="http://www.springframework.org/schema/security" 
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd 
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd 
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.4/mule.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.4/mule-http.xsd 
http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.4/mule-pattern.xsd 
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.4/mule-spring-security.xsd 
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd 
http://www.mulesoft.org/schema/mule/ssl http://www.mulesoft.org/schema/mule/ssl/current/mule-ssl.xsd" version="EE-3.4.0"> 

    <mule-ss:security-manager> 
     <mule-ss:delegate-security-provider 
      name="memory-dao" delegate-ref="authenticationManager" /> 
    </mule-ss:security-manager> 

    <spring:beans> 
     <ss:authentication-manager alias="authenticationManager"> 
      <ss:authentication-provider> 
       <ss:user-service id="userService"> 
        <ss:user name="asd" password="asd" authorities="ROLE_ADMIN" /> 
       </ss:user-service> 
      </ss:authentication-provider> 
     </ss:authentication-manager> 
    </spring:beans> 

    <https:connector name="httpsConnector"> 
    <https:tls-key-store path="keystore.jks" 
     keyPassword="${jks.password}" storePassword="${jks.password}" /> 
    </https:connector> 

    <pattern:web-service-proxy name="ProxyService" 
      inboundAddress="https://desiredHost/services/Services/Service" 
      outboundAddress="http://remoteHost/services/Service.svc" 
      wsdlLocation="http://remoteHost/services/Service.svc?singleWSDL"/> 

</mule> 

그것은 ... 작동하지 않았다 어떻게, 내가 뮬으로 변경하기 위해 무엇을 할 수 있는가?

기본적인 아이디어는 클라이언트의 암호화를 프록시 서버에 추가하는 것입니다.

+0

뮬 버전? 어떤 오류가 발생합니까? 스택 트레이스? 또한'HTTPS' 커넥터 설정 방법을 보여주십시오. –

+0

안녕하세요 David, 버전 3.4입니다. 아무 것도 추가하지 않았습니다. 이전에는 http : // https 대신에 같은 패턴을 사용하여 관련 항목을 찾지 못했습니다. 메시지에 의해 커넥터 유형이 사용되어야합니다. Mule Studio + Mule에는 아무런 단서가 없습니다 ... –

+0

구성은'http : // desiredHost/services/Services/Service'를 보여줍니다 :'https : ...'가되어서는 안됩니까? –

답변

3

HTTPS 인바운드 엔드 포인트를 사용할 때 Mule에서 요청을 처리 할 때 사용할 인증서를 알 수 있도록 HTTPS 커넥터를 구성해야합니다.

에서 HTTPS 커넥터의 구성 페이지를 참조하십시오

<https:connector name="httpsConnector"> 
    <https:tls-key-store path="keystore.jks" 
     keyPassword="${jks.password}" storePassword="${jks.password}" /> 
</https:connector> 
: http://www.mulesoft.org/documentation/display/current/HTTPS+Transport+Reference

을가 문서에 매우 혼란 때문에, 나에게 당신이 필요로하는 모든 유사한 https:connector에서 올바르게 구성 https:tls-key-store 요소입니다 추가 할 수 있습니다

이 샘플에서는 키 저장소 파일의 이름이 keystore.jks이고 클래스 경로에서 사용할 수 있다고 가정합니다. 또한 jks.password 속성을 선언했으며 키 저장소와 키에 동일한 암호를 사용한다고 가정합니다. 자신의 상황에 맞게 수정하십시오.

+0

이제 전체 테스트 코드를 추가 했으므로 이제는 더 명확하게 볼 수 있습니다. 더 많은 답변을 검색하려고했지만 Google이 다운되었습니다 : / –