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

Creating a new Hashicorp Vault key with typo crashes Data-at-rest server

    XMLWordPrintable

Details

    Description

      While experimenting with Data-at-rest and the HashiCorp Vault key management plugin, trying to add a new key version I by accident deleted one hex letter, issuing

      vault kv put /test/1 data="0123456789ABCDEF0123456789ABCDB"
      

      instead of the intended

      vault kv put /test/1 data="0123456789ABCDEF0123456789ABCDEB"
      

      Note the missing / additional E near the end of the key string.

      The vault command succeeded just fine, but the mariadb server almost immediately with

      2024-04-24 13:05:52 0 [ERROR] mariadbd: hashicorp: Syntax error - extra character in the key data
      2024-04-24 13:05:52 0 [ERROR] mariadbd: hashicorp: Syntax error - extra character in the key data
      2024-04-24 13:05:52 0 [ERROR] mariadbd: hashicorp: Syntax error - extra character in the key data
      2024-04-24 13:05:52 0 [ERROR] mariadbd: hashicorp: Syntax error - extra character in the key data
      2024-04-24 13:05:52 0x7f7f027fc700  InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-11.4.1/storage/innoba>
      InnoDB: Failing assertion: key_version != ENCRYPTION_KEY_VERSION_INVALID
      

      I'm seeing multiple problems here:

      • IMHO the server should not crash upon seeing a new key version that it can't process
      • The error message should mention the key ID and version for easier debugging
      • "extra character in the key data" is a bit misleading as I actually missed a character, but I assume that's just telling that a single character is not a valid hex sequence and that it considers that as invalid addition after 31 valid two-character pairs?

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.