oblivion
BlogsPortfolioContact
cloud Dispatch10 min read

The 404 That Wasn't a Kong Issue: Debugging a Stale Reverse Proxy Mapping

An SRE incident investigation into PISA-GUI returning 404 after an NGINX-to-Kong migration, tracing the issue to a stale WPAMS reverse proxy mapping.

observed StatusHTTP 404 Not Found
direct Endpoint StatusHTTP/2 403 (Unauthenticated)
migration ScopeNGINX to Kong API Gateway
resolutionUpstream WPAMS reverse proxy destination alignment

1. Incident Overview

A migration from one ingress or API gateway to another does not end when the new gateway is deployed and its routes are configured.

Every upstream system that forwards traffic to the application must also be updated.

This became apparent during the PISA-GUI migration from NGINX to Kong.

After the migration, users accessing PISA-GUI through its existing WPAMS URL encountered:

TEXT
404 Not Found

The initial suspicion naturally fell on the newly introduced Kong configuration. However, direct testing of the new Kong endpoint showed that it was reachable.

The investigation eventually identified a different problem: WPAMS was still forwarding requests to the old NGINX endpoint rather than the new Kong endpoint.

The Kong migration itself was not the component that needed correction. The missing piece was the upstream reverse proxy mapping.

Incident metadata

AttributeDetails
ApplicationPISA-GUI
EnvironmentPROD
Regioneu-central-1
Namespacepisa
Orbit spacecbs2
MigrationNGINX to Kong
Change referenceCHG000000324321
User-facing symptomHTTP 404
Existing access pathWPAMS
New gatewayKong
Confirmed causeWPAMS mapped to the old NGINX URL

2. Understanding the Architecture

Before investigating the error, it is important to understand the request path.

PISA-GUI was accessed through an established WPAMS URL:

TEXT
https://pisa-emea-prod.bmwgroup.net/pisa-gui/

As part of the migration, the application was moved behind a new Kong endpoint:

TEXT
https://pisa-gui.prod.cbs2.api.orbit.eu-central-1.aws.cloud.bmw/pisa-gui/

The application endpoint had changed, but the existing user-facing URL was expected to continue working.

That meant WPAMS needed to forward incoming requests to the new Kong endpoint.

The architecture should have looked like this:

Technical Architecture FlowMermaid.js
Rendering architectural diagram...
Figure 1: PISA-GUI Stale WPAMS Mapping Architecture and Investigation Boundary
Download .excalidrawExcalidraw Vector
PISA-GUI: stale WPAMS mapping after NGINX → Kong migrationRequest routing investigation — observed responses and configuration boundaryUser / BrowserWPAMS URL/pisa-gui/WPAMSReverse proxy / URLmappingOld NGINX endpointStale destinationNew Kong endpointPISA-GUI routeObserved mappingExpected targetWPAMS URL returned 302(authentication redirect)Direct Kong request returned 403without authenticationEvidence• WPAMS path: HTTP 302 to BMW authentication• Direct Kong path: HTTP/2 403 unauthenticated• Kong-side route/config verifiedRCA conclusionWPAMS remained mapped to the old NGINX URLinstead of the new Kong endpoint.Update the upstream mapping and validate auth.A 403 from the direct endpoint is not proof of a broken route when authentication is required.

The problem was that the actual WPAMS mapping had not followed the migration.

3. Initial Symptoms

The first indication was straightforward:

TEXT
https://pisa-emea-prod.bmwgroup.net/pisa-gui/

returned:

TEXT
404 Not Found

At this stage, several components could potentially have been responsible:

  • WPAMS reverse proxy configuration.
  • Kong route configuration.
  • Kubernetes Ingress or gateway routing.
  • Kubernetes Service configuration.
  • Application context path.
  • Authentication or authorization handling.

Rather than immediately modifying Kong, the investigation separated the two access paths:

  1. Access through the existing WPAMS URL.
  2. Access directly through the new Kong endpoint.

