【发布时间】:2016-02-15 13:41:55
【问题描述】:
有时(?)WSO2 IS 用户无法通过以下异常进行身份验证。重试时,用户将通过身份验证。任何想法可能是原因/解决方案?我们设置了会话缓存。
使用 WSO2 Identity Server 5.0.0.SP1 / SAML 身份验证,身份验证器设置为高级(单步,多个选项)。我找不到正确的源代码提交来签出(以匹配异常中的行号)
提前谢谢大家 加布里埃尔
TID: [0] [IS] [2016-02-15 13:07:22,914] 错误 {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - 身份验证框架中的异常 {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} java.lang.NullPointerException 在 org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:83) 在 org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:121) 在 org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:94) 在 org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:54) 在 org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doGet(CommonAuthenticationServlet.java:44) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:735) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
编辑:
WSO2 IS 5.1.0 也出现此异常
参见Source code 第 105 行
StepConfig stepConfig = context.getSequenceConfig().getStepMap().get(currentStep);
// if the current step is completed
if (stepConfig.isCompleted()) {
stepConfig.setCompleted(false);
ERROR org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - Exception in Authentication Framework
java.lang.NullPointerException
at org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:105)
at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:115)
看起来 stepConfig 从身份验证配置中“消失”了。设置在单个节点上完成,会话持久化到数据库中。
【问题讨论】:
-
在此设置中是否进行了任何自定义?如果是,它们是什么?
-
设置了“高级身份验证器”,用户只需一步即可选择使用 IWA 或联合 SAML IdP 进行身份验证。环境数据库是从 WSO2 IS 5.0.0.SP1 迁移到 5.1.0 的 postgresql(两个版本都发生了这个问题,经过一些调试后,currentStep 的值似乎为 2,其中只定义了一个步骤)。事实上我无法在本地重现这个问题,它可能依赖于我不知道的东西