SAML post请求中间歇缺少spring会话cookie
我基于以下示例使用spring SAML: 配置在大多数情况下都有效。我能够将SAML请求发送给IdP,并得到有效的SAML响应。但是,我从IdP返回的post请求在10-20%的时间内不包含会话cookie。但它确实包含其他cookies。我不知为什么。如果它从未包含会话cookie,我想它会更容易理解 会话未超时。我添加了一个HttpSessionListener。它不响应正在销毁的任何会话。但它确实对正在创建的新会话做出了响应。我认为这不会有任何影响,但我将SessionFixation调整为None 我感谢你提供的任何见解。谢谢 证券配置为:SAML post请求中间歇缺少spring会话cookie,spring,session,cookies,spring-saml,Spring,Session,Cookies,Spring Saml,我基于以下示例使用spring SAML: 配置在大多数情况下都有效。我能够将SAML请求发送给IdP,并得到有效的SAML响应。但是,我从IdP返回的post请求在10-20%的时间内不包含会话cookie。但它确实包含其他cookies。我不知为什么。如果它从未包含会话cookie,我想它会更容易理解 会话未超时。我添加了一个HttpSessionListener。它不响应正在销毁的任何会话。但它确实对正在创建的新会话做出了响应。我认为这不会有任何影响,但我将SessionFixation调
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.httpBasic()
.authenticationEntryPoint(samlEntryPoint());
http
.addFilterBefore(metadataGeneratorFilter(), ChannelProcessingFilter.class)
.addFilterAfter(samlFilter(), BasicAuthenticationFilter.class)
.addFilterBefore(samlFilter(), CsrfFilter.class);
http
.authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/saml/**").permitAll()
.antMatchers("/css/**").permitAll()
.antMatchers("/img/**").permitAll()
.antMatchers("/js/**").permitAll()
.anyRequest().authenticated();
http
.logout()
.disable(); // The logout procedure is already handled by SAML filters.
}
application.yml文件包含以下内容。我自定义了会话cookie名称,以避免与其他应用程序冲突
server:
port: 8091
servlet:
context-path: /saml
session:
timeout: 30m
cookie:
name: SAMLSESSIONID
secure: false