Description
Hi Team,
When publishing an API from one tenant's Developer Portal to another tenant's external Developer Portal using the external-api-stores.xml configuration, the "Visit Publisher Developer Portal" redirect link generated in the target tenant's Dev Portal is missing the ?tenant= query parameter.
This means regardless of what is configured in :
- devportal → produces devportal/apis/ — missing ?tenant=
- devportal/apis?tenant=domain (as shown in the official docs) → tenant param gets stripped by the split → still missing ?tenant=
- devportal?tenant=domain → no regex match, naive string concat → malformed URL devportal?tenant=domain/apis/
Steps to Reproduce
- Start WSO2 API Manager 4.5.0
- Create two tenants — e.g. tenant1.com (source) and tenant2.com (target)
- Log in to the Carbon console (https://localhost:9443/carbon) as admin@tenant1.com
- Navigate to Main → Registry → Browse → /_system/governance/apimgt/externalstores/external-api-stores.xml
- Set the config as follows and save:
<ExternalAPIStores>
<StoreURL>https://localhost:9443/devportal/apis?tenant=tenant1.com</StoreURL>
<ExternalAPIStore id="Tenant2Portal" type="wso2" className="org.wso2.carbon.apimgt.impl.publishers.WSO2APIPublisher">
<DisplayName>Tenant2 Portal</DisplayName>
<Endpoint>https://localhost:9443/devportal/apis?tenant=tenant2.com</Endpoint>
<Username>admin@tenant2.com</Username>
<Password>admin123</Password>
</ExternalAPIStore>
</ExternalAPIStores>
- Log in to Publisher as admin@tenant1.com, create and publish an API
- On the published API, go to External Developer Portals tab → select Tenant2 Portal → click Save
- Log in to Dev Portal as admin@tenant2.com (https://localhost:9443/devportal?tenant=tenant2.com)
- Find the published API and click Visit Publisher Developer Portal
Actual Result
Redirects to super tenant Dev Portal — wrong tenant context.
https://localhost:9443/devportal/apis?tenant=tenanat1.com/apis/<uuid>
Expected Result
https://localhost:9443/devportal/apis/<uuid>/overview?tenant=tenant1.com
Should redirect to the source tenant (tenant1.com) Dev Portal where the API can be subscribed to.
Version
4.5.0
Environment Details (with versions)
No response
Description
Hi Team,
When publishing an API from one tenant's Developer Portal to another tenant's external Developer Portal using the external-api-stores.xml configuration, the "Visit Publisher Developer Portal" redirect link generated in the target tenant's Dev Portal is missing the ?tenant= query parameter.
This means regardless of what is configured in :
Steps to Reproduce
Actual Result
Redirects to super tenant Dev Portal — wrong tenant context.
https://localhost:9443/devportal/apis?tenant=tenanat1.com/apis/<uuid>Expected Result
https://localhost:9443/devportal/apis/<uuid>/overview?tenant=tenant1.comShould redirect to the source tenant (tenant1.com) Dev Portal where the API can be subscribed to.
Version
4.5.0
Environment Details (with versions)
No response