由于WSO2 IS-KM作为WSO2 API M中的密钥管理器而导致的未分类身份验证失败,导致API身份验证失败

时间:2019-11-05 05:41:43

标签: wso2is wso2-am

您好,我是WSO2产品的新手,正在探索WSO2 API Manager 2.6.0和WSO2 IS-KM 5.9.0。我正在尝试使用WSO2 IS -KM作为WSO2 API M的密钥管理器。我已经按照https://docs.wso2.com/display/AM260/Configuring+WSO2+Identity+Server+as+a+Key+Manager#ConfiguringWSO2IdentityServerasaKeyManager-Step1-DownloadWSO2ISasaKeyManager(WSO2IS-KM)

中提到的所有步骤进行操作

但是,当我尝试通过API管理器调用带有生成令牌的API时,API M碳日志中出现以下错误。

TID:[-1] [] [2019-11-04 16:51:40,484]警告{org.apache.synapse.transport.http.access.AccessConfiguration}-从文件access-log加载属性时出错。属性{org.apache.synapse.transport.http.access.AccessConfiguration} TID:[-1234] [] [2019-11-04 16:51:40,535] INFO {org.apache.synapse.core.axis2.TimeoutHandler}-此引擎将在GLOBAL_TIMEOUT之后的120秒内使所有回调失效,无论在指定或可选的超时之后执行超时操作{org.apache.synapse.core.axis2.TimeoutHandler} TID:[-1234] [] [2019-11-04 16:52:52,019]调试{org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator}-收到令牌403252b7-c890-38ce-add7 -013eb510b1e3 {org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator} TID:[-1234] [] [2019-11-04 16:52:52,019]调试{org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator}-调用了{org.wso2。 carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator} TID:[-1234] [] [2019-11-04 16:52:52,019]调试{org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator}-从标头{org.wso2删除授权标头.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator} TID:[-1234] [] [2019-11-04 16:52:52,020]调试{org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator}-在密钥中找不到资源:/ pocGet / 1.0.0 / 1.0.0 / getAllDDN:GET {org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator} TID:[-1234] [] [2019-11-04 16:52:52,020]调试{org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator}-在msg上下文中设置REST_SUB_REQUEST_PATH:/ getAllDDN {org。 wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator} TID:[-1234] [] [2019-11-04 16:52:52,020]调试{org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator}-密钥资源的高速缓存未命中:/pocGet/1.0 .0 / 1.0.0 / getAllDDN:GET {org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator} TID:[-1234] [] [2019-11-04 16:52:52,021]调试{org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator}-在缓存中找不到密钥的API对象:/ pocGet / 1.0.0 / 1.0.0 {org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator} TID:[-1234] [] [2019-11-04 16:52:52,022]调试{org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClientPool}-初始化新的APIKeyValidatorClient实例{org.wso2。 carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClientPool} TID:[-1234] [] [2019-11-04 16:52:52,032]调试{org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient}-获取所有从网关到密钥管理器的URI模板请求通过网络服务在[2019.11.04 16:52:52,032 IST]处致电:/pocGet/1.0.0 {org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient} TID:[-1234] [] [2019-11-04 16:52:54,786]调试{org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}-调用密钥管理器:API调用失败原因= API_authentication_failure transactionId = urn:uuid:32a9f7d6-f642-4276-8452-637d65a01d61 with userAgent = PostmanRuntime / 7.1.1 for requestURI = / pocGet / 1.0.0 / getAllDDN at time = Mon Nov 04 16:52:52 IST 2019 from clientIP = 10.40.254.70,elapsedTimeInMilliseconds = 0 {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} TID:[-1234] [] [2019-11-04 16:52:54,789]错误{org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}-由于未分类的身份验证失败{org。 wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} 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.run(ServerWorker.java:158)         在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)         ...另外20个 由以下原因引起:org.apache.axis2.AxisFault:org.apache.axis2.databinding.ADBException:意外的子元素{http://model.api.apimgt.carbon.wso2.org/xsd} id         在org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)         在org.wso2.carbon.apimgt.keymgt.stub.validator.APIKeyValidationServiceStub.fromOM(APIKeyValidationServiceStub.java:1452)         在org.wso2.carbon.apimgt.keymgt.stub.validator.APIKeyValidationServiceStub.getAllURITemplates(APIKeyValidationServiceStub.java:245)         在org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:173)         ...另外21个 由以下原因引起:java.lang.Exception:org.apache.axis2.databinding.ADBException:意外的子元素{http://model.api.apimgt.carbon.wso2.org/xsd} id         在org.wso2.carbon.apimgt.api.model.xsd.URITemplate $ Factory.parse(URITemplate.java:3025)         在org.wso2.carbon.apimgt.keymgt.stub.types.axis2.GetAllURITemplatesResponse $ Factory.parse(GetAllURITemplatesResponse.java:489)         在org.wso2.carbon.apimgt.keymgt.stub.validator.APIKeyValidationServiceStub.fromOM(APIKeyValidationServiceStub.java:1376)         ...另外23个 由以下原因引起:org.apache.axis2.databinding.ADBException:意外的子元素{http://model.api.apimgt.carbon.wso2.org/xsd} id         在org.wso2.carbon.apimgt.api.model.xsd.URITemplate $ Factory.parse(URITemplate.java:3019)         ...另外25个

我已经在API管理器中导入了WSO2 IS-KM的自签名证书。 我正在使用Postgre数据库,并为AM(WSO2AMDB),UM(WSO2UMDB)和REG(WSO2CarbonDB)创建了单独的数据库。 WSO2API-M和WSO2IS-KM都共享这些数据库。

请帮助我解决此问题。

N.B-当我仅将WSO2API管理器与它自己的密钥管理器一起使用时,我可以成功测试从PostMan通过API网关对后端REST服务的API调用。

0 个答案:

没有答案