-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-24121 [Authorization] ServiceAuthorizationManager isn't dynamically updatable. And it should be #1439
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
…ally updatable. And it should be.
|
Using |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
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.
Do we need a small test to validate the re-init?
| if (scheduler instanceof ConfigurationObserver) { | ||
| ((ConfigurationObserver) scheduler).onConfigurationChange(newConf); | ||
| } | ||
| HBasePolicyProvider.init(newConf, authManager); |
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.
Regarding thread-safety, do we need to synchronize on authManager while this happens? Otherwise authorize() requests and this init can race and can result in some weird authz results..
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.
Fixed
|
About the test, the functional test of ServiceAuthorizationManager is done in hadoop-common, and the re-config framework is also testified by many other UTs already. WDYT. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
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.
About the test, the functional test of ServiceAuthorizationManager is done in hadoop-common, and the re-config framework is also testified by many other UTs already.
I was hoping the unit-test would cover the after-affects of the configuration change. Meaning someone updates the policy.xml with a new policy, the test runs something to make sure the new policy is in affect, something along those lines. Anyway, I'll leave it up to you. Patch looks fine to me.
| if (scheduler instanceof ConfigurationObserver) { | ||
| ((ConfigurationObserver) scheduler).onConfigurationChange(newConf); | ||
| } | ||
| synchronized (authManager) { |
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.
nit: Add a quick log that we are re-setting the authManager state, probably helps with debugging races later if any..
Yeah, this is what I said, it is exactly about functionality about HDFS's ServiceAuthorizationManager which shouldn't be tested on HBase side. Even if it doesn't take effect, we can do nothing on HBase side (BTW, it does take effect). To me, it is a kind of over-development. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
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.
Seems good to me. Yeah, unit test would be nice but not end-of-world for something like this?
Are the failures related. Patch is stale?
|
Yes, related. Just pushed a new commit. Waiting QA. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
|
🎊 +1 overall
This message was automatically generated. |
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
…ally updatable. And it should be (#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]>
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java (cherry picked from commit c99e644) Change-Id: Ic4d1ae5b39d7d562a1b97bf5c4cfe881a283b00e
…ally updatable. And it should be (apache#1439) Signed-off-by: Bharath Vissapragada <[email protected]> Signed-off-by: Michael Stack <[email protected]> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
JIRA link: HBASE-24121