hingu-8103 commented on code in PR #8936:
URL: https://github.com/apache/hbase/pull/8936#discussion_r4707021307
##########
hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp:
##########
@@ -39,27 +39,37 @@
<%@ page import="org.apache.hadoop.hbase.master.janitor.CatalogJanitorReport"
%>
<%@ page import="java.util.Optional" %>
<%@ page import="org.apache.hadoop.hbase.util.EnvironmentEdgeManager" %>
-<%@ page
import="org.apache.hbase.thirdparty.com.google.protobuf.ServiceException" %>
+<%@ page import="java.io.IOException" %>
+<%@ page import="org.apache.hadoop.hbase.http.InfoServer" %>
<%
final String cacheParameterValue = request.getParameter("cache");
final HMaster master = (HMaster)
getServletContext().getAttribute(HMaster.MASTER);
pageContext.setAttribute("pageTitle", "HBase Master HBCK Report: " +
master.getServerName());
- String hbckChoreErrorMessage = null;
+ final boolean canModifyUI =
+ InfoServer.canUserModifyUI(request, getServletContext(),
master.getConfiguration());
Review Comment:
`InfoServer.canUserModifyUI(request, getServletContext(),
master.getConfiguration())` needs `hbase.security.authentication.ui=kerberos`,
`hadoop.security.authorization=true` and `hbase.master.ui.readonly=true`, and
it never reads `hbase.security.authorization`.
On a default cluster (`hbase.security.authorization=false` and non-Kerberos
UI) the page therefore stops refreshing, and it shows the "read-only or not
authorized" message. Today it refreshes, because `NoopAccessChecker` allows the
`runHbckChore/runCatalogScan` without permission check.
Could we skip the gate when authorization is off: `!readonly &&
(!AccessChecker.isAuthorizationSupported(conf) ||
InfoServer.canUserModifyUI(...))`? Please validate my suggestion before
applying it directly.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]