mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.2' into cassandra-3.0
This commit is contained in:
commit
3818d30bd1
|
|
@ -1,6 +1,8 @@
|
|||
3.0.0-rc1
|
||||
* Small optimizations of sstable index serialization (CASSANDRA-10232)
|
||||
* Support for both encrypted and unencrypted native transport connections (CASSANDRA-9590)
|
||||
Merged from 2.2:
|
||||
* Handle missing RoleManager in config after upgrade to 2.2 (CASSANDRA-10209)
|
||||
|
||||
|
||||
3.0.0-beta2
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ public class DatabaseDescriptor
|
|||
|
||||
private static IAuthenticator authenticator = new AllowAllAuthenticator();
|
||||
private static IAuthorizer authorizer = new AllowAllAuthorizer();
|
||||
private static IRoleManager roleManager = new CassandraRoleManager();
|
||||
// Don't initialize the role manager until applying config. The options supported by CassandraRoleManager
|
||||
// depend on the configured IAuthenticator, so defer creating it until that's been set.
|
||||
private static IRoleManager roleManager;
|
||||
|
||||
private static IRequestScheduler requestScheduler;
|
||||
private static RequestSchedulerId requestSchedulerId;
|
||||
|
|
@ -325,6 +327,8 @@ public class DatabaseDescriptor
|
|||
|
||||
if (conf.role_manager != null)
|
||||
roleManager = FBUtilities.newRoleManager(conf.role_manager);
|
||||
else
|
||||
roleManager = new CassandraRoleManager();
|
||||
|
||||
if (authenticator instanceof PasswordAuthenticator && !(roleManager instanceof CassandraRoleManager))
|
||||
throw new ConfigurationException("CassandraRoleManager must be used with PasswordAuthenticator", false);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.cassandra.auth.*;
|
||||
import org.apache.cassandra.config.Config;
|
||||
import org.apache.cassandra.config.DatabaseDescriptor;
|
||||
import org.apache.cassandra.config.Schema;
|
||||
import org.apache.cassandra.cql3.QueryHandler;
|
||||
|
|
@ -65,9 +66,12 @@ public class ClientState
|
|||
|
||||
SchemaKeyspace.ALL.forEach(table -> READABLE_SYSTEM_RESOURCES.add(DataResource.table(SchemaKeyspace.NAME, table)));
|
||||
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getAuthenticator().protectedResources());
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getAuthorizer().protectedResources());
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getRoleManager().protectedResources());
|
||||
if (!Config.isClientMode())
|
||||
{
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getAuthenticator().protectedResources());
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getAuthorizer().protectedResources());
|
||||
PROTECTED_AUTH_RESOURCES.addAll(DatabaseDescriptor.getRoleManager().protectedResources());
|
||||
}
|
||||
|
||||
// allow users with sufficient privileges to alter KS level options on AUTH_KS and
|
||||
// TRACING_KS, and also to drop legacy tables (users, credentials, permissions) from
|
||||
|
|
|
|||
Loading…
Reference in New Issue