This distinction was important because it allowed the gateway to be tested independently of the upstream reverse proxy.

4. Investigation: Testing Both Endpoints

Step 1: Test the existing WPAMS URL

The first test was against the URL users normally accessed.

BASH
curl -I -v \
  https://pisa-emea-prod.bmwgroup.net/pisa-gui/

The response showed:

TEXT
HTTP/1.1 302 Found

The response redirected the request to the BMW authentication endpoint.

A redirect is not the same as a successful application response. It indicates that the request was redirected to another URL.

This observation provided useful information about the authentication flow, but it did not prove that WPAMS was forwarding traffic to the correct application endpoint.

Step 2: Test the new Kong endpoint directly

The next step was to bypass WPAMS and test the new Kong URL.

BASH
curl -I -v \
  https://pisa-gui.prod.cbs2.api.orbit.eu-central-1.aws.cloud.bmw/pisa-gui/

The response was:

TEXT
HTTP/2 403

At first glance, a 403 may look like another application failure.

However, this response was returned by a direct request without the required authentication context.

A 403 response means the server understood the request but refused to authorize it.

The important distinction was that the new Kong endpoint was reachable and responding.

It did not establish that an unauthenticated request should be allowed to access the application.

Step 3: Interpret the responses correctly

Request pathObserved responseInterpretation
WPAMS URLHTTP 302Redirect to BMW authentication
Direct Kong URLHTTP/2 403Endpoint responding; unauthenticated access denied
Expected application behaviorAuthenticated application responseRequires validation with the correct authentication context

This is a useful troubleshooting lesson:

HTTP status codes must be interpreted in the context of the request path and authentication state.

A 403 from an unauthenticated direct request does not automatically indicate a broken Kong route.

5. Validate Kong and Kubernetes Configuration

Since the direct Kong endpoint was reachable, the next step was to verify that the Kubernetes-side configuration matched the migration design.

The investigation checked the relevant resources in the pisa namespace.

Check Ingress resources

BASH
kubectl get ingress -n pisa

Inspect the relevant resource:

BASH
kubectl get ingress <ingress-name> \
  -n pisa -o yaml

Check ConfigMaps

BASH
kubectl get configmap -n pisa

Inspect the relevant configuration:

BASH
kubectl get configmap <configmap-name> \
  -n pisa -o yaml

Check Services

BASH
kubectl get svc -n pisa

Inspect the application Service:

BASH
kubectl get svc <service-name> \
  -n pisa -o yaml

The purpose of these checks was to verify:

  • The expected Kong routing configuration existed.
  • The application path was configured.
  • The Service referenced the correct application backend.
  • The Kubernetes-side configuration reflected the new endpoint.

The Kong-side configuration was verified and found to be correctly configured for the new endpoint.

This reduced the likelihood that the 404 originated from a missing or incorrectly configured Kong route.

Once the new Kong endpoint and its Kubernetes configuration had been verified, attention shifted to the component sitting in front of it.

WPAMS was responsible for preserving the existing user-facing URL while forwarding traffic to the application.

The migration had changed the backend gateway, but the WPAMS mapping still referenced the previous NGINX endpoint.

Conceptually, the stale mapping looked like this:

TEXT
WPAMS
  |
  v
Old NGINX endpoint
  |
  v
Previous PISA-GUI routing path

The expected mapping was:

TEXT
WPAMS
  |
  v
New Kong endpoint
  |
  v
PISA-GUI route

This explained why validating Kong directly was not enough.

The direct endpoint and the user-facing endpoint were two different request paths, with WPAMS acting as an additional routing dependency.

Actual versus expected request path

Technical Architecture FlowMermaid.js
Rendering architectural diagram...

The issue was not that Kong could not route to PISA-GUI. It was that the established upstream entry point had not been updated to use Kong.

7. Root Cause Analysis

Root cause

WPAMS retained the old NGINX destination after the PISA-GUI migration to Kong.

