저는 SOAP 웹 서비스에 처음으로 익숙합니다. 기본적인 것으로 보이지만 여전히 해결 방법을 찾을 수는 없습니다. 스프링 WS와 XWS 보안을 사용하여 작성된 SOAP 서버가 있습니다. 다음은 관련 콩입니다nonce로 스프링 WS 다이제스트 인증, 챌린지 생성
<bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor">
<property name="policyConfiguration"
value="classpath:security-policy.xml"/>
<property name="callbackHandlers">
<list>
<ref bean="passwordValidationHandler"/>
</list>
</property>
</bean>
<bean id="passwordValidationHandler" class="org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler">
<property name="users">
<props>
<prop key="user">*****</prop>
</props>
</property>
</bean>
그리고 다음은 security-policy.xml
입니다 :
<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
<xwss:RequireUsernameToken passwordDigestRequired="true" nonceRequired="true"/>
<xwss:UsernameToken digestPassword="true" useNonce="true"/>
</xwss:SecurityConfiguration>
것은이 차단 요청이 방지됩니다 (한 번 토큰 내가 비표를 사용하여 다이제스트 인증을 extablish 할 것입니다 다시 전송되지 않음). 내가 아는 한 (그리고 여기에 http://www.whitemesa.com/soapauth.html#S4으로 묘사되어있다.) 서버는 챌린지 (nonce와 timestamp, 나는 생각한다)를 만들어야하고, 클라이언트는 패스워드와 타임 스탬프로 그것을 암호화하고 그것을 검증을 위해 서버로 되돌려 보내야한다. 그리고 이것은 모든 요청에 대해 작동해야합니다. 사용자가 빈 요청을 보내더라도 서버는 문제를 제공해야합니다. 하지만 제 경우에는 작동하지 않습니다. 내가 놓친 게 있니?