MySQL 8.0.30
Source Code Documentation
Sasl_client Class Reference

#include <auth_ldap_sasl_client.h>

Public Member Functions

 Sasl_client ()
 ~Sasl_client ()
int initilize ()
void set_plugin_info (MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
void interact (sasl_interact_t *ilist)
int read_method_name_from_server ()
 SASL method is send from the Mysql server, and this is set by the client. More...
int sasl_start (char **client_output, int *client_output_length)
int sasl_step (char *server_in, int server_in_length, char **client_out, int *client_out_length)
int send_sasl_request_to_server (const unsigned char *request, int request_len, unsigned char **reponse, int *response_len)
void set_user_info (std::string name, std::string pwd)
std::string get_method ()
void read_kerberos_user_name ()

Protected Attributes

char m_user_name [SASL_MAX_STR_SIZE]
char m_user_pwd [SASL_MAX_STR_SIZE]
char m_mechanism [SASL_MAX_STR_SIZE]
char m_service_name [SASL_MAX_STR_SIZE]
std::string m_ldap_server_host
sasl_conn_t * m_connection

Constructor & Destructor Documentation

◆ Sasl_client()

Sasl_client::Sasl_client ( )

◆ ~Sasl_client()

Sasl_client::~Sasl_client ( )

Member Function Documentation

◆ get_method()

std::string Sasl_client::get_method ( )

◆ initilize()

int Sasl_client::initilize ( )

This method try to get kerberos TGT if user name and password are not empty. If method fails, We should not start SASL authentication process. Otherwise SASL authentication may consume existing TGT and authentication process will start.

Creating sasl connection.

Set security properties.

◆ interact()

void Sasl_client::interact ( sasl_interact_t *  ilist)

◆ read_kerberos_user_name()

void Sasl_client::read_kerberos_user_name ( )

◆ read_method_name_from_server()

int Sasl_client::read_method_name_from_server ( )

SASL method is send from the Mysql server, and this is set by the client.

SASL client and sasl server may support many sasl authentication methods and can negotiate in anyone. We want to enforce the SASL authentication set by the client.

Get authentication method from the server.

◆ sasl_start()

int Sasl_client::sasl_start ( char **  client_output,
int *  client_output_length 

◆ sasl_step()

int Sasl_client::sasl_step ( char *  server_in,
int  server_in_length,
char **  client_out,
int *  client_out_length 

◆ send_sasl_request_to_server()

int Sasl_client::send_sasl_request_to_server ( const unsigned char *  request,
int  request_len,
unsigned char **  reponse,
int *  response_len 

Send the request to the MySQL server.

Get the sasl response from the MySQL server.

◆ set_plugin_info()

void Sasl_client::set_plugin_info ( MYSQL_PLUGIN_VIO vio,
MYSQL mysql 

◆ set_user_info()

void Sasl_client::set_user_info ( std::string  name,
std::string  pwd 

Member Data Documentation

◆ m_connection

sasl_conn_t* Sasl_client::m_connection

◆ m_ldap_server_host

std::string Sasl_client::m_ldap_server_host

◆ m_mechanism

char Sasl_client::m_mechanism[SASL_MAX_STR_SIZE]

◆ m_mysql

MYSQL* Sasl_client::m_mysql

◆ m_sasl_mechanism

Sasl_mechanism* Sasl_client::m_sasl_mechanism

◆ m_service_name

char Sasl_client::m_service_name[SASL_MAX_STR_SIZE]

◆ m_user_name

char Sasl_client::m_user_name[SASL_MAX_STR_SIZE]

◆ m_user_pwd

char Sasl_client::m_user_pwd[SASL_MAX_STR_SIZE]

◆ m_vio

MYSQL_PLUGIN_VIO* Sasl_client::m_vio

The documentation for this class was generated from the following files: