【问题标题】:WSO2 API with WSO2 IS as KeyManager - NPE when using OAuth authorizationWSO2 API 与 WSO2 IS 作为 KeyManager - 使用 OAuth 授权时的 NPE
【发布时间】:2018-03-27 17:29:02
【问题描述】:

拥有 WSO2 API Manager 2.1.0 和 WSO2 IS 5.3.0 KM(带有预打包的密钥管理器)我将密钥管理器设置为 described in the documentation

主要目的是使用其他联合 IdP 对用户进行身份验证和授权,并添加一些授权功能。我的假设是获得 WSO2IS 授权的用户将收到对定义的 APP 和 API 有效的 OAuth 令牌。

到目前为止,所有内容都在 localhost 上,IS 偏移量为 1。我创建了一个 API,一个应用程序,并且可以从 API Store 使用。

当尝试通过 WSO2 IS 使用代码 grant_type 授权对客户端进行授权时:

https://localhost:9444/oauth2/authorize?response_type=code&client_id=KJTbkbFmcDvslo2fjhzfQkaBH3Ea&redirect_uri=http%3A//localhost%3A8080/test2/callback

我被要求提供凭据和授权(看起来不错),然后我收到了 IS 异常:

[2018-03-27 10:43:51,822] ERROR {org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() for servlet [OAuth2Endpoints] in context with path [/oauth2] threw exception
java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
...
 Caused by: java.lang.NullPointerException
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorize(OAuth2AuthzEndpoint.java:251)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.sendRequestToFramework(OAuth2AuthzEndpoint.java:1163)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorize(OAuth2AuthzEndpoint.java:135)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorizePost(OAuth2AuthzEndpoint.java:574)

但是,我假设我错误配置了某些端点 - 知道 OAuth2AuthzEndpoint 实现调用了哪个服务或此异常的潜在原因吗?

【问题讨论】:

    标签: wso2 wso2is wso2-am


    【解决方案1】:

    https://wso2.org/jira/browse/IDENTITY-5581 已经报告了这一点。

    您可以通过 WUM 更新 WSO2 IS 5.3.0 来解决该问题。

    【讨论】:

    • 哦,我明白了,一旦客户获得订阅,它可能是 'wummed' 。在那之前我将不得不重建图书馆:)
    猜你喜欢
    • 1970-01-01
    • 2018-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多