Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-Hosted Gateway Fetching APIs from Both Dev and Production APIM Environments #309

Closed
meezankhan9 opened this issue Oct 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@meezankhan9
Copy link

Report

Hi all,

We are facing an issue with our self-hosted gateway configuration in Azure API Management. The setup involves a custom domain dev.configuration.api.xyz.com in our Dev APIM environment.

Here’s the situation:

We have configured the self-hosted gateway to work with Dev APIM, specifically using the Dev gateway apim-gw-aws-dev.

However, when connecting to the configuration endpoint dev.configuration.api.xyz.com, we’re seeing not only the Dev APIs but also the routes from our Production APIM (api.xyz.com), which should not be the case.

Expected behavior: It should only return APIs from the Dev gateway (apim-gw-aws-dev).

Microsoft’s Investigation:

We worked with Microsoft on the initial authentication issue, and the connectivity to the Dev APIM has been resolved. Below is an excerpt from the analysis:

“We observed an authorization failure due to an invalid token and attempted to generate a new one. When that didn’t resolve the issue, we switched the authorization to an app registration (ccc_apim-gw-aws-we-dev) as API Management Gateway Configuration Reader Role, which resolved the authentication problem. We are now able to retrieve all Dev APIs as expected."

However, when connecting via the dev.configuration.api.xyz.com endpoint, we are still seeing APIs from the Production environment.

Microsoft’s team has advised reaching out to the GitHub community for further assistance on this issue.

What We Need Help With:

Has anyone encountered this issue where a self-hosted gateway is fetching APIs from both Dev and Production when it should only be fetching from the specified Dev gateway? If so, what could be the cause and solution to restrict the gateway to only return the Dev environment APIs?

Any guidance or pointers would be appreciated!

Thanks,
Meezan

Expected Behavior

Hi all,

We are facing an issue with our self-hosted gateway configuration in Azure API Management. The setup involves a custom domain dev.configuration.api.xyz.com in our Dev APIM environment.

Here’s the situation:

We have configured the self-hosted gateway to work with Dev APIM, specifically using the Dev gateway apim-gw-aws-dev.

However, when connecting to the configuration endpoint dev.configuration.api.xyz.com, we’re seeing not only the Dev APIs but also the routes from our Production APIM (api.xyz.com), which should not be the case.

Expected behavior: It should only return APIs from the Dev gateway (apim-gw-aws-dev).

Microsoft’s Investigation:

We worked with Microsoft on the initial authentication issue, and the connectivity to the Dev APIM has been resolved. Below is an excerpt from the analysis:

“We observed an authorization failure due to an invalid token and attempted to generate a new one. When that didn’t resolve the issue, we switched the authorization to an app registration (ccc_apim-gw-aws-we-dev) as API Management Gateway Configuration Reader Role, which resolved the authentication problem. We are now able to retrieve all Dev APIs as expected."

However, when connecting via the dev.configuration.api.xyz.com endpoint, we are still seeing APIs from the Production environment.

Microsoft’s team has advised reaching out to the GitHub community for further assistance on this issue.

What We Need Help With:

Has anyone encountered this issue where a self-hosted gateway is fetching APIs from both Dev and Production when it should only be fetching from the specified Dev gateway? If so, what could be the cause and solution to restrict the gateway to only return the Dev environment APIs?

Any guidance or pointers would be appreciated!

Thanks,
Meezan

Actual Behavior

Hi all,

We are facing an issue with our self-hosted gateway configuration in Azure API Management. The setup involves a custom domain dev.configuration.api.xyz.com in our Dev APIM environment.

Here’s the situation:

We have configured the self-hosted gateway to work with Dev APIM, specifically using the Dev gateway apim-gw-aws-dev.

However, when connecting to the configuration endpoint dev.configuration.api.xyz.com, we’re seeing not only the Dev APIs but also the routes from our Production APIM (api.xyz.com), which should not be the case.

Expected behavior: It should only return APIs from the Dev gateway (apim-gw-aws-dev).

Microsoft’s Investigation:

We worked with Microsoft on the initial authentication issue, and the connectivity to the Dev APIM has been resolved. Below is an excerpt from the analysis:

“We observed an authorization failure due to an invalid token and attempted to generate a new one. When that didn’t resolve the issue, we switched the authorization to an app registration (ccc_apim-gw-aws-we-dev) as API Management Gateway Configuration Reader Role, which resolved the authentication problem. We are now able to retrieve all Dev APIs as expected."

However, when connecting via the dev.configuration.api.xyz.com endpoint, we are still seeing APIs from the Production environment.

Microsoft’s team has advised reaching out to the GitHub community for further assistance on this issue.

What We Need Help With:

Has anyone encountered this issue where a self-hosted gateway is fetching APIs from both Dev and Production when it should only be fetching from the specified Dev gateway? If so, what could be the cause and solution to restrict the gateway to only return the Dev environment APIs?

Any guidance or pointers would be appreciated!

Thanks,
Meezan

Steps to Reproduce the Problem

Logs from self-hosted gateway

example

Self-hosted Gateway Version

1

Deployment

Self-Managed (YAML/Helm)

Platform

Microsoft Azure

Kubernetes Version

None

Anything else?

No response

@meezankhan9 meezankhan9 added the bug Something isn't working label Oct 2, 2024
@tomkerkhove
Copy link
Member

Duplicate of #308

@tomkerkhove tomkerkhove closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants