Authorizer+authenticator configuration sanity check

This commit is contained in:
Aleksey Yeschenko 2013-08-16 05:00:35 +03:00
parent ea712bbbe8
commit ebab9d3919
1 changed files with 3 additions and 0 deletions

View File

@ -219,6 +219,9 @@ public class DatabaseDescriptor
if (conf.authorizer != null)
authorizer = FBUtilities.newAuthorizer(conf.authorizer);
if (authenticator instanceof AllowAllAuthenticator && !(authorizer instanceof AllowAllAuthorizer))
throw new ConfigurationException("AllowAllAuthenticator can't be used with " + conf.authorizer);
if (conf.internode_authenticator != null)
internodeAuthenticator = FBUtilities.construct(conf.internode_authenticator, "internode_authenticator");
else