-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-23312 HBase Thrift SPNEGO configs (HBASE-19852) should be backwards compatible #850
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
Conversation
|
FYI @busbey @esteban @joshelser (I'm not sure how to tag reviewers or get feedback on the PR - doesn't look like the HBase book was updated? https://hbase.apache.org/book.html#submitting.patches). |
|
💔 -1 overall
This message was automatically generated. |
853991a to
a4fb8d2
Compare
|
Pushed change that addresses the license and race condition with the tests |
|
💔 -1 overall
This message was automatically generated. |
|
Pushed whitespace fix. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
joshelser
left a comment
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.
Looks reasonable! Appears to restore functionality so that hbase.thrift.keytab.file can continue to be used in the absence of hbase.thrift.spnego.keytab.file.
A couple of minor polishing requests.
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Outdated
Show resolved
Hide resolved
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Show resolved
Hide resolved
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Outdated
Show resolved
Hide resolved
096a2db to
8e24d7a
Compare
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| private String getSpengoPrincipal(Configuration conf, String host) throws IOException { | ||
| String principal = conf.get(THRIFT_SPNEGO_PRINCIPAL_KEY); |
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.
We're doing this ourselves instead of using Hadoop Configuration's deprecation mechanisms because we want a different fall back order? Or we can't set deprecation soon enough for some reason?
We should have comments proactively letting future folks know the reasoning.
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.
Hmm let me take a look at what Hadoop Configuration's deprecation options are - I didn't know that was a fine. The old config is still technically valid just not for SPNEGO. I'll see if that is an option here to fallback with a message.
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.
So I don't think using the Hadoop Configuration deprecations will work here. The existing config key hbase.thrift.kerberos.principal is still valid and needs to be used for Kerberos communication between HBase Thrift Server to backend HBase master/rs. The new config key hbase.thrift.spnego.principal should be used for SPNEGO (handling SPNEGO HTTP only not for backend communication).
So its not really a deprecation per say, but more configuration to split out the principal/keytab used for SPNEGO versus backend communication. In an ideal world, the config hbase.thrift.kerberos.principal would never have done double duty.
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 added a comment specifically for this case.
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.
Given I missed this the first time, the comment clearly explains things to me. Resolving.
…ards compatible HBase Thrift SPNEGO configs should not be required. The `hbase.thrift.spnego.keytab.file` and `hbase.thrift.spnego.principal` configs should fall back to the `hbase.thrift.keytab.file` and `hbase.thrift.kerberos.principal` configs. This will avoid any issues during upgrades. Signed-off-by: Kevin Risden <[email protected]>
|
Latest push adds comment about deprecation handling and why not use Hadoop |
|
🎊 +1 overall
This message was automatically generated. |
|
@busbey @joshelser I think this is ready for another round of review |
joshelser
left a comment
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.
A couple of minor comments, but I can run the tests myself locally to validate my questions :)
I know Busbey is not working this week, so I'm moving ahead without his ack.
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Show resolved
Hide resolved
...-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpFallbackServer.java
Show resolved
Hide resolved
| } | ||
|
|
||
| private String getSpengoPrincipal(Configuration conf, String host) throws IOException { | ||
| String principal = conf.get(THRIFT_SPNEGO_PRINCIPAL_KEY); |
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.
Given I missed this the first time, the comment clearly explains things to me. Resolving.
HBase Thrift SPNEGO configs should not be required.
The
hbase.thrift.spnego.keytab.fileandhbase.thrift.spnego.principalconfigs should fallback to the
hbase.thrift.keytab.fileandhbase.thrift.kerberos.principalconfigs. This willavoid any issues during upgrades.
Signed-off-by: Kevin Risden [email protected]