MySQL 8.0.40
Source Code Documentation
mysql_keyring_service_st Struct Reference

This service allows plugins to interact with key store backends. More...

#include <service_mysql_keyring.h>

Public Attributes

int(* my_key_store_func )(const char *, const char *, const char *, const void *, size_t)
 Stores a key into the keyring. More...
 
int(* my_key_fetch_func )(const char *, char **, const char *, void **, size_t *)
 Receives a key from the keyring. More...
 
int(* my_key_remove_func )(const char *, const char *)
 Removes a key from the keyring. More...
 
int(* my_key_generate_func )(const char *, const char *, const char *, size_t)
 Generates a new key inside the keyring backend. More...
 

Detailed Description

This service allows plugins to interact with key store backends.

A key currently is a blob of binary data, defined by a string key type, that's meaningful to the relevant backend. Typical key_type values include "AES", "DES", "DSA" etc. There's no length in the type, since it's defined by the number of bytes the key takes.

A key is uniquely identified by the key_id and the user_id values, i.e. all keys are assigned to a particular user. There's only one exception to that: a single category for instance keys that are not associated with any particular user id. This is signified to the APIs by supplying NULL for user_id. Plugins would typically pass user accounts to the user_id parameter, or NULL if there's no user account to associate the key with.

Not all backends must implement all of the functions defined in this interface.

The plugin service is a "bridge service", i.e. facade with no real functionality that just calls the actual keyring plugin APIs. This is needed to allow other plugins to call into the keyring plugins and thus overcome the limitation that only the server can call plugins.

See also
st_mysql_keyring

Member Data Documentation

◆ my_key_fetch_func

int(* mysql_keyring_service_st::my_key_fetch_func) (const char *, char **, const char *, void **, size_t *)

Receives a key from the keyring.

See also
my_key_fetch, st_mysql_keyring::mysql_key_fetch

◆ my_key_generate_func

int(* mysql_keyring_service_st::my_key_generate_func) (const char *, const char *, const char *, size_t)

Generates a new key inside the keyring backend.

See also
my_key_generate, st_mysql_keyring::mysql_key_generate

◆ my_key_remove_func

int(* mysql_keyring_service_st::my_key_remove_func) (const char *, const char *)

Removes a key from the keyring.

See also
my_key_remove, st_mysql_keyring::mysql_key_remove

◆ my_key_store_func

int(* mysql_keyring_service_st::my_key_store_func) (const char *, const char *, const char *, const void *, size_t)

Stores a key into the keyring.

See also
my_key_store, st_mysql_keyring::mysql_key_store

The documentation for this struct was generated from the following file: