Tohid Makari
Tohid Makari

Reputation: 2484

wso2 api manager 3.2.0 analytics redirect automatically to https://localhost:9443/authenticationendpoint/oauth2_error

why wso2 api manager 3.2.0 analytics redirect automatically from

https://172.24.64.115:9643/analytics-dashboard/

to

https://localhost:9443/authenticationendpoint/oauth2_error.do?oauthErrorCode=invalid_callback&oauthErrorMsg=Registered+callback+does+not+match+with+the+provided+url.

Also following exception : Registered callback does not match with the provided url Error

dashboard config :

## Authentication configuration
auth.configs:
  type: apim
  ssoEnabled: true
  properties:
    adminScope: apim_analytics:admin_carbon.super
    allScopes: apim_analytics:admin openid apim:api_view apim:subscribe apim_analytics:monitoring_dashboard:own apim_analytics:monitoring_dashboard:edit apim_analytics:monitoring_dashboard:view apim_analytics:business_analytics:own apim_analytics:business_analytics:edit apim_analytics:business_analytics:view apim_analytics:api_analytics:own apim_analytics:api_analytics:edit apim_analytics:api_analytics:view apim_analytics:application_analytics:own apim_analytics:application_analytics:edit apim_analytics:application_analytics:view
    adminUsername: admin
    adminPassword: admin
    kmDcrUrl: https://172.24.64.114:9443/client-registration/v0.17/register
    kmTokenUrlForRedirection: https://172.24.64.114:9443/oauth2
    kmTokenUrl: https://172.24.64.114:9443/oauth2
    kmUsername: admin
    kmPassword: admin
    portalAppContext: analytics-dashboard
    businessRulesAppContext : business-rules
    cacheTimeout: 30
    baseUrl: https://172.24.64.115:9643
    grantType: authorization_code
    publisherUrl: https://172.24.64.114:9443
    devPortalUrl: https://172.24.64.114:9443
    externalLogoutUrl: https://172.24.64.114:9443/oidc/logout

Upvotes: 0

Views: 380

Answers (1)

Athiththan
Athiththan

Reputation: 2218

The below-mentioned error can happen when the Hostname configured under the baseUrl of the Analytics Dashboard's deployment.yaml is not matching with the Callback URL configured in the API Manager node.

https://localhost:9443/authenticationendpoint/oauth2_error.do?oauthErrorCode=invalid_callback&oauthErrorMsg=Registered+callback+does+not+match+with+the+provided+url.

Perform the following checks and update the Callback URL accordingly to overcome the behavior

  • Log-in to the API Manager's Carbon Management console with Admin credentials
  • Go to Service Providers > List > sp_analytics_dashboard and expand the OAuth2/OpenID Configurations and click on Edit
  • Verify whether the configured Callback URLs are matching with the Hostname and port defined in baseUrl in the deployment.yaml of the Analytics Dashboard. If not, update them.

Once after updating, save the configurations and try the scenario.

Upvotes: 2

Related Questions