Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.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
Spring boot SM_用户对来自SIteminder的每个请求(以及静态请求)_Spring Boot_Spring Security_Siteminder - Fatal编程技术网

Spring boot SM_用户对来自SIteminder的每个请求(以及静态请求)

Spring boot SM_用户对来自SIteminder的每个请求(以及静态请求),spring-boot,spring-security,siteminder,Spring Boot,Spring Security,Siteminder,Siteminder针对所有请求(包括静态资源请求)将SM_用户(userId)发送回应用程序。除了指定的Url之外,我们不需要在每个请求头中都使用userId。 有人能帮助我们在Spring boot+Siteminder配置中如何避免这种情况吗 下面使用Siteminder过滤器 @凌驾 受保护的无效配置(HttpSecurity http)引发异常{ http.addFilterBefore(siteminderFilter(),RequestHeaderAuthenticationFil

Siteminder针对所有请求(包括静态资源请求)将SM_用户(userId)发送回应用程序。除了指定的Url之外,我们不需要在每个请求头中都使用userId。 有人能帮助我们在Spring boot+Siteminder配置中如何避免这种情况吗

下面使用Siteminder过滤器

@凌驾 受保护的无效配置(HttpSecurity http)引发异常{ http.addFilterBefore(siteminderFilter(),RequestHeaderAuthenticationFilter.class) ...... ...... }

@豆子 public RequestHeaderAuthenticationFilter siteminderFilter()引发异常{ RequestHeaderAuthenticationFilter=新的RequestHeaderAuthenticationFilter(); filter.setPrincipalRequestHeader(smEmpID); setAuthenticationManager(authenticationManagerBean()); filter.setCheckForPrincipalChanges(true); filter.setExceptionIfHeaderMissing(false); 回流过滤器


谢谢。

您可以在ACO中设置DisableUserNameVars=No,它将停止发送SM\U用户

对于需要userid的url,可以使用userid设置自定义头,比如HTTP\u SM\u USER

请注意,根据文档,不建议在应用程序中使用SM_用户


对于少数其他应用程序(如与SAP或其他应用程序集成),您必须拥有SM_用户,因此无法逃避。

我需要避免从所有静态请求头读取用户ID。您可以忽略静态资源的模式,例如:
@Override public void configure(WebSecurity web){web.ignering().antMatchers(“/resources/**”,“/static files/**”;}
我们仍然看到相同的问题,谢谢它导致了什么问题,您是如何检测的?