将预打包的wso2身份服务器用作wso2 api管理器的密钥管理器时,无法验证令牌

时间:2019-02-21 08:07:53

标签: wso2 wso2is wso2-am

我正在使用WSO2 API Manager 2.6.0,并将预打包的Identity Server 5.7.0配置为密钥管理器。当我在API Store中创建应用程序并生成密钥时,可以看到在Identity Server中正在创建服务提供者。我还可以使用生成的消费者ID和密码获取令牌。 但是,当我将该令牌传递给我的API时,出现了未分类的身份验证错误。以下是我可以在日志中看到的例外情况,

错误-由于未分类的身份验证失败,APIAuthenticationHandler API身份验证失败 org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:访问后端服务进行API密钥验证时出错         在org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:77)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.getAllURITemplates(APIKeyValidator.java:791)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.doGetAPIInfo(APIKeyValidator.java:639)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.findMatchingVerb(APIKeyValidator.java:573)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.getResourceAuthenticationScheme(APIKeyValidator.java:357)         在org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:127)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.isAuthenticate(APIAuthenticationHandler.java:210)         在org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:158)         在org.apache.synapse.rest.API.process(API.java:325)         在org.apache.synapse.rest.RESTRequestHandler.apiProcessNonDefaultStrategy(RESTRequestHandler.java:149)         在org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:95)         在org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:71)         在org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)         在org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:92)         在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)         在org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)         在org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:383)         在org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)         在org.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(NativeWorkerPool.java:172)         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)         在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)         在java.lang.Thread.run(Thread.java:748) 由以下原因引起:org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:访问后端服务进行API密钥验证时出错         在org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:189)         在org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:75)         ...另外21个 造成原因:java.lang.NullPointerException         在org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:183)         ...还有22

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

请交叉检查此问题[1]

[1] https://github.com/wso2/product-apim/issues/3768