0
我试图使用Spring Security 3SOAP的Web服务和春季安全
确保SOAP的Web服务这是我的配置:
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/myDB"
expected-type="javax.sql.DataSource" />
<http authentication-manager-ref="authenticationManager">
<intercept-url pattern="/**" access="ROLE_USER" requires-channel="https" />
<http-basic />
<logout logout-url="/logout" delete-cookies="JSESSIONID" />
</http>
<authentication-manager id="authenticationManager">
<authentication-provider>
<jdbc-user-service data-source-ref="dataSource" />
</authentication-provider>
</authentication-manager>
Tomcat的配置为SSL,包含密钥库服务器的私钥被使用。我正在使用SOAPUI测试Web服务。我创建了一个执行服务提供的操作之一的请求。在Auth部分中,我根据数据库中存在的值添加了测试用户的用户名和密码。在发送请求之后,我期望创建一个会话,并且不需要再次进行身份验证。在HTTP响应中,JSESSIONID cookie存在。当网站受到同一机制的保护时,用户只需输入一次凭证,直到会话过期,需要重新进行身份验证。
我的配置有什么问题?
编辑:我忘了补充一点,当我多次重新发送相同的请求,接收到的JSESSIONID的cookie始终不同的值。我应该期望它在某个特定会议上是否一样?
SoapUI是否正确发回cookie? – artbristol
@artbristol对于SOAPUI发送的每条消息,似乎都会生成一个新的JSESSIONID cookie。我不知道为什么。 –
这将是因为SoapUI没有为每个新请求返回原始cookie。 – artbristol