提交 65bd9bf8 编写于 作者: H hujie

issue

上级 48c51f72
...@@ -49,17 +49,18 @@ public class PlainAccessValidator implements AccessValidator { ...@@ -49,17 +49,18 @@ public class PlainAccessValidator implements AccessValidator {
@Override @Override
public void validate(AccessResource accessResource) { public void validate(AccessResource accessResource) {
AuthenticationResult authenticationResult = null;
try { try {
AuthenticationResult authenticationResult = aclPlugEngine.eachCheckAuthentication((AccessControl) accessResource); authenticationResult = aclPlugEngine.eachCheckAuthentication((AccessControl) accessResource);
if (authenticationResult.getException() != null) {
throw new AclPlugRuntimeException(String.format("eachCheck the inspection appear exception, accessControl data is %s", accessResource.toString()), authenticationResult.getException());
}
if (authenticationResult.getAccessControl() == null || !authenticationResult.isSucceed()) {
throw new AclPlugRuntimeException(String.format("%s accessControl data is %s", authenticationResult.getResultString(), accessResource.toString()));
}
} catch (Exception e) { } catch (Exception e) {
throw new AclPlugRuntimeException(String.format("validate exception AccessResource data %s", accessResource.toString()), e); throw new AclPlugRuntimeException(String.format("validate exception AccessResource data %s", accessResource.toString()), e);
} }
if (authenticationResult.getException() != null) {
throw new AclPlugRuntimeException(String.format("eachCheck the inspection appear exception, accessControl data is %s", accessResource.toString()), authenticationResult.getException());
}
if (authenticationResult.getAccessControl() == null || !authenticationResult.isSucceed()) {
throw new AclPlugRuntimeException(String.format("%s accessControl data is %s", authenticationResult.getResultString(), accessResource.toString()));
}
} }
} }
...@@ -56,6 +56,7 @@ public class PlainAclPlugEngine { ...@@ -56,6 +56,7 @@ public class PlainAclPlugEngine {
if (accessControlTransport == null) { if (accessControlTransport == null) {
throw new AclPlugRuntimeException("transport.yml file is no data"); throw new AclPlugRuntimeException("transport.yml file is no data");
} }
log.info("BorkerAccessControlTransport data is : ", accessControlTransport.toString());
accessContralAnalysis.analysisClass(accessContralAnalysisClass); accessContralAnalysis.analysisClass(accessContralAnalysisClass);
setBorkerAccessControlTransport(accessControlTransport); setBorkerAccessControlTransport(accessControlTransport);
} }
......
...@@ -1033,6 +1033,7 @@ public class BrokerController { ...@@ -1033,6 +1033,7 @@ public class BrokerController {
public void registerServerRPCHook(RPCHook rpcHook) { public void registerServerRPCHook(RPCHook rpcHook) {
getRemotingServer().registerRPCHook(rpcHook); getRemotingServer().registerRPCHook(rpcHook);
this.fastRemotingServer.registerRPCHook(rpcHook);
} }
public RemotingServer getRemotingServer() { public RemotingServer getRemotingServer() {
......
org.apache.rocketmq.acl.PlainAccessValidator
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册