|
48 | 48 | import org.apache.hadoop.hbase.regionserver.RSRpcServices; |
49 | 49 | import org.apache.hadoop.hbase.regionserver.slowlog.RpcLogDetails; |
50 | 50 | import org.apache.hadoop.hbase.regionserver.slowlog.SlowLogRecorder; |
| 51 | +import org.apache.hadoop.hbase.security.HBasePolicyProvider; |
51 | 52 | import org.apache.hadoop.hbase.security.SaslUtil; |
52 | 53 | import org.apache.hadoop.hbase.security.SaslUtil.QualityOfProtection; |
53 | 54 | import org.apache.hadoop.hbase.security.User; |
|
58 | 59 | import org.apache.hadoop.security.UserGroupInformation; |
59 | 60 | import org.apache.hadoop.security.authorize.AuthorizationException; |
60 | 61 | import org.apache.hadoop.security.authorize.PolicyProvider; |
| 62 | +import org.apache.hadoop.security.authorize.ProxyUsers; |
61 | 63 | import org.apache.hadoop.security.authorize.ServiceAuthorizationManager; |
62 | 64 | import org.apache.hadoop.security.token.SecretManager; |
63 | 65 | import org.apache.hadoop.security.token.TokenIdentifier; |
@@ -313,6 +315,14 @@ public void onConfigurationChange(Configuration newConf) { |
313 | 315 | if (scheduler instanceof ConfigurationObserver) { |
314 | 316 | ((ConfigurationObserver) scheduler).onConfigurationChange(newConf); |
315 | 317 | } |
| 318 | + // Make sure authManager will read hbase-policy file |
| 319 | + System.setProperty("hadoop.policy.file", "hbase-policy.xml"); |
| 320 | + synchronized (authManager) { |
| 321 | + authManager.refresh(newConf, new HBasePolicyProvider()); |
| 322 | + } |
| 323 | + LOG.info("Refreshed hbase-policy.xml successfully"); |
| 324 | + ProxyUsers.refreshSuperUserGroupsConfiguration(newConf); |
| 325 | + LOG.info("Refreshed super and proxy users successfully"); |
316 | 326 | } |
317 | 327 |
|
318 | 328 | protected void initReconfigurable(Configuration confToLoad) { |
|
0 commit comments