/** * If the legacy users table exists try to verify credentials there. This is to handle the case * where the cluster is being upgraded and so is running with mixed versions of the authn tables */ private SelectStatement authenticationStatement() { if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) == null) return authenticateStatement; else { // the statement got prepared, we to try preparing it again. // If the credentials was initialised only after statement got prepared, re-prepare (CASSANDRA-12813). if (legacyAuthenticateStatement == null) prepareLegacyAuthenticateStatement(); return legacyAuthenticateStatement; } }
/** * If the legacy users table exists try to verify credentials there. This is to handle the case * where the cluster is being upgraded and so is running with mixed versions of the authn tables */ private SelectStatement authenticationStatement() { if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) == null) return authenticateStatement; else { // the statement got prepared, we to try preparing it again. // If the credentials was initialised only after statement got prepared, re-prepare (CASSANDRA-12813). if (legacyAuthenticateStatement == null) prepareLegacyAuthenticateStatement(); return legacyAuthenticateStatement; } }
/** * If the legacy users table exists try to verify credentials there. This is to handle the case * where the cluster is being upgraded and so is running with mixed versions of the authn tables */ private SelectStatement authenticationStatement() { if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) == null) return authenticateStatement; else { // the statement got prepared, we to try preparing it again. // If the credentials was initialised only after statement got prepared, re-prepare (CASSANDRA-12813). if (legacyAuthenticateStatement == null) prepareLegacyAuthenticateStatement(); return legacyAuthenticateStatement; } }
public void setup() { String query = String.format("SELECT %s FROM %s.%s WHERE role = ?", SALTED_HASH, SchemaConstants.AUTH_KEYSPACE_NAME, AuthKeyspace.ROLES); authenticateStatement = prepare(query); if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) != null) prepareLegacyAuthenticateStatement(); cache = new CredentialsCache(this); }
public void setup() { String query = String.format("SELECT %s FROM %s.%s WHERE role = ?", SALTED_HASH, SchemaConstants.AUTH_KEYSPACE_NAME, AuthKeyspace.ROLES); authenticateStatement = prepare(query); if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) != null) prepareLegacyAuthenticateStatement(); cache = new CredentialsCache(this); }
public void setup() { String query = String.format("SELECT %s FROM %s.%s WHERE role = ?", SALTED_HASH, SchemaConstants.AUTH_KEYSPACE_NAME, AuthKeyspace.ROLES); authenticateStatement = prepare(query); if (Schema.instance.getCFMetaData(SchemaConstants.AUTH_KEYSPACE_NAME, LEGACY_CREDENTIALS_TABLE) != null) prepareLegacyAuthenticateStatement(); cache = new CredentialsCache(this); }