Skip to content

fix(oidc-ui): set proxy_http_version 1.1 for backend proxy_pass locations - #2561

Open
bhumi46 wants to merge 1 commit into
mosip:release-2.0.xfrom
bhumi46:fix/oidc-ui-proxy-http-version
Open

bhumi46 wants to merge 1 commit into
mosip:release-2.0.xfrom
bhumi46:fix/oidc-ui-proxy-http-version

Conversation

@bhumi46

@bhumi46 bhumi46 commented Sep 8, 2026

Copy link
Copy Markdown
Member

What

oidc-ui's nginx proxy_pass blocks never set proxy_http_version, so nginx sends HTTP/1.0 to the esignet backend by default. Since helm/esignet/templates/service.yaml names the backend Service port http, Istio (when sidecar injection is enabled) applies a strict HTTP/1.1-only codec on that port's inbound Envoy listener, which rejects the HTTP/1.0 request with 426 Upgrade Required.

This fix adds to every proxied location block:

proxy_http_version 1.1;
proxy_set_header   Connection "";

Why

Standard nginx guidance when proxying to any HTTP/1.1-capable (keep-alive) upstream. Fixes the 426 without any Istio/Service changes.

How I verified

Root-caused by testing the same request as HTTP/1.0 vs HTTP/1.1 directly against the backend Service from inside the mesh (via the oidc-ui pod's istio-proxy sidecar):

  • curl --http1.0 http://<esignet-service>/v1/esignet/...426 Upgrade Required from istio-envoy
  • curl --http1.1 (same URL) → normal response from the app

Applied this exact patch live to a running deployment's nginx.conf ConfigMap and confirmed the endpoint changed from 426 Upgrade Required to a normal backend response (405 Method Not Allowed for a GET on a POST-only endpoint, i.e. correctly reaching the app).

Fixes #2559

Summary by CodeRabbit

  • Bug Fixes
    • Improved proxy communication with the OIDC service by enabling HTTP/1.1 keep-alive connections for key authentication and discovery endpoints.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3d6129f7-53f7-44ef-b86c-fe3e0d5c9358

📥 Commits

Reviewing files that changed from the base of the PR and between fbc5b91 and 441e3a7.

📒 Files selected for processing (1)
  • helm/oidc-ui/templates/configmap.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The nginx ConfigMap configures HTTP/1.1 upstream proxying for five oidc-ui locations. Each location clears the Connection header for keep-alive-compatible requests.

Changes

OIDC upstream proxy configuration

Layer / File(s) Summary
Configure HTTP/1.1 proxy locations
helm/oidc-ui/templates/configmap.yaml
Adds proxy_http_version 1.1; and proxy_set_header Connection ""; to five proxied locations: API, actuator, JWKS, OpenID configuration, and OAuth authorization server paths.

Priority: ⬆️ High — Impact reflects high issue severity.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Severity of issue fixed: High

Merge Risk: ⚪ Minimal · up to 6b255

OIDC UI backend and discovery proxy requests now use HTTP/1.1 consistently, addressing the upstream protocol rejection without introducing an identified merge-readiness risk.

Suggested reviewers: sacrana0

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: enabling HTTP/1.1 for oidc-ui backend proxy locations.
Linked Issues check ✅ Passed The changes satisfy issue #2559 by adding proxy_http_version 1.1 and clearing the Connection header in all five required nginx proxy locations. This addresses the HTTP/1.0 and 426 Upgrade Required fai…
Out of Scope Changes check ✅ Passed All changes are limited to the nginx proxy configuration required by issue #2559. No unrelated code or configuration changes are present. No GDPR or MOSIP compliance impact is identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

HTTP/1.1 now carries the stream
Nginx keeps the upstream dream
Empty headers clear the way
Five locations work today
Istio sees the protocol stay

Comment @coderabbitai help to get the list of available commands.

…ions

nginx's proxy_pass defaults to HTTP/1.0 when talking to the upstream
esignet service. When the esignet Service port is named 'http' (as in
helm/esignet/templates/service.yaml), Istio configures the sidecar's
inbound listener with a strict HTTP/1.1-only codec that rejects
HTTP/1.0 requests with 426 Upgrade Required.

Set proxy_http_version 1.1 and clear the Connection header on every
proxied location so oidc-ui's nginx speaks HTTP/1.1 to the backend,
matching standard nginx guidance for proxying to keep-alive-capable
upstreams.

Fixes mosip#2559

Signed-off-by: bhumi46 <bhumi11111a@gmail.com>
@bhumi46
bhumi46 force-pushed the fix/oidc-ui-proxy-http-version branch from 441e3a7 to 6b255ee Compare September 8, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants