首页 文章

使用步骤验证器时WSO2IS NullPointerException

提问于
浏览
1

偶尔(?)WSO2 IS用户无法通过以下异常进行身份验证 . 重试时,将对用户进行身份验证 . 任何想法可能是什么原因/解决方案?我们设置了会话缓存 .

使用WSO2 Identity Server 5.0.0.SP1 / SAML身份验证,并将身份验证器设置为高级(单步,多个选项) . 我找不到正确的源代码提交签出(以匹配异常中的行号)

先谢谢大家加布里埃尔

TID:[0] [IS] [2016-02-15 13:07:22,914] ERROR - 身份验证框架中的例外情况org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler中的 java.lang.NullPointerException .handle(DefaultStepBasedSequenceHandler.java:83)位于org.wso2.carbon.identity.application的org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:121) org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:54)atg的.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:94) .wso2.carbon位于javax.servlet.http.HttpServlet.service(HttpServlet.java:735)的javax.servlet.http.HttpServlet.service(HttpServlet)中的.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doGet(CommonAuthenticationServlet.java:44)的.java:848)

Edit:

此异常也发生在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'dissapeared' . 设置在单个节点上完成,会话持久性进入数据库 .

1 回答

  • 2

    显然它看起来像并发问题 .

    当多个并发请求在用户已经过身份验证时发送到SSO endpoints 时,所有线程都在尝试处理修改相同身份验证上下文对象(currentStep计数器)的请求,因此缓存的身份验证上下文将进入无效状态 .

    有效用例是客户端应该只向SSO endpoints 发送一个请求,因此处理UI的团队必须修复它 . 但是 - 这只是一个不能长期阻止这个问题的快速解决方案 . 我们必须真正用WSO2(并自己修复代码):)

    G .

相关问题