Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9639

Galera Cluster files (galera.cache, others) and slow log/general log are not encrypted when encryption is enabled

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Encryption
    • None

    Description

      All data points of MariaDB 10.1.11 can be encrypted except:
      Galera gcache + galera replication data (UPDATE -encrypted now)
      Relay logs (UPDATE - encrypted now)
      General log / slow query log

      Please make those encryptable. Thank you!

      Attachments

        Activity

          arubin Alexander Rubin created issue -

          arubin,
          Regarding relay logs, do you have encrypt-binlog in your cnf file?

          elenst Elena Stepanova added a comment - arubin , Regarding relay logs, do you have encrypt-binlog in your cnf file?
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Labels need_feedback

          Elena Stepanova, I have upgraded to MariaDB 10.1.12 and relay logs are encrypted.
          Other things in the list are not.

          arubin Alexander Rubin added a comment - Elena Stepanova, I have upgraded to MariaDB 10.1.12 and relay logs are encrypted. Other things in the list are not.
          arubin Alexander Rubin made changes -
          Description All data points of MariaDB 10.1.11 can be encrypted except:
            Galera gcache + galera replication data
            Relay logs
            General log / slow query log

          Please make those encryptable. Thank you!
          All data points of MariaDB 10.1.11 can be encrypted except:
            Galera gcache + galera replication data
            -Relay logs- (UPDATE - encrypted now)
            General log / slow query log

          Please make those encryptable. Thank you!

          Other things are not supposed to be encrypted, it has never been implemented or declared as such.

          I'll convert it into a feature request, although I'm not sure that encryption of general log / slow query log is practical.
          These logs are meant to be human-readable, there is no other use of them (unlike binary logs which are mainly used for replication). If you encrypt general/slow logs, they are useless, as nobody can read them, and if so, it's easier just not to enable them at the first place.
          The only way they can be encrypted and still stay marginally useful is if at the same time we create a stand-alone tool to decrypt them; but then, it might be considered as a potential breach of security (one of reasons why mysqlbinlog still cannot read encrypted files).

          elenst Elena Stepanova added a comment - Other things are not supposed to be encrypted, it has never been implemented or declared as such. I'll convert it into a feature request, although I'm not sure that encryption of general log / slow query log is practical. These logs are meant to be human-readable, there is no other use of them (unlike binary logs which are mainly used for replication). If you encrypt general/slow logs, they are useless, as nobody can read them, and if so, it's easier just not to enable them at the first place. The only way they can be encrypted and still stay marginally useful is if at the same time we create a stand-alone tool to decrypt them; but then, it might be considered as a potential breach of security (one of reasons why mysqlbinlog still cannot read encrypted files).
          elenst Elena Stepanova made changes -
          Labels need_feedback
          Summary Galera Cluster files (galera.cache, others), relay logs and slow log/general log are not encrypted when encryption is enabled Galera Cluster files (galera.cache, others) and slow log/general log are not encrypted when encryption is enabled
          elenst Elena Stepanova made changes -
          Affects Version/s 10.1.11 [ 21202 ]
          Issue Type Bug [ 1 ] Task [ 3 ]
          elenst Elena Stepanova made changes -
          Component/s Galera [ 10124 ]

          Elena,

          Thank you very much for your comments! Make sense on Slow Query log / General Log. Is there any plans to implement encryption for Galera files?

          Thanks!

          arubin Alexander Rubin added a comment - Elena, Thank you very much for your comments! Make sense on Slow Query log / General Log. Is there any plans to implement encryption for Galera files? Thanks!

          nirbhay_c, see the question above – any plans for encryption of Galera files?

          elenst Elena Stepanova added a comment - nirbhay_c , see the question above – any plans for encryption of Galera files?

          @Elena, I would like to see the slow log encrypted, too, but I see the issue as you described it.

          What if you were to automatically encrypt the tables created when encryption is configured to be on, in the case these logs were written to table only (not file) as in https://mariadb.com/kb/en/mariadb/writing-logs-into-tables/ (I know this is not InnoDB though)?

          [root@maria101 mysql]# less /var/lib/mysql/mysql/slow_log.CSV | grep insert
          "2016-03-07 13:10:39.652739","root[root] @ localhost []","00:00:00.005131","00:00:00.000166",0,0,"",0,0,1,"insert into meetup.t2 values (9,9,'your','secret','999-99-9999')",4,1
          

          valerie@opengroupware.ch Valerie Parham-Thompson added a comment - @Elena, I would like to see the slow log encrypted, too, but I see the issue as you described it. What if you were to automatically encrypt the tables created when encryption is configured to be on, in the case these logs were written to table only (not file) as in https://mariadb.com/kb/en/mariadb/writing-logs-into-tables/ (I know this is not InnoDB though)? [root@maria101 mysql]# less /var/lib/mysql/mysql/slow_log.CSV | grep insert "2016-03-07 13:10:39.652739","root[root] @ localhost []","00:00:00.005131","00:00:00.000166",0,0,"",0,0,1,"insert into meetup.t2 values (9,9,'your','secret','999-99-9999')",4,1
          kolbe Kolbe Kegel (Inactive) added a comment - I added a note about these limitations to https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#limitations .

          Its indeed a better choice to enable encryption for CSV engine and switch to table based logs for encryption.
          OTOH, encrypting log files would call for a new viewer tool capable of decrypting these files.

          nirbhay_c Nirbhay Choubey (Inactive) added a comment - Its indeed a better choice to enable encryption for CSV engine and switch to table based logs for encryption. OTOH, encrypting log files would call for a new viewer tool capable of decrypting these files.

          The Aria engine can be used for the log tables, and Aria tables can be encrypted. However, the Aria log is not currently encrypted, so Aria-based log tables ends up being not a very good solution.

          kolbe Kolbe Kegel (Inactive) added a comment - The Aria engine can be used for the log tables, and Aria tables can be encrypted. However, the Aria log is not currently encrypted, so Aria-based log tables ends up being not a very good solution.

          galera replication data can be encrypted using SSL:

          http://galeracluster.com/documentation-webpages/ssl.html

          tanj Guillaume Lefranc added a comment - galera replication data can be encrypted using SSL: http://galeracluster.com/documentation-webpages/ssl.html
          julien.fritsch Julien Fritsch made changes -
          Assignee Ralf Gebhardt [ ralf.gebhardt@mariadb.com ]
          ralf.gebhardt Ralf Gebhardt made changes -
          cezmunsta Ceri Williams added a comment -

          The limitation description is deceptive:

          File-based general query log and slow query log cannot be encrypted (MDEV-9639).

          When using SET GLOBAL log_output = "TABLE" you would clearly consider this to no longer be FILE, despite the CSV engine writing files that are human readable.

          cezmunsta Ceri Williams added a comment - The limitation description is deceptive: File-based general query log and slow query log cannot be encrypted ( MDEV-9639 ). When using SET GLOBAL log_output = "TABLE" you would clearly consider this to no longer be FILE , despite the CSV engine writing files that are human readable.
          ralf.gebhardt Ralf Gebhardt made changes -
          Assignee Ralf Gebhardt [ ralf.gebhardt@mariadb.com ]
          jplindst Jan Lindström (Inactive) made changes -
          Component/s Galera [ 10124 ]
          jplindst Jan Lindström (Inactive) made changes -
          Description All data points of MariaDB 10.1.11 can be encrypted except:
            Galera gcache + galera replication data
            -Relay logs- (UPDATE - encrypted now)
            General log / slow query log

          Please make those encryptable. Thank you!
          All data points of MariaDB 10.1.11 can be encrypted except:
            -Galera gcache + galera replication data- (UPDATE -encrypted now)
            -Relay logs- (UPDATE - encrypted now)
            General log / slow query log

          Please make those encryptable. Thank you!
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 74201 ] MariaDB v4 [ 130440 ]
          danblack Daniel Black made changes -
          Issue Type Task [ 3 ] New Feature [ 2 ]

          People

            Unassigned Unassigned
            arubin Alexander Rubin
            Votes:
            5 Vote for this issue
            Watchers:
            21 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.