Updated Branches:
  refs/heads/cassandra-1.2 ea712bbbe -> ebab9d391

Authorizer+authenticator configuration sanity check


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ebab9d39
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ebab9d39
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ebab9d39

Branch: refs/heads/cassandra-1.2
Commit: ebab9d39196384f2b9f37cb241b276f8112ab281
Parents: ea712bb
Author: Aleksey Yeschenko <alek...@apache.org>
Authored: Fri Aug 16 05:00:35 2013 +0300
Committer: Aleksey Yeschenko <alek...@apache.org>
Committed: Fri Aug 16 05:00:35 2013 +0300

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ebab9d39/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 7df2b2f..c1ced94 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -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

Reply via email to