You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stoty (via GitHub)" <gi...@apache.org> on 2024/05/02 04:33:55 UTC
Re: [PR] HBASE-27118 Add security headers to Thrift/HTTP server [hbase]
stoty commented on code in PR #5864:
URL: https://github.com/apache/hbase/pull/5864#discussion_r1587032854
##########
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java:
##########
@@ -387,9 +388,12 @@ protected void setupHTTPServer() throws IOException {
httpServer = new Server(threadPool);
// Context handler
+ boolean isSecure = conf.getBoolean(THRIFT_SSL_ENABLED_KEY, false);
ServletContextHandler ctxHandler =
new ServletContextHandler(httpServer, "/", ServletContextHandler.SESSIONS);
- ctxHandler.addServlet(new ServletHolder(thriftHttpServlet), "/*");
+ HttpServerUtil.addClickjackingPreventionFilter(ctxHandler, conf, PATH_SPEC_ANY);
Review Comment:
nit:
You mention in the ticket description that we add this when "HTTP support is enabled".
While I understand that this refers to the HTTP frontend as opposed to the binary, it can still cause misundestandings.
I suggest updating the ticket text to "HTTP/HTTPS support is enabled"
--
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: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org