As a result, requests made through the existing WPAMS URL were not routed to the new Kong endpoint.

The new Kong endpoint was independently reachable, and its Kubernetes-side configuration was verified.

Contributing factor

The migration validation focused on the new Kong endpoint and its internal routing configuration.

However, the upstream reverse proxy mapping was also part of the end-to-end application access path.

A gateway migration is incomplete until every upstream dependency is updated or intentionally redirected.

Why the initial symptoms were misleading

There were two different HTTP responses during the investigation:

  • The WPAMS URL returned a 302 authentication redirect.
  • The direct Kong endpoint returned HTTP/2 403 without authentication.

Neither response alone established the routing problem.

The decisive finding came from validating the WPAMS destination mapping against the new Kong endpoint.

8. Remediation

The required correction was to update the WPAMS reverse proxy mapping so that the existing application URL forwarded requests to the new Kong endpoint.

Expected destination:

TEXT
https://pisa-gui.prod.cbs2.api.orbit.eu-central-1.aws.cloud.bmw/pisa-gui/

The remediation should include:

  1. Update the WPAMS upstream destination.
  2. Remove the stale NGINX endpoint reference from the active mapping.
  3. Validate the configured path and trailing-slash behavior.
  4. Verify the authentication flow through the existing WPAMS URL.
  5. Test the application using an authenticated session.
  6. Confirm that the request reaches the expected Kong route and backend Service.

The existing WPAMS URL should remain the user-facing entry point if that is the intended application architecture.

The goal is to change the upstream destination without unnecessarily changing the URL used by end users.

9. Post-Fix Validation Checklist

A successful configuration update should be validated end to end.

ValidationExpected outcome
WPAMS URLReaches the intended authentication flow
AuthenticationBMW authentication completes successfully
WPAMS upstreamPoints to the new Kong endpoint
Kong routeMatches /pisa-gui/
Kubernetes ServiceRoutes to the expected backend
ApplicationPISA-GUI loads successfully
Old NGINX mappingNo longer used by the active WPAMS route
LogsRequest can be correlated across proxy and gateway layers

A direct unauthenticated curl request returning 403 should not be treated as a failed validation if the application intentionally requires authentication.

Use an authorized test session or the approved authentication mechanism to validate the complete user journey.

10. Lessons for Platform Engineering and SRE

1. Gateway migrations involve more than the gateway

When replacing NGINX with Kong, upstream reverse proxies, DNS records, application routing, authentication integrations, and monitoring must all be considered.

2. Test the complete request path

Testing the new gateway directly is useful, but it does not validate the existing user-facing URL.

Both paths must be checked.

3. Understand HTTP status codes before troubleshooting

A 302 redirect, 403 authorization response, and 404 routing response represent different behaviors.

Treating every non-200 response as the same failure can send an investigation in the wrong direction.

4. Validate external dependencies during migration

The application may be healthy, the new gateway may be correctly configured, and Kubernetes Services may be working — yet users can still experience an outage because an upstream system has stale configuration.

5. Keep migration checklists end to end

A production migration checklist should explicitly include:

  • New gateway route validation.
  • Upstream reverse proxy updates.
  • Authentication and authorization validation.
  • Existing URL compatibility.
  • Application backend connectivity.
  • Rollback destination.
  • End-to-end smoke testing.

11. Final Takeaway

This incident demonstrates why troubleshooting should follow the actual request path rather than focusing only on the component that was recently changed.

Kong was deployed and its routing configuration was verified. The application endpoint was reachable.

The failure occurred because WPAMS continued to use the old NGINX destination.

The lesson: a gateway migration is only complete when every upstream system knows where the new gateway is.

---

Incident reconstruction based on the available investigation findings. HTTP response examples reflect the observed behavior; the direct Kong 403 was obtained without authentication and should not be interpreted as proof of a broken route.

Referenced In & Suggested Next Reads

Bidirectionally cross-referenced across technical domains.