DZone
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
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Trending

  • How Does an LLM Request and Response Cycle Work? A Full Walkthrough
  • Designing Secure REST APIs With Spring Boot
  • Deploying a Spring Boot Microservice on AWS Fargate: Lessons From the Outage That Forced Me to Get It Right
  • Retrieval Augmented Generation With Spring AI 2.0, Claude, and PGvector

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.

By 
Suman Mohan user avatar
Suman Mohan
·
Mar. 25, 22 · Code Snippet
Likes (3)
Comment
Save
Tweet
Share
4.7K 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.

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook