Class representing authentication policy.
More...
#include <authentication_policy.h>
|
static bool | parse (const std::string &new_policy_value, Factors &parsed_factors) |
| Parse @authentication_policy variable value. More...
|
|
Class representing authentication policy.
◆ ~Policy()
authentication_policy::Policy::~Policy |
( |
| ) |
|
|
inlineprotected |
◆ get_default_plugin() [1/2]
void authentication_policy::Policy::get_default_plugin |
( |
size_t |
factor, |
|
|
MEM_ROOT * |
mem_root, |
|
|
LEX_CSTRING * |
name |
|
) |
| const |
|
protected |
Get copy of default plugin name.
- Parameters
-
factor | [in] no of the factor |
mem_root | [in] place to allocate the name |
name | [out] copy of the name |
◆ get_default_plugin() [2/2]
void authentication_policy::Policy::get_default_plugin |
( |
size_t |
factor, |
|
|
std::string & |
name |
|
) |
| const |
|
protected |
Get copy of default plugin name.
- Parameters
-
factor | [in] no of the factor |
name | [out] copy of the name |
◆ get_factors()
void authentication_policy::Policy::get_factors |
( |
Factors & |
factors | ) |
const |
|
protected |
Get copy of the authentication policy factors.
The aim is to work is with consistent snapshot of the factor avoiding long time locking.
- Parameters
-
factors | [out] authentication policy factors |
◆ get_mysql_auth()
st_mysql_auth * authentication_policy::Policy::get_mysql_auth |
( |
const std::string & |
plugin_name | ) |
|
|
private |
Get server authentication plugin descriptor by plugin name.
Store the descriptor in plugin_refs.
- Parameters
-
plugin_name | [in] name of the plugin |
- Returns
- server authentication plugin descriptor
◆ parse()
bool authentication_policy::Policy::parse |
( |
const std::string & |
new_policy_value, |
|
|
Factors & |
parsed_factors |
|
) |
| |
|
staticprotected |
Parse @authentication_policy variable value.
Format of the variable: authentication_policy = factor_spec[, factor_spec] ... factor_spec = [ * | <empty> | mandatory_plugin | :default_plugin ]
Additional rules: The first plugin cannot be empty (optional) An empty (optional) plugin can be followed only by empty (optional) plugins. The number of factors is limited to 3.
Below are some invalid values: ',,' ',authentication_fido,' ',:caching_sha2_password' 'caching_sha2_password,,authentication_fido' 'caching_sha2_password,:authentication_ldap_simple,authentication_fido' ',authentication_fido,authentication_ldap_simple' ',*:authentication_fido,' 'caching_sha2_password:authentication_ldap_simple'
- Parameters
-
new_policy_value | [in] new value of the variable |
parsed_factors | [out] parsed factors |
- Return values
-
◆ release_plugin_refs()
void authentication_policy::Policy::release_plugin_refs |
( |
| ) |
|
|
inlineprivate |
Release all plugin references and clear plugin_refs container.
◆ update()
bool authentication_policy::Policy::update |
( |
const char * |
new_policy | ) |
|
|
protected |
Update @authentication_policy variable value.
- Parameters
-
[in] | new_policy | the new value of the variable. |
- Return values
-
◆ validate()
bool authentication_policy::Policy::validate |
( |
const char * |
new_policy | ) |
|
|
protected |
Validate @authentication_policy variable value.
- Parameters
-
[in] | new_policy | the new value of the variable. |
- Return values
-
◆ deinit
Component deinitialization.
◆ get_first_factor_default_plugin [1/2]
Get copy of default plugin name.
- Parameters
-
mem_root | [in] place to allocate the name |
name | [out] copy of the name |
◆ get_first_factor_default_plugin [2/2]
void get_first_factor_default_plugin |
( |
std::string & |
name | ) |
|
|
friend |
Get copy of first factor default plugin name.
- Parameters
-
name | [out] copy of the name |
◆ get_policy_factors
void get_policy_factors |
( |
Factors & |
factors | ) |
|
|
friend |
Get copy of the authentication policy factors.
The aim is to work is with consistent snapshot of the factor avoiding long time locking.
- Parameters
-
factors | [out] authentication policy factors |
◆ init
int init |
( |
const char * |
opt_authentication_policy | ) |
|
|
friend |
Initialize authentication policy.
- Parameters
-
opt_authentication_policy | [in] value of authentication_policy sysvar |
- Return values
-
◆ policy_update
bool policy_update |
( |
const char * |
new_policy | ) |
|
|
friend |
Validate @authentication_policy variable value.
- Parameters
-
[in] | new_policy | the new value of the variable. |
- Return values
-
◆ policy_validate
bool policy_validate |
( |
const char * |
new_policy | ) |
|
|
friend |
Validate @authentication_policy variable value.
- Parameters
-
[in] | new_policy | the new value of the variable. |
- Return values
-
◆ factors
Factors authentication_policy::Policy::factors |
|
private |
Actual authentication policy factors.
◆ new_factors
Factors authentication_policy::Policy::new_factors |
|
private |
Verified, but not yet set authentication policy factors.
Set in validate(), replace actual factors in update(). Used to avoid second validation in update().
◆ plugin_refs
std::vector<plugin_ref> authentication_policy::Policy::plugin_refs |
|
private |
◆ policy
Policy * authentication_policy::Policy::policy |
|
staticprotected |
Pointer to the authentication policy object.
◆ verified_policy_value
std::string authentication_policy::Policy::verified_policy_value |
|
private |
The verified policy value.
Used to ensure the following validate() and update() work with the same value.
The documentation for this class was generated from the following files: