DZone
Integration Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Integration Zone > Fixing Registered Callback Issue in an Active-Active Setup of WSO2 APIM

Fixing Registered Callback Issue in an Active-Active Setup of WSO2 APIM

This article shows how to fix the registered callback issue, which occurs when you have an Active-Active setup of WSO2 APIM with a shared database.

Suman Mohan user avatar by
Suman Mohan
·
Mar. 25, 22 · Integration Zone · Code Snippet
Like (3)
Save
Tweet
2.25K Views

Join the DZone community and get the full member experience.

Join For Free

This article shows how we can fix the registered callback issue which occurs when you have an Active-Active setup of WSO2 APIM with a shared database.

Use Case

We have 2 nodes or machines “hostA” and “hostB” where WSO2 APIM 3.2.0 is set up in an Active-Active mode. Both of the nodes share the same “apim” and “shared” databases created in Oracle.

Issue

After starting the servers on the respective nodes, when we try to open Publisher or Devportal of one of the nodes, it works fine. For the other node, it will give the registered callback error as shown below.

WSO2 API Manager Sign In Screenshot

WSO2 API Manager Registered callback does not match with the provided URL

The reason for this issue is, as databases are shared between both the nodes, the callback URL for publisher and devportal in the management console for both the nodes point to the same host (i.e., hostA). Hence, the applications open for one host and the other gives the callback error.

Fix

To resolve this issue, we need to add both the hosts in the regex of the callback URL for publisher and devportal in the management consoles of both the nodes as given in the steps below.

  1. Login to the management console of both nodes. 
  2. Click on Service Providers List. 
  3. Edit apim_publisher and apim_devportal. 
  4. Expand Inbound Authentication Configuration.
  5. Expand OAuth/OpenID Connect Configuration.
  6. Click on Edit under Actions column.
  7. Under Application Settings, you will find the Callback URL will be as below.
 
regexp = (https://hostA:9443/publisher/services/auth/callback/login|https://hostA:9443/publisher/services/auth/callback/logout)

     

8. Change it as given below to fix the issue.

 
regexp = 

(https://hostA:9443/publisher/services/auth/callback/login|https://hostA:9443/publisher/services/auth/callback/logout|https://hostB:9443/publisher/services/auth/callback/login|https://hostB:9443/publisher/services/auth/callback/logout)


Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Component Testing of Frontends: Karate Netty Project
  • PermGen and Metaspace
  • MEAN vs MERN Stack: Which One Is Better?
  • Is NoOps the End of DevOps?

Comments

Integration Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo