3
votes

After installing version 3.0.0 of the WSO2 API Manager I am getting errors trying to access the Publisher and the Store.

This is the error at the Store (https://myhost.my.org:9443/store)

Error 405 - Method Not Allowed enter image description here

As for the Publisher, the url https://myhost.my.org:9443/publisher redirect to this url...

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

...and displays this error message:

invalid_callback - Registered callback does not match with the provided url

invalid_callback message

Notes:

  • I can access the admin page just fine (https://myhost.my.org:9443/carbon)
  • I replaced every occurance of 'localhost' with 'myhost.my.org' in every file in .../wso2/wso2am/3.0.0/repository/conf, including 'carbon.xml'
  • Logs reveal the following: (.../wso2/wso2am/3.0.0/repository/logs/wso2carbon.log)

    WARN {org.wso2.carbon.identity.oauth2.OAuth2Service} Provided Callback URL does not match with the provided one.

Stack:

  • Ubuntu 18.04
  • OpenJDK 11.0.4
  • WSO2 API Manager 3.0

Installation steps followed: https://apim.docs.wso2.com/en/latest/GettingStarted/quick-start-guide/

Installation commands:

sudo apt install openjdk-11-jre-headless
java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

sudo wget https://product-dist.wso2.com/downloads/api-manager/3.0.0/downloader/wso2am-linux-installer-x64-3.0.0.deb

sudo apt install ./wso2am-linux-installer-x64-3.0.0.deb

sudo service wso2am-3.0.0 start

The installation notes refer to localhost/127.0.0.1. But I am installing on myhost.my.org.

Files manually modified in .../wso2/wso2am/3.0.0/repository/conf (replaced 'localhost' with 'myhost.my.org' and '127.0.0.1' with 'this.is.my.ip'):

api-manager.xml
broker.xml
carbon.xml
datasources.properties
deployment.toml
event-broker.xml
log4j2.properties
messaging-event-broker.xml
metrics.xml
registry.xml
thrift-authentication.xml

Any ideas? Thanks!

3

3 Answers

7
votes

You have to update the callback URL in the Service Provider.

1) Go to /carbon and edit the relevant SP.

enter image description here

2) Edit the OAuth app in it.

enter image description here

You will see the callback URL like this.

regexp=(https://localhost:9443/publisher/services/auth/callback/login|https://localhost:9443/publisher/services/auth/callback/logout)

Update all occurrences of localhost with your hostname.

Save both OAuth app and SP.

2
votes

About:

his is the error at the Store (https://myhost.my.org:9443/store)

Maybe you can find what you need at https://myhost.my.org:9443/devportal

0
votes

If you encounter the same error with callback URL on devportal, log into Management Console, under list of Service Providers, edit admin_admin_store instead.