24#ifndef AUTH_LDAP_SASL_CLIENT_H_
25#define AUTH_LDAP_SASL_CLIENT_H_
29#ifdef HAVE_SASL_SASL_H
39#define SASL_MAX_STR_SIZE 1024
40#define SASL_SERVICE_NAME "ldap"
89 void interact(sasl_interact_t *ilist);
108 int sasl_start(
const char **client_output,
int *client_output_length);
121 int sasl_step(
char *server_input,
int server_input_length,
122 const char **client_output,
int *client_output_length);
137 char **reponse,
int *response_len);
#define SASL_MAX_STR_SIZE
Definition: auth_ldap_sasl_client.h:39
Class representing SASL client.
Definition: auth_ldap_sasl_client.h:47
int sasl_step(char *server_input, int server_input_length, const char **client_output, int *client_output_length)
Perform a step of SASL client exchange.
Definition: auth_ldap_sasl_client.cc:256
Sasl_client()=delete
Default constructor -not wanted.
char m_user_pwd[SASL_MAX_STR_SIZE]
user password used for authentication
Definition: auth_ldap_sasl_client.h:178
MYSQL_PLUGIN_VIO * m_vio
pointer to server communication channel
Definition: auth_ldap_sasl_client.h:184
bool require_conclude_by_server()
Check if the authentication method requires conclusion message from the server.
Definition: auth_ldap_sasl_client.h:146
MYSQL * m_mysql
pointer to MYSQL structure
Definition: auth_ldap_sasl_client.h:187
void interact(sasl_interact_t *ilist)
Perform SASL interaction, callled as SASL callback.
Definition: auth_ldap_sasl_client.cc:71
char m_user_name[SASL_MAX_STR_SIZE]
user name used for authentication
Definition: auth_ldap_sasl_client.h:175
void set_user_info(const char *name, const char *pwd)
Sets (copies) user name and password to the members.
Definition: auth_ldap_sasl_client.cc:302
bool set_mechanism()
Decides and sets SASL mechanism to be used for authentication.
Definition: auth_ldap_sasl_client.cc:100
Sasl_mechanism * m_sasl_mechanism
the SASL mechanism used for authentication
Definition: auth_ldap_sasl_client.h:193
int sasl_start(const char **client_output, int *client_output_length)
Starts SASL client exchange.
Definition: auth_ldap_sasl_client.cc:226
sasl_conn_t * m_connection
SASL connection data.
Definition: auth_ldap_sasl_client.h:181
bool initilize_connection()
Initializes SASL client exchange.
Definition: auth_ldap_sasl_client.cc:156
char * m_mysql_user
the original user name,
Definition: auth_ldap_sasl_client.h:190
bool set_user()
If an empty original user name was given as client parameter and passed to the plugin via MYSQL struc...
Definition: auth_ldap_sasl_client.cc:278
bool preauthenticate()
Perform preauthentication step if needed, specific to the SASL mechanism e.g.
Definition: auth_ldap_sasl_client.cc:151
int send_sasl_request_to_server(const char *request, int request_len, char **reponse, int *response_len)
Sends SASL message to server and receive an response.
Definition: auth_ldap_sasl_client.cc:187
~Sasl_client()
Destructor.
Definition: auth_ldap_sasl_client.cc:173
Base class representing SASL mechanism.
Definition: auth_ldap_sasl_mechanism.h:48
virtual bool require_conclude_by_server()
Check if the authentication method requires conclusion message from the server.
Definition: auth_ldap_sasl_mechanism.h:113
Definition: auth_ldap_kerberos.cc:30
Definition: instrumented_condition_variable.h:32
case opt name
Definition: sslopt-case.h:29
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:146