Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SAML post请求中间歇缺少spring会话cookie_Spring_Session_Cookies_Spring Saml - Fatal编程技术网

SAML post请求中间歇缺少spring会话cookie

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调

我基于以下示例使用spring SAML:

配置在大多数情况下都有效。我能够将SAML请求发送给IdP,并得到有效的SAML响应。但是,我从IdP返回的post请求在10-20%的时间内不包含会话cookie。但它确实包含其他cookies。我不知为什么。如果它从未包含会话cookie,我想它会更容易理解

会话未超时。我添加了一个HttpSessionListener。它不响应正在销毁的任何会话。但它确实对正在创建的新会话做出了响应。我认为这不会有任何影响,但我将SessionFixation调整为None

我感谢你提供的任何见解。谢谢

证券配置为:

@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