cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/4] git commit: Authorizer+authenticator configuration sanity check
Date Fri, 16 Aug 2013 02:05:54 GMT
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-2.0
Commit: ebab9d39196384f2b9f37cb241b276f8112ab281
Parents: ea712bb
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Fri Aug 16 05:00:35 2013 +0300
Committer: Aleksey Yeschenko <aleksey@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


Mime
View raw message