2011-10-05 7 views
3

HTTPS에서 작동하도록 BlazeDS를 구성하려고합니다. 모든 http 트래픽을 https로 리디렉션하도록 설정된 Apache가 전면에 있습니다. 그런 다음 Apache는 http를 통해 애플리케이션 (JBoss AS 5.1)과 통신합니다.BlazeDS over HTTPS

나는 BlazeDS에 대한 구성을 많이 시도했습니다, 그리고 마지막으로 다음과 같은 솔루션은 나를 위해 일한 :

서비스-config.xml에

<services-config> 
<services> 
    <service-include file-path="remoting-config.xml" /> 
    <service-include file-path="messaging-config.xml" /> 
</services> 

<channels> 
    <channel-definition id="my-secure-amf" 
     class="mx.messaging.channels.SecureAMFChannel"> 
     <endpoint 
      url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" 
      class="flex.messaging.endpoints.AMFEndpoint" /> 
     <properties> 
      <add-no-cache-headers>false</add-no-cache-headers> 
     </properties> 
    </channel-definition> 
    </channels> 
</services-config> 

원격-config.xml에

<service id="remoting-service" class="flex.messaging.services.RemotingService"> 

<adapters> 
    <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/> 
</adapters> 

<default-channels> 
    <channel ref="my-secure-amf"/> 
</default-channels> 

<destination id="MyService" > 
    <properties> 
     <source>path.to.my.Service</source> 
     <scope>application</scope> 
    </properties> 
</destination> 

여기에있는 것은 my-secure-amf 채널에서 채널 정의에 mx.messaging.channels.SecureAMFChannel을 사용하고 flex.messaging.endpoints.AMFEndpoint (flex.messaging.endpoints.SecureAMFEndpoint이 아님)을 사용한다는 것입니다. Apache-Jboss 설정을 사용하면 문제가있을 수 있지만 실제로 다른 태그가 실제로 무엇을 정의하는지 설명하지 못했습니다.

이 모든 것을 이해하려면 다른 URL과 클래스를 사용하여 채널과 엔드 포인트를 정의 할 때 어떤 일이 발생하는지 설명 할 수 있습니까?

답변

5

Flex 응용 프로그램이 SecureAMFChannel을 만들고 변환 된 URL 정보 (url = https : // {server.name} : {server.port}/{context.root}/messagebroker/amfsecure)를 사용하여 Apache 서버에 연결하십시오. 그러나 Apache가 HTTP를 사용하는 응용 프로그램에 연결하도록 구성되었으므로 보안 끝점을 사용할 수 없습니다 (끝점은 URL 스키마 앞에 "https"가 있는지 확인하고 찾을 수없는 경우 오류가 발생합니다).

내 응용 프로그램 중 하나에서 정확히 동일한 구성을 사용하고 있습니다 (Apache 서버 대신 하드웨어 밸런서가 있음).

+0

이 설정에 보안 문제가 있습니까? – thorseye

+0

아니요, 앞쪽 Apache 서버와 사용자 사이의 정보가 암호화됩니다. –