-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28294 Support to skip Kerberos authentication for metric endpoints #5606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -1949,6 +1949,36 @@ If the DFSClient configuration | |||
| `simple` | ||||
|
|
||||
|
|
||||
| [[hbase.security.authentication.ui.metrics.protected]] | ||||
NihalJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| *`hbase.security.authentication.ui.metrics.protected`*:: | ||||
| + | ||||
| .Description | ||||
|
|
||||
| Controls whether or not metrics endpoints are allowed only for admin. | ||||
| If true, only users listed on "hbase.security.authentication.spnego.admin.users" | ||||
| or users in group listed on "hbase.security.authentication.spnego.admin.groups" | ||||
| are allowed to access metrics endpoints. (e.g. /jmx, /metrics, /prometheus) | ||||
|
|
||||
| + | ||||
| .Default | ||||
| `true` | ||||
|
|
||||
|
|
||||
| [[hbase.security.authentication.spnego.kerberos.endpoint.whitelist]] | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was going through hadoop PR. This property has been implemented in hadoop to handle any endpoint irrespective of whether it is metrics or something else. Why don't we follow same approach.? Do we really need to handle just metrics endpoint and have the other property A generic implementation like the one in hadoop sound more useful to me. Also the name of the config will confuse others. As it seems like a generic whitelist. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to use the name "hadoop.http.authentication.kerberos.endpoint.whitelist", instead of initializing params using configurations that starts with String endpointWhitelist = getOrEmptyString(conf, "hadoop.http.authentication.kerberos.endpoint.whitelist");
if (!endpointWhitelist.isEmpty()) {
params.put("endpoint.whitelist", endpointWhitelist);
}Do you think it is more suitable for HBase code? I did initialize params using configurations that starts with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Hey I did not mean to change name.
What I am trying to say is current implementation in PR aims to just whitelist which are under metrics umbrella. But if you look at the hadoop PR, it aims to provide a way to whitelist any endpoint in the passed list. Can we not follow that approach and have a generic implementation where we let the user whitelist any endpoint irrespective of whether it is a metric endpoint or say /logs
I mean nowhere in config name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignore as my doubt is clear here. Just that I think even conf servlet would also require the whitelisting if one want to access it:
So is this documentation correct? It is valid even if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if someone wants to disable spnego authentication completely on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe then update docs to reflect same? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated docs. |
||||
| *`hbase.security.authentication.spnego.kerberos.endpoint.whitelist`*:: | ||||
| + | ||||
| .Description | ||||
|
|
||||
| Controls whether or not secure authentication is enabled for conf, metrics endpoints. | ||||
| (e.g. /conf, /jmx, /metrics, /prometheus) | ||||
| It is valid only when "hbase.security.authentication.ui.config.protected" (for /conf), | ||||
| "hbase.security.authentication.ui.metrics.protected" (for /jmx, /metrics, /prometheus) is false. | ||||
|
|
||||
| + | ||||
| .Default | ||||
| `` | ||||
|
|
||||
|
|
||||
| [[hbase.rest.filter.classes]] | ||||
| *`hbase.rest.filter.classes`*:: | ||||
| + | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a test case similar to the hadoop PR? Else it's difficult to ensure this doesn't break in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it, thanks. I will prepare with that.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to add a test case but I encountered a problem. In order to use "hbase.security.authentication.spnego.kerberos.endpoint.whitelist", HBase should use the hadoop which has HADOOP-18666.
I think HADOOP-18666 will be committed to hadoop >= 3.4.0 according to jira https://issues.apache.org/jira/browse/HADOOP-18666.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh oh, in that case this feature won't even work until we have hadoop-3.4 right/ Maybe we park this PR for later then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
Let's postpone this PR until hbase uses hadoop with HADOOP-18666.