cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [1/2] cassandra git commit: RolesCache should not be created for any authenticator that does not requireAuthentication
Date Mon, 26 Oct 2015 09:05:06 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 3a2dd0cf6 -> 4f62eb953


RolesCache should not be created for any authenticator that does not requireAuthentication

patch by Mike Adamson; reviewed by Robert Stupp for CASSANDRA-10562


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

Branch: refs/heads/trunk
Commit: 9b727ac04b2413a530fc4313a89874bbf08dc0c6
Parents: 73781a9
Author: Mike Adamson <madamson@datastax.com>
Authored: Mon Oct 26 10:02:57 2015 +0100
Committer: Robert Stupp <snazy@snazy.de>
Committed: Mon Oct 26 10:02:57 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        | 1 +
 src/java/org/apache/cassandra/auth/RolesCache.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b727ac0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bc7c001..f737a2b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * RolesCache should not be created for any authenticator that does not requireAuthentication
(CASSANDRA-10562)
  * Fix LogTransaction checking only a single directory for files (CASSANDRA-10421)
  * Support encrypted and plain traffic on the same port (CASSANDRA-10559)
  * Fix handling of range tombstones when reading old format sstables (CASSANDRA-10360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b727ac0/src/java/org/apache/cassandra/auth/RolesCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/auth/RolesCache.java b/src/java/org/apache/cassandra/auth/RolesCache.java
index 554df9e..2694173 100644
--- a/src/java/org/apache/cassandra/auth/RolesCache.java
+++ b/src/java/org/apache/cassandra/auth/RolesCache.java
@@ -105,7 +105,7 @@ public class RolesCache implements RolesCacheMBean
 
     private LoadingCache<RoleResource, Set<RoleResource>> initCache(LoadingCache<RoleResource,
Set<RoleResource>> existing)
     {
-        if (DatabaseDescriptor.getAuthenticator() instanceof AllowAllAuthenticator)
+        if (!DatabaseDescriptor.getAuthenticator().requireAuthentication())
             return null;
 
         if (DatabaseDescriptor.getRolesValidity() <= 0)


Mime
View raw message