wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

Error while generating keys in Okta #1386

Closed shilmyhasan closed 1 year ago

shilmyhasan commented 1 year ago

Problem

A 400(Bad request) error is thrown while trying to create application keys in Okta. The steps mentioned in the docs have been followed and get the below error in the latest OKTA web services.

Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while executing SubscriberKeyMgtClient. at org.wso2.carbon.apimgt.impl.utils.APIUtil.handleException_aroundBody80(APIUtil.java:1609) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.utils.APIUtil.handleException(APIUtil.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication_aroundBody8(AbstractApplicationRegistrationWorkflowExecutor.java:182) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication_aroundBody6(AbstractApplicationRegistrationWorkflowExecutor.java:120) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete_aroundBody2(ApplicationRegistrationSimpleWorkflowExecutor.java:77) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] ... 61 more Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error while creating Oauth Application at org.wso2.okta.client.OktaOAuthClient.handleException(OktaOAuthClient.java:772) ~[okta.key.manager_3.2.0.jar:?] at org.wso2.okta.client.OktaOAuthClient.createApplication(OktaOAuthClient.java:119) ~[okta.key.manager_3.2.0.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication_aroundBody8(AbstractApplicationRegistrationWorkflowExecutor.java:153) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication_aroundBody6(AbstractApplicationRegistrationWorkflowExecutor.java:120) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete_aroundBody2(ApplicationRegistrationSimpleWorkflowExecutor.java:77) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] ... 61 more Caused by: org.wso2.carbon.apimgt.impl.kmclient.KeyManagerClientException: Received status code: 400 Reason: at org.wso2.okta.client.OktaErrorDecoder.decode(OktaErrorDecoder.java:46) ~[okta.key.manager_3.2.0.jar:?] at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:98) ~[io.github.openfeign.feign-core_11.9.1.jar:?] at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:141) ~[io.github.openfeign.feign-core_11.9.1.jar:?] at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91) ~[io.github.openfeign.feign-core_11.9.1.jar:?] at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[io.github.openfeign.feign-core_11.9.1.jar:?] at com.sun.proxy.$Proxy475.createApplication(Unknown Source) ~[?:?] at org.wso2.okta.client.OktaOAuthClient.createApplication(OktaOAuthClient.java:112) ~[okta.key.manager_3.2.0.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication_aroundBody8(AbstractApplicationRegistrationWorkflowExecutor.java:153) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication_aroundBody6(AbstractApplicationRegistrationWorkflowExecutor.java:120) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete_aroundBody2(ApplicationRegistrationSimpleWorkflowExecutor.java:77) ~[org.wso2.carbon.apimgt.impl_9.28.71.jar:?] ... 61 more [2023-02-06 20:20:59,340] ERROR - GlobalThrowableMapper org.wso2.carbon.apimgt.impl.workflow.WorkflowException: Error occurred while executing SubscriberKeyMgtClient.

Solution

The issue should be analyzed and find a suitable solution.

Affected Component

Analytics

Version

No response

Implementation

No response

Related Issues

No response

Suggested Labels

No response

shilmyhasan commented 1 year ago

Hi Team,

The issue resolved after applying appropriate configurations.

Thanks.