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

Hashicorp Plugin: Provide cache flush for key rotation

Details

    Description

      The Hashicorp Vault plugin currently supports key versioning provided by the Hashicorp Vault Server. However, there is no ways in the plugin to initiate a key rotation and reset the data stored in the cache. Because of this, it is really impossible to build scenarios in which key values change without restarting the server.

      To address this shortcoming, we need to adds a new global variable that allows the user to initiate key rotation at the plugin level - similar to the key management plugin for AWS:

      --[loose-]hashicorp-key-management-rotate-key=<identifier>|-1

      Setting this variable to a certain value rotates corresponding key - all data associated with it is erased from the cache and will be re-requested from the Hashicorp Vault server the next time the system accesses this key. The user can also specify special value -1 (minus one) to rotate all keys. When specified value is zero, no key rotation is performed.

      Attachments

        Issue Links

          Activity

            sysprg Julius Goryavsky created issue -
            sysprg Julius Goryavsky made changes -
            Field Original Value New Value
            sysprg Julius Goryavsky made changes -
            Assignee Julius Goryavsky [ sysprg ]
            sysprg Julius Goryavsky made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            This looks like an overcomplication to me. It would be quite enough to be able to flush the whole cache, no need to do per per key. And to flush the whole cache one can simply set the cache_timeout to 0. Or may be, let's say, that setting cache_timeout to any value flushes the cache.

            Or you can add an information_schema plugin to examine the cache, it'll show cached keys and versions (but not values, of course). Like, INFORMATION_SCHEMA.HASHICORP_KEY_MANAGEMENT_CACHE. And then it can support FLUSH command, like

            FLUSH HASHICORP_KEY_MANAGEMENT_CACHE
            

            serg Sergei Golubchik added a comment - This looks like an overcomplication to me. It would be quite enough to be able to flush the whole cache, no need to do per per key. And to flush the whole cache one can simply set the cache_timeout to 0. Or may be, let's say, that setting cache_timeout to any value flushes the cache. Or you can add an information_schema plugin to examine the cache, it'll show cached keys and versions (but not values, of course). Like, INFORMATION_SCHEMA.HASHICORP_KEY_MANAGEMENT_CACHE . And then it can support FLUSH command, like FLUSH HASHICORP_KEY_MANAGEMENT_CACHE
            serg Sergei Golubchik made changes -
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 10.9.6 [ 28520 ]
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            Labels Cloned
            ralf.gebhardt Ralf Gebhardt made changes -
            Labels Cloned
            sysprg Julius Goryavsky made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.9 [ 26905 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.10 [ 27530 ]

            People

              sysprg Julius Goryavsky
              sysprg Julius Goryavsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.