23#ifndef AUTH_LDAP_SASL_CLIENT_H_
24#define AUTH_LDAP_SASL_CLIENT_H_
40#define SASL_MAX_STR_SIZE 1024
41#define SASL_BUFFER_SIZE 9000
42#define SASL_SERVICE_NAME "ldap"
45#ifdef SASL_CB_GETREALM
46 {SASL_CB_GETREALM,
nullptr,
nullptr},
48 {SASL_CB_USER,
nullptr,
nullptr},
49 {SASL_CB_AUTHNAME,
nullptr,
nullptr},
50 {SASL_CB_PASS,
nullptr,
nullptr},
51 {SASL_CB_ECHOPROMPT,
nullptr,
nullptr},
52 {SASL_CB_NOECHOPROMPT,
nullptr,
nullptr},
53 {SASL_CB_LIST_END,
nullptr,
nullptr}};
84 void interact(sasl_interact_t *ilist);
86 int sasl_start(
char **client_output,
int *client_output_length);
87 int sasl_step(
char *server_in,
int server_in_length,
char **client_out,
88 int *client_out_length);
90 unsigned char **reponse,
int *response_len);
93#if defined(KERBEROS_LIB_CONFIGURED)
sasl_security_properties_t security_properties
Definition: auth_ldap_sasl_client.h:63
#define SASL_MAX_STR_SIZE
Definition: auth_ldap_sasl_client.h:40
static const sasl_callback_t callbacks[]
Definition: auth_ldap_sasl_client.h:44
Definition: auth_ldap_sasl_client.h:78
void set_user_info(std::string name, std::string pwd)
Definition: auth_ldap_sasl_client.cc:354
char m_user_pwd[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:99
void read_kerberos_user_name()
Definition: auth_ldap_sasl_client.cc:333
int initilize()
Definition: auth_ldap_sasl_client.cc:160
int send_sasl_request_to_server(const unsigned char *request, int request_len, unsigned char **reponse, int *response_len)
send SASL request to the server and read the servers reply.
Definition: auth_ldap_sasl_client.cc:235
char m_user_name[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:98
MYSQL * m_mysql
Definition: auth_ldap_sasl_client.h:105
MYSQL_PLUGIN_VIO * m_vio
Definition: auth_ldap_sasl_client.h:104
std::string get_method()
Definition: auth_ldap_sasl_client.cc:330
int sasl_step(char *server_in, int server_in_length, char **client_out, int *client_out_length)
Definition: auth_ldap_sasl_client.cc:306
std::string m_ldap_server_host
Definition: auth_ldap_sasl_client.h:102
Sasl_client()
Definition: auth_ldap_sasl_client.cc:153
void interact(sasl_interact_t *ilist)
Definition: auth_ldap_sasl_client.cc:52
int read_method_name_from_server()
SASL method is send from the Mysql server, and this is set by the client.
Definition: auth_ldap_sasl_client.cc:92
void set_plugin_info(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
Definition: auth_ldap_sasl_client.cc:81
char m_mechanism[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:100
int sasl_start(char **client_output, int *client_output_length)
Definition: auth_ldap_sasl_client.cc:271
sasl_conn_t * m_connection
Definition: auth_ldap_sasl_client.h:103
char m_service_name[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:101
~Sasl_client()
Definition: auth_ldap_sasl_client.cc:208
Sasl_mechanism * m_sasl_mechanism
Definition: auth_ldap_sasl_client.h:106
Definition: auth_ldap_sasl_mechanism.h:42
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
Definition: instrumented_condition_variable.h:31
This file defines constants and data structures that are the same for both client- and server-side au...
case opt name
Definition: sslopt-case.h:32
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:145