2011-10-06 4 views
2

HTTP 기본 인증을 얻는 데 문제가 있습니다. Mule 3.2에서 작동합니다. 우리는 이전에 Mule 2.1.1을 문제없이 사용해 왔지만 이제는 막혔습니다. 나는 뮬 문서의 예에 따라이 같은 구성으로 작은 테스트 서비스를 만들었습니다작동하도록 Mule 3에서 http 기본 인증을 얻을 수 없습니다.

<mule 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:vm="http://www.mulesoft.org/schema/mule/vm" 
    xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security" 
    xmlns:ss="http://www.springframework.org/schema/security" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd 
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd 
    http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd 
    http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.2/mule-spring-security.xsd 
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> 
.... 
<spring:beans> 
    <ss:authentication-manager alias="authenticationManager"> 
    <ss:authentication-provider> 
     <ss:user-service id="userService"> 
     <ss:user name="ross" password="ross" authorities="ROLE_ADMIN"/> 
     <ss:user name="anon" password="anon" authorities="ROLE_ANON"/> 
     </ss:user-service> 
    </ss:authentication-provider> 
    </ss:authentication-manager> 
</spring:beans> 

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

<model name="testModel"> 
    <service name="testService"> 
    <inbound> 
     <http:inbound-endpoint host="localhost" port="8888" exchange-pattern="request-response"> 
     <mule-ss:http-security-filter realm="mule-realm"/> 
     </http:inbound-endpoint> 
    </inbound> 
.... 

을하지만 http://localhost:8888/에 브라우저를 지시 할 때 난 그냥 노새 로그에 예외가 얻을 :

Root Exception stack trace: 
org.mule.api.security.UnauthorisedException: Registered authentication is set to com.computas.mt.mule.security.HttpBasicJBossAuthFilter but there was no security context on the session. Authentication denied on endpoint http://localhost:8888. Message payload is of type: String 
    at org.mule.transport.http.filters.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:160) 
    at org.mule.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:58) 
    at org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:56) 
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) 

응답 헤더를 확인했는데 Mule에서 돌아온 이유는 이것입니다. 나는 또한 인증이 필요하다는 것을 나타내는 헤더를 얻게 될 것이다 :

Content-Type: text/plain 
Content-Length: 243 
Connection: close 

401 Unauthorized 

인증을 사용하지 않을 때 모든 것이 잘 동작한다. 이 경험이 있고 해결책을 찾은 다른 사람? 어쩌면 내가 아주 간단하고 어리석은 실수를 한 것일 수도 있지만, 그 경우에는 실제로 볼 수 없다 ... 참고 : 독립형이 아닌 JBoss 4.2.1에서 Mule을 실행합니다.

감사

조나스 Heineson은

+0

다른 사람들을 도울 수있는 방식으로 자신의 질문에 대답 할 수 있습니까? 그렇게하면 정답으로 자신을 선택할 수 있습니다. 이상하게 보일 수도 있지만, 이와 같은 상황을 처리하는 데 선호되는 방법입니다. – Will

답변

1

다운 그레이드 및 뮬 3.1.2 대신 3.2.0의 모든 것을 사용하여 예상 일했다한다. 그래서 버전 3.2에는 버그가있는 것 같습니다.

+1

이 버그는 3.2.1 버전에서 수정되었습니다. – jonash

+0

실제 BUG 즉 JIRA 링크 – Soumya

+1

에 대한 참조를 제공하십시오. 3.2.1의 릴리스 노트에 따르면 이는 jira 키 EE-2537입니다. 어떤 이유로 jira에 액세스 할 수 없습니다. – jonash