Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-19765

Remove accessibility to system_auth.roles salted_hash for non-superusers

    XMLWordPrintableJSON

Details

    • Operability
    • Low Hanging Fruit
    • All
    • Security
    • Hide

      Unit tests, default behavior is backwards-compatible

      Show
      Unit tests, default behavior is backwards-compatible

    Description

      Cassandra permits all users with SELECT on system_auth.roles to access contents of the salted_hash column. This column contains a bcrypt hash, which shouldn't be visible. This isn't a significant security risk at the current time, but is prone to retrospective decryption. We should protect this column so passwords cannot be cracked in the future.

       

       

      $ ./bin/cqlsh -u cassandra -p cassandra
      [cqlsh 6.3.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.8 | Native protocol v5] 
      cassandra@cqlsh> CREATE ROLE nonsuperuser WITH LOGIN=true AND PASSWORD='nonsuperuser';
      cassandra@cqlsh> GRANT SELECT ON system_auth.roles TO nonsuperuser;
      cassandra@cqlsh> exit;
      $ ./bin/cqlsh -u nonsuperuser -p nonsuperuser
      [cqlsh 6.3.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.8 | Native protocol v5] 
      nonsuperuser@cqlsh> SELECT * FROM system_auth.roles;
       role         | can_login | is_superuser | member_of | salted_hash
      --------------+-----------+--------------+-----------+--------------------------------------------------------------
          cassandra |      True |         True |      null | $2a$10$WMg9UlR7F8Ko7LZxEyg0Ue12BoHR/Dn/0/3YtV4nRYCPcY7/5OmA6
       nonsuperuser |      True |        False |      null | $2a$10$HmHwVZRk8F904UUNMiUYi.xkVglWyKNgHMo1xJsCCKirwyb9NO/im
      (2 rows)
      

       

      Patches available:

      3.0: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-30

      3.11: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-311

      4.0: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-40

      4.1: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-41

      5.0: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-50

      trunk: https://github.com/apache/cassandra/compare/trunk...aratno:cassandra:CASSANDRA-19765-salted_hash-visibility-trunk

      Attachments

        Activity

          People

            aratnofsky Abe Ratnofsky
            aratnofsky Abe Ratnofsky
            Abe Ratnofsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: