Skip to content

feat: pass accept header to oauth2-proxy#3107

Open
merll wants to merge 1 commit intomainfrom
APL-1762
Open

feat: pass accept header to oauth2-proxy#3107
merll wants to merge 1 commit intomainfrom
APL-1762

Conversation

@merll
Copy link
Copy Markdown
Contributor

@merll merll commented Apr 2, 2026

📌 Summary

This changes the configuration of the Istio backend interface to OAuth2-Proxy, which is expected to return JSON and not HTML on errors.

🔍 Reviewer Notes

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

@svcAPLBot
Copy link
Copy Markdown
Contributor

Comparison of Helm chart templating output:

@@ data.original-values @@
! ± value change in multiline text (one insert, one deletion)
  {
    "autoscaleMax": 5,
    "autoscaleMin": 1,
    "env": {
  
  [77 lines unchanged)]
  
              "x-auth-request-user"
            ],
            "includeRequestHeadersInCheck": [
              "authorization",
-             "cookie"
+             "cookie",
+             "accept"
            ],
            "port": 80,
            "service": "oauth2-proxy.istio-system.svc.cluster.local"
          },
  
  [27 lines unchanged)]
  
      }
    },
    "revision": "1-26-0"
  }

@@ data.merged-values @@
! ± value change in multiline text (one insert, one deletion)
  {
    "affinity": {},
    "autoscaleBehavior": {},
    "autoscaleEnabled": true,
  
  [206 lines unchanged)]
  
              "x-auth-request-user"
            ],
            "includeRequestHeadersInCheck": [
              "authorization",
-             "cookie"
+             "cookie",
+             "accept"
            ],
            "port": 80,
            "service": "oauth2-proxy.istio-system.svc.cluster.local"
          },
  
  [78 lines unchanged)]
  
    "variant": "",
    "volumeMounts": [],
    "volumes": []
  }


@@ data.mesh @@
! ± value change in multiline text (one insert, no deletions)
  accessLogFile: /dev/stdout
  accessLogFormat: |
    [%START_TIME%] "%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% "%UPSTREAM_TRANSPORT_FAILURE_REASON%" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% "%REQ(X-FORWARDED-FOR)%" "%REQ(USER-AGENT)%" "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%UPSTREAM_HOST%" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME% traceID=%REQ(TRACEPARENT)%
  defaultConfig:
  
  [25 lines unchanged)]
  
      - x-auth-request-user
      includeRequestHeadersInCheck:
      - authorization
      - cookie
+     - accept
      port: 80
      service: oauth2-proxy.istio-system.svc.cluster.local
    name: oauth2-proxy-ext-authz
  - envoyExtAuthzGrpc:
  
  [seven lines unchanged)]
  
    interval: 5s
    probes: 3
    time: 10s
  trustDomain: cluster.local


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