我实际上正在尝试本教程:http://wso2.com/library/tutorials/2012/12/providing-xacml-fine-grained-authorization-webapps/
使用admin进行身份验证:admin on localhost:9763 / Entitlement_Sample_WebApp / protected.jsp我遇到错误:
例外
org.wso2.carbon.identity.entitlement.filter.exception.EntitlementFilterException:做出决定时出现异常:java.lang.NullPointerException org.wso2.carbon.identity.entitlement.filter.EntitlementFilter.doFilter(EntitlementFilter.java:191)
我的WSO2 IS PDP接收请求并使用XACML响应正确响应:Permit 那么哪里可能是问题?
谢谢
答案 0 :(得分:1)
EntitlementFilter
错误导致的问题,所以我可以通过更正源文件EntitlementFilter.java
来解决这个问题(第191行)
如下所示:
simpleDecision = decisionElement.getFirstChildWithName(new QName("Result")).getFirstChildWithName(new QName("Decision")).getText();
重写它:
simpleDecision = decisionElement.getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Result”)).
getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Decision”)).getText();
它在QName方法
中省略了命名空间细节在这里(https://nparkstar.wordpress.com/2015/01/27/wso2-as-sample-authorization-%EC%98%A4%EB%A5%98-%EC%88%98%EC%A0%95/)。 对不起,它是用韩文写的,但我希望它有用。
答案 1 :(得分:0)
它可以是从这一行开始的任何地方:pepProxy.getDecision(userName,resource,action,env)
它可能在你的pepProxy代码中,它们返回结果,或者在try try中调用后可能在其他行中。
有一件事是确保PDP根本不是罪魁祸首。
如果您想了解精确的问题+解决方案,请在此处粘贴完整的例外。
:)