- 18.104.22.168 Keyring Components Versus Keyring Plugins
- 22.214.171.124 Keyring Component Installation
- 126.96.36.199 Keyring Plugin Installation
- 188.8.131.52 Using the component_keyring_file File-Based Keyring Component
- 184.108.40.206 Using the component_keyring_encrypted_file Encrypted File-Based Keyring Component
- 220.127.116.11 Using the keyring_file File-Based Keyring Plugin
- 18.104.22.168 Using the keyring_encrypted_file Encrypted File-Based Keyring Plugin
- 22.214.171.124 Using the keyring_okv KMIP Plugin
- 126.96.36.199 Using the keyring_aws Amazon Web Services Keyring Plugin
- 188.8.131.52 Using the HashiCorp Vault Keyring Plugin
- 184.108.40.206 Using the Oracle Cloud Infrastructure Vault Keyring Plugin
- 220.127.116.11 Supported Keyring Key Types and Lengths
- 18.104.22.168 Migrating Keys Between Keyring Keystores
- 22.214.171.124 General-Purpose Keyring Key-Management Functions
- 126.96.36.199 Plugin-Specific Keyring Key-Management Functions
- 188.8.131.52 Keyring Metadata
- 184.108.40.206 Keyring Command Options
- 220.127.116.11 Keyring System Variables
MySQL Server supports a keyring that enables internal server components and plugins to securely store sensitive information for later retrieval. The implementation comprises these elements:
Keyring components and plugins that manage a backing store or communicate with a storage back end. Keyring use involves installing one from among the available components and plugins. Keyring components and plugins both manage keyring data but are configured differently and may have operational differences (see Section 18.104.22.168, “Keyring Components Versus Keyring Plugins”).
These keyring components are available:
component_keyring_file: Stores keyring data in a file local to the server host. Available in MySQL Community Edition and MySQL Enterprise Edition distributions as of MySQL 8.0.24. See Section 22.214.171.124, “Using the component_keyring_file File-Based Keyring Component”.
component_keyring_encrypted_file: Stores keyring data in an encrypted, password-protected file local to the server host. Available in MySQL Enterprise Edition distributions as of MySQL 8.0.24. See Section 126.96.36.199, “Using the component_keyring_encrypted_file Encrypted File-Based Keyring Component”.
These keyring plugins are available:
keyring_file: Stores keyring data in a file local to the server host. Available in MySQL Community Edition and MySQL Enterprise Edition distributions. See Section 188.8.131.52, “Using the keyring_file File-Based Keyring Plugin”.
keyring_encrypted_file: Stores keyring data in an encrypted, password-protected file local to the server host. Available in MySQL Enterprise Edition distributions. See Section 184.108.40.206, “Using the keyring_encrypted_file Encrypted File-Based Keyring Plugin”.
keyring_okv: A KMIP 1.1 plugin for use with KMIP-compatible back end keyring storage products such as Oracle Key Vault and Gemalto SafeNet KeySecure Appliance. Available in MySQL Enterprise Edition distributions. See Section 220.127.116.11, “Using the keyring_okv KMIP Plugin”.
keyring_aws: Communicates with the Amazon Web Services Key Management Service for key generation and uses a local file for key storage. Available in MySQL Enterprise Edition distributions. See Section 18.104.22.168, “Using the keyring_aws Amazon Web Services Keyring Plugin”.
keyring_hashicorp: Communicates with HashiCorp Vault for back end storage. Available in MySQL Enterprise Edition distributions as of MySQL 8.0.18. See Section 22.214.171.124, “Using the HashiCorp Vault Keyring Plugin”.
keyring_oci: Communicates with Oracle Cloud Infrastructure Vault for back end storage. Available in MySQL Enterprise Edition distributions as of MySQL 8.0.22. See Section 126.96.36.199, “Using the Oracle Cloud Infrastructure Vault Keyring Plugin”.
A keyring service interface for keyring key management. This service is accessible at two levels:
SQL interface: In SQL statements, call the functions described in Section 188.8.131.52, “General-Purpose Keyring Key-Management Functions”.
C interface: In C-language code, call the keyring service functions described in Section 184.108.40.206, “The Keyring Service”.
Key metadata access:
The Performance Schema
keyring_keystable exposes metadata for keys in the keyring. Key metadata includes key IDs, key owners, and backend key IDs. The
keyring_keystable does not expose any sensitive keyring data such as key contents. Available as of MySQL 8.0.16. See Section 220.127.116.11, “The keyring_keys table”.
The Performance Schema
keyring_component_statustable provides status information about the keyring component in use, if one is installed. Available as of MySQL 8.0.24. See Section 18.104.22.168, “The keyring_component_status Table”.
A key migration capability. MySQL supports migration of keys between keystores, enabling DBAs to switch a MySQL installation from one keystore to another. See Section 22.214.171.124, “Migrating Keys Between Keyring Keystores”.
The implementation of keyring plugins is revised as of MySQL 8.0.24 to use the component infrastructure. This is facilitated using the built-in plugin named
daemon_keyring_proxy_pluginthat acts as a bridge between the plugin and component service APIs. See Section 5.6.8, “The Keyring Proxy Bridge Plugin”.
For encryption key management, the
keyring_encrypted_file plugins are not
intended as a regulatory compliance solution. Security standards
such as PCI, FIPS, and others require use of key management
systems to secure, manage, and protect encryption keys in key
vaults or hardware security modules (HSMs).
Within MySQL, keyring service consumers include:
InnoDBstorage engine uses the keyring to store its key for tablespace encryption. See Section 15.13, “InnoDB Data-at-Rest Encryption”.
MySQL Enterprise Audit uses the keyring to store the audit log file encryption password. See Encrypting Audit Log Files.
Binary log and relay log management supports keyring-based encryption of log files. With log file encryption activated, the keyring stores the keys used to encrypt passwords for the binary log files and relay log files. See Section 17.3.2, “Encrypting Binary Log Files and Relay Log Files”.
The master key to decrypt the file key that decrypts the persisted values of sensitive system variables is stored in the keyring. A keyring component (
component_keyring_encrypted_file) must be enabled on the MySQL Server instance to support secure storage for persisted system variable values, rather than a keyring plugin, which do not support the function. See Persisting Sensitive System Variables.
For general keyring installation instructions, see Section 126.96.36.199, “Keyring Component Installation”, and Section 188.8.131.52, “Keyring Plugin Installation”. For installation and configuration information specific to a given keyring component or plugin, see the section describing it.
For information about using the keyring functions, see Section 184.108.40.206, “General-Purpose Keyring Key-Management Functions”.
Keyring components, plugins, and functions access a keyring service that provides the interface to the keyring. For information about accessing this service and writing keyring plugins, see Section 220.127.116.11, “The Keyring Service”, and Writing Keyring Plugins.