You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Gabor Roczei (Jira)" <ji...@apache.org> on 2026/03/19 15:37:00 UTC

[jira] [Created] (YARN-11941) Follow-up to YARN-11937: Improve yarn_knox_proxy parameter detection in HTTP requests

Gabor Roczei created YARN-11941:
-----------------------------------

             Summary: Follow-up to YARN-11937: Improve yarn_knox_proxy parameter detection in HTTP requests
                 Key: YARN-11941
                 URL: https://issues.apache.org/jira/browse/YARN-11941
             Project: Hadoop YARN
          Issue Type: Improvement
          Components: yarn
    Affects Versions: 3.5.1
            Reporter: Gabor Roczei


*Problem Statement*

The fix for YARN-11937 introduced a mechanism to handle yarn_knox_proxy=true (yarn.web-proxy.redirect-flag=yarn_knox_proxy) parmeter in the HTTP query. However the current implementation might not correctly identify this parameter when it is part of a larger query string containing multiple parameters. For example in the following URL:
{code:java}
...?parameter1=true&parameter2=true&yarn_knox_proxy=true&doAs=user{code}

Currently the logic expects the query string to be exactly yarn_knox_proxy=true, it will fail to recognize the flag when other parameters (like doAs, parameter1, or parameter2) are present.


[https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java#L555]
{code:java}
      String redirectFlagName = conf.get(YarnConfiguration.PROXY_REDIRECT_FLAG, "");
      if (!redirectFlagName.isBlank() && toFetch.getQuery().equals(redirectFlagName + "=true")) {
        ProxyUtils.sendRedirect(req, resp, toFetch.toString());
        return;
      }{code}
Proposed Change:

The parameter detection should be improved to properly parse the query string and identify the yarn_knox_proxy=true key-value pair regardless of its position or the presence of other parameters. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org