blerer commented on code in PR #2125:
URL: https://github.com/apache/cassandra/pull/2125#discussion_r1111903406


##########
src/java/org/apache/cassandra/auth/CassandraRoleManager.java:
##########
@@ -82,7 +82,7 @@ public class CassandraRoleManager implements IRoleManager
     private static final Logger logger = 
LoggerFactory.getLogger(CassandraRoleManager.class);
 
     public static final String DEFAULT_SUPERUSER_NAME = "cassandra";
-    static final String DEFAULT_SUPERUSER_PASSWORD = "cassandra";
+    public static final String DEFAULT_SUPERUSER_PASSWORD = "cassandra";

Review Comment:
   Do we know why the password was package private but not the username?



##########
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java:
##########
@@ -121,6 +121,11 @@ public class SelectStatement implements 
CQLStatement.SingleKeyspaceCqlStatement
      */
     private final Comparator<List<ByteBuffer>> orderingComparator;
 
+    /**
+     * Whether masked columns should be unmasked.
+     */
+    private boolean unmask = true;

Review Comment:
   `SelectStatements` are multithreaded we cannot relies on instance variables.



##########
src/java/org/apache/cassandra/cql3/selection/Selector.java:
##########
@@ -443,14 +447,21 @@ private <V> ByteBuffer value(Cell<V> c)
         }
 
         /**
-         * Return the value of the column with the specified index.
+         * Return the value of the column with the specified index. If the 
column the value belongs to is masked with a
+         * {@link ColumnMask} and {@link #unmask} hasn't been specified, such 
mask will be applied to the value.
          *
          * @param index the column index
-         * @return the value of the column with the specified index
+         * @return the value of the column with the specified index, masked if 
its column is masked
          */
         public ByteBuffer getValue(int index)
         {
-            return values[index];
+            ByteBuffer value = values[index];

Review Comment:
   This approach is different from the one that was used in the previous patch 
and makes some of the changes useless.
   If we start relying on `InputRow` to do the masking there are no need to go 
through the `wildcardWithGroupByOrMaskedColumns` path as the wilcard path 
should now also work. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to