You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "vogievetsky (via GitHub)" <gi...@apache.org> on 2023/11/29 19:54:49 UTC

[PR] Web console: better management proxy detection (druid)

vogievetsky opened a new pull request, #15453:
URL: https://github.com/apache/druid/pull/15453

   This PR tries to address a UX confusion where the console goes into "no management proxy mode" when in-fact the coordinator leader can simply not be determined in a transitive state. This is because right now the console relies on havign `/proxy/coordinator/status` return 200 to know that the management proxy is enabled. But that call might fail even when the management proxy is on.
   
   In this PR I add a `/proxy/enabled` endpoint that simply returns `{"enabled":true}` and retool the console to use that route instead. Also I allow for a code 400 to indicate that the management proxy is running.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Web console: better management proxy detection (druid)

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #15453:
URL: https://github.com/apache/druid/pull/15453#discussion_r1409938746


##########
server/src/test/java/org/apache/druid/server/AsyncManagementForwardingServletTest.java:
##########
@@ -317,6 +317,21 @@
     Assert.assertTrue("overlord called", OVERLORD_EXPECTED_REQUEST.called);
   }
 
+  @Test
+  public void testProxyEnebledCheck() throws Exception
+  {
+    HttpURLConnection connection = ((HttpURLConnection)
+        new URL(StringUtils.format("http://localhost:%d/proxy/enabled", port)).openConnection());
+    connection.setRequestMethod("GET");
+
+    Assert.assertEquals(200, connection.getResponseCode());
+    byte[] bytes = new byte[connection.getContentLength()];
+    connection.getInputStream().read(bytes);

Review Comment:
   ## Ignored error status of call
   
   Method testProxyEnebledCheck ignores exceptional return value of InputStream.read.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/6017)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Web console: better management proxy detection (druid)

Posted by "vogievetsky (via GitHub)" <gi...@apache.org>.
vogievetsky merged PR #15453:
URL: https://github.com/apache/druid/pull/15453


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org