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

Security - SHRED like functions, make harder to recover data on UPDATE,DELETE,TRUNCATE,DROP,ALTER and temporary files (filesort for example)

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hi guys, could be nice and important for some security systems, SHRED like functions
      shred.c (linux command) - overwrite files and devices to make it harder to recover data

      I have some databases that store credit card informations, they have cript functions, but it's nice after a delete, or update, or temporary tables a very intensive SHRED

      New Commands:
      1)DROP SHRED TABLE table;
      2)DELETE SHRED table WHERE xxxxx;
      3)TRUNCATE SHRED table;
      4.1)UPDATE table SET SHRED(field,'value after shred') WHERE xxxx;
      4.2)UPDATE table SET SHRED(field),field='value after shred' WHERE xxxx;
      5)ALTER TABLE table SHRED INTERATIONS=25;
      when using this table temporary files (filesort) should shred before remove, when drop should SHRED too
      6)ALTER TABLE table TEMPORARY CRYPT=ON/OFF;
      this is not SHRED, but some temporary tables should use crypt in filesystem instead of flat files

      Variables:
      1)SET @@shred_interations=25 (default interations for UPDATE SHRED and others commands when table don't have a default value, always use the biggest value MAX(@@shred_interations,table value) )

      2)SET @@shred_drop_temporary_table=on/off (default off - when on shred temporary files before remove it, in this case we are talking about filesort and others things, when on, all temporary tables use shred, not just tables with ALTER TABLE xxx SHRED INTERATIONS=xxx)

      points to consider
      1)SHRED to memory tables are optional? or they must run like filesystem tables?
      2)what happen when using swap memory?
      3)we don't know what filesystem is being used, but some filesystems don't allow a very good shred, that's a problem of dba / developer choises, not for mysql/mariadb database
      4)we run SHRED on index AND datafiles
      5)we run SHRED on file names

      others doubts to think about...
      1)maybe we should do this in LOGFILES?
      2)maybe we should do this in JOURNAL files (aria)?
      3)maybe in commit temporary files? i don't know if we have journal for transactions, but that's the file that i'm talking about

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              rspadim roberto spadim added a comment -

              SHRED linux source (maybe old, but have nice examples of how to do SHRED)

              Show
              rspadim roberto spadim added a comment - SHRED linux source (maybe old, but have nice examples of how to do SHRED)

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  rspadim roberto spadim
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: