24#ifndef AUTH_LDAP_SASL_CLIENT_H_
25#define AUTH_LDAP_SASL_CLIENT_H_
41#define SASL_MAX_STR_SIZE 1024
42#define SASL_BUFFER_SIZE 9000
43#define SASL_SERVICE_NAME "ldap"
46#ifdef SASL_CB_GETREALM
47 {SASL_CB_GETREALM,
nullptr,
nullptr},
49 {SASL_CB_USER,
nullptr,
nullptr},
50 {SASL_CB_AUTHNAME,
nullptr,
nullptr},
51 {SASL_CB_PASS,
nullptr,
nullptr},
52 {SASL_CB_ECHOPROMPT,
nullptr,
nullptr},
53 {SASL_CB_NOECHOPROMPT,
nullptr,
nullptr},
54 {SASL_CB_LIST_END,
nullptr,
nullptr}};
85 void interact(sasl_interact_t *ilist);
87 int sasl_start(
char **client_output,
int *client_output_length);
88 int sasl_step(
char *server_in,
int server_in_length,
char **client_out,
89 int *client_out_length);
91 unsigned char **reponse,
int *response_len);
94#if defined(KERBEROS_LIB_CONFIGURED)
sasl_security_properties_t security_properties
Definition: auth_ldap_sasl_client.h:64
#define SASL_MAX_STR_SIZE
Definition: auth_ldap_sasl_client.h:41
static const sasl_callback_t callbacks[]
Definition: auth_ldap_sasl_client.h:45
Definition: auth_ldap_sasl_client.h:79
void set_user_info(std::string name, std::string pwd)
Definition: auth_ldap_sasl_client.cc:355
char m_user_pwd[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:100
void read_kerberos_user_name()
Definition: auth_ldap_sasl_client.cc:334
int initilize()
Definition: auth_ldap_sasl_client.cc:161
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:236
char m_user_name[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:99
MYSQL * m_mysql
Definition: auth_ldap_sasl_client.h:106
MYSQL_PLUGIN_VIO * m_vio
Definition: auth_ldap_sasl_client.h:105
std::string get_method()
Definition: auth_ldap_sasl_client.cc:331
int sasl_step(char *server_in, int server_in_length, char **client_out, int *client_out_length)
Definition: auth_ldap_sasl_client.cc:307
std::string m_ldap_server_host
Definition: auth_ldap_sasl_client.h:103
Sasl_client()
Definition: auth_ldap_sasl_client.cc:154
void interact(sasl_interact_t *ilist)
Definition: auth_ldap_sasl_client.cc:53
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:93
void set_plugin_info(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
Definition: auth_ldap_sasl_client.cc:82
char m_mechanism[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:101
int sasl_start(char **client_output, int *client_output_length)
Definition: auth_ldap_sasl_client.cc:272
sasl_conn_t * m_connection
Definition: auth_ldap_sasl_client.h:104
char m_service_name[SASL_MAX_STR_SIZE]
Definition: auth_ldap_sasl_client.h:102
~Sasl_client()
Definition: auth_ldap_sasl_client.cc:209
Sasl_mechanism * m_sasl_mechanism
Definition: auth_ldap_sasl_client.h:107
Definition: auth_ldap_sasl_mechanism.h:43
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
Definition: instrumented_condition_variable.h:32
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:33
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:146