问题标签 [pre-authentication]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
603 浏览

spring - 如何创建请求标头身份验证 (Siteminder) java 配置类

我的 spring boot (2.2.4) 应用程序使用 siteminder 作为身份验证提供程序。成功认证后,站点管理员在 Http 标头中发送用户详细信息(角色)。在应用程序内部,我需要使用 spring security 进行基于角色的授权。这是我正在关注的参考文档 - https://docs.spring.io/spring-security/site/docs/5.0.x/reference/html/preauth.html

我的 spring-security.xml 看起来像这样。

如何创建一个 Java 配置文件,该文件将包含 Spring Boot 应用程序的上述安全性。

我开始了这样的事情,需要在上面的 xml 文件中注入所有的部分。

0 投票
1 回答
70 浏览

java - 尝试使用 AbstractPreAuthenticatedProcessingFilter 实现访问特定 URL 后出现 IllegalStateException

我们扩展了 AbstractPreAuthenticatedProcessingFilter 来验证 shibboleth 用户,它没有什么特别的,只是从特定的请求属性中获取用户名并返回一个 PreAuthenticatedAuthenticationToken。

如果我们访问应用程序的根上下文,它可以正常工作,但如果我们在应用程序中请求特定的 URL,我们会得到“java.lang.IllegalStateException:响应已提交”。

在 SecurityConfig 我们有:

ShibbolethAuthenticationManager 实现 AuthenticationManager 并且只是将 UserDetails 和 GrantedAuthorities 加载到 PreAuthenticatedAuthenticationToken

CustomAuthenticationSuccessHandler 扩展 SavedRequestAwareAuthenticationSuccessHandler 并将用户语言加载到 LocaleProvider 并将当前许可证详细信息加载到会话中。

如果我们在应用程序中请求“/”,它需要我们:

我不知道为什么这些重定向有效,但是当我们请求另一个 URL 时,例如,如果我们请求直接转到 /controlpanel/dashboard,我们会收到错误消息。

编辑:堆栈跟踪:

0 投票
1 回答
350 浏览

spring-boot - 每次都会调用 Spring Security 预身份验证过滤器

我有一个 Spring Boot 应用程序,其中有自定义预身份验证过滤器。我想忽略健康 URL 的安全性,但我做不到。下面是我的配置。

自定义身份验证过滤器看起来像

我不确定为什么/health/e2e是安全的?

PS我尝试@Bean从预授权过滤器中删除,但在这种情况下,过滤器永远不会被任何请求调用。

0 投票
0 回答
18 浏览

amazon-web-services - AWS Cognito:在预身份验证 Lambda 函数中访问请求标头详细信息

有什么方法可以访问请求标头来源预身份验证触发 Lambda 函数