24#ifndef AUTH_LDAP_SASL_MECHANISM_H_
25#define AUTH_LDAP_SASL_MECHANISM_H_
29#ifdef HAVE_SASL_SASL_H
36#if defined(KERBEROS_LIB_CONFIGURED)
71 [[maybe_unused]]
const char *
password) {
144#if defined(KERBEROS_LIB_CONFIGURED)
208#if defined(SCRAM_LIB_CONFIGURED)
Kerberos class is built around kerberos library.
Definition: auth_ldap_kerberos.h:58
Class representing GSSAPI/Kerberos mechanism.
Definition: auth_ldap_sasl_mechanism.h:148
bool require_conclude_by_server() override
GSSAPI authentication must be concluded by MySQL server.
Definition: auth_ldap_sasl_mechanism.h:196
const char * get_ldap_host() override
Get LDAP host.
Definition: auth_ldap_sasl_mechanism.cc:115
Kerberos m_kerberos
Kerberos object used to perform Kerberos operations.
Definition: auth_ldap_sasl_mechanism.h:202
std::string m_ldap_server_host
URL of the LDAP server.
Definition: auth_ldap_sasl_mechanism.h:200
bool preauthenticate(const char *user, const char *password) override
Preauthentication step.
Definition: auth_ldap_sasl_mechanism.cc:67
Sasl_mechanism_kerberos()
Constructor.
Definition: auth_ldap_sasl_mechanism.h:153
bool get_default_user(std::string &name) override
Get default user name.
Definition: auth_ldap_sasl_mechanism.cc:63
const sasl_callback_t * get_callbacks() override
Gets array of SASL callbacks supported by the mechanism.
Definition: auth_ldap_sasl_mechanism.h:190
~Sasl_mechanism_kerberos() override=default
Destructor.
static const sasl_callback_t callbacks[]
Array of SASL callbacks supported by this mechanism.
Definition: auth_ldap_sasl_mechanism.h:204
Class representing SCRAM family of SASL mechanisms (currently SCRAM-SHA-1 and SCRAM-SHA-256).
Definition: auth_ldap_sasl_mechanism.h:213
const sasl_callback_t * get_callbacks() override
Gets array of SASL callbacks supported by the mechanism.
Definition: auth_ldap_sasl_mechanism.h:231
Sasl_mechanism_scram(const char *mechanism_name)
Constructor.
Definition: auth_ldap_sasl_mechanism.h:220
~Sasl_mechanism_scram() override=default
Destructor.
static const sasl_callback_t callbacks[]
Array of SASL callbacks supported by this mechanism.
Definition: auth_ldap_sasl_mechanism.h:235
Base class representing SASL mechanism.
Definition: auth_ldap_sasl_mechanism.h:48
virtual bool get_default_user(std::string &name)
Get default user name.
Definition: auth_ldap_sasl_mechanism.h:88
const char * m_mechanism_name
name of the mechanism
Definition: auth_ldap_sasl_mechanism.h:141
virtual const char * get_ldap_host()
Get LDAP host.
Definition: auth_ldap_sasl_mechanism.h:79
virtual bool require_conclude_by_server()
Check if the authentication method requires conclusion message from the server.
Definition: auth_ldap_sasl_mechanism.h:113
Sasl_mechanism(const char *mechanism_name)
Constructor.
Definition: auth_ldap_sasl_mechanism.h:134
static bool create_sasl_mechanism(const char *mechanism_name, Sasl_mechanism *&mechanism)
SASL mechanism factory function.
Definition: auth_ldap_sasl_mechanism.cc:121
static const sasl_callback_t callbacks[]
array of SASL callbacks
Definition: auth_ldap_sasl_mechanism.h:139
static const char SASL_SCRAM_SHA256[]
SCRAM-SHA-256 string.
Definition: auth_ldap_sasl_mechanism.h:55
virtual ~Sasl_mechanism()=default
Destructor.
const char * get_mechanism_name()
Gets constans string describing mechanism name.
Definition: auth_ldap_sasl_mechanism.h:104
virtual bool preauthenticate(const char *user, const char *password)
Preauthentication step, e.g.
Definition: auth_ldap_sasl_mechanism.h:70
virtual const sasl_callback_t * get_callbacks()
Get list of supported SASL callbacks.
Definition: auth_ldap_sasl_mechanism.h:97
static const char SASL_SCRAM_SHA1[]
SCRAM-SHA-1 string.
Definition: auth_ldap_sasl_mechanism.h:53
static const char SASL_GSSAPI[]
GSSAPI string.
Definition: auth_ldap_sasl_mechanism.h:51
static char * password
Definition: mysql_secure_installation.cc:58
char * user
Definition: mysqladmin.cc:66
Definition: auth_ldap_kerberos.cc:30
const int SASL_ERROR_INVALID_METHOD
Definition: auth_ldap_sasl_mechanism.h:42
case opt name
Definition: sslopt-case.h:29