24#ifndef AUTH_LDAP_KERBEROS_H_
25#define AUTH_LDAP_KERBEROS_H_
158 void log(
int error_code);
Kerberos class is built around kerberos library.
Definition: auth_ldap_kerberos.h:58
krb5_context m_context
Kerberos context.
Definition: auth_ldap_kerberos.h:142
void get_ldap_host(std::string &host)
This function gets LDAP host from krb5.conf file.
Definition: auth_ldap_kerberos.cc:43
~Kerberos()
Destructor.
Definition: auth_ldap_kerberos.cc:41
void set_user_and_password(const char *user, const char *password)
Set user and password member variables.
Definition: auth_ldap_kerberos.h:74
void cleanup()
This function frees kerberos context, credentials, credentials cache and user principal.
Definition: auth_ldap_kerberos.cc:76
Krb5_interface krb5
interface to kerberos functions
Definition: auth_ldap_kerberos.h:150
bool get_kerberos_config()
This method gets kerberos profile settings from krb5.conf file.
Definition: auth_ldap_kerberos.cc:253
bool open_default_cache()
Opens default Kerberos cache.
Definition: auth_ldap_kerberos.cc:92
bool obtain_store_credentials()
Definition: auth_ldap_kerberos.cc:117
krb5_ccache m_krb_credentials_cache
Kerberos cache.
Definition: auth_ldap_kerberos.h:144
void destroy_credentials()
Destroys existing credentials (remove them from the cache).
Definition: auth_ldap_kerberos.cc:455
std::string m_user
user name
Definition: auth_ldap_kerberos.h:134
std::string m_ldap_server_host
LDAP host.
Definition: auth_ldap_kerberos.h:138
std::string m_password
user password
Definition: auth_ldap_kerberos.h:136
bool m_destroy_tgt
shall be the credentials destroyed on cleanup
Definition: auth_ldap_kerberos.h:140
Kerberos()
Constructor.
Definition: auth_ldap_kerberos.cc:32
void close_default_cache()
Closes default Kerberos cache.
Definition: auth_ldap_kerberos.cc:106
bool credentials_valid()
Check if the cache contains valid credentials.
Definition: auth_ldap_kerberos.cc:366
bool get_default_principal_name(std::string &name)
This function retrieves default principle from kerberos configuration and parses the user name from i...
Definition: auth_ldap_kerberos.cc:468
bool m_initialized
is the object initialized
Definition: auth_ldap_kerberos.h:132
void log(int error_code)
Log a Kerberos error, the message is taken from the Kerberos based on the error code.
Definition: auth_ldap_kerberos.cc:517
bool initialize()
This function creates kerberos context, initializes credentials cache and user principal.
Definition: auth_ldap_kerberos.cc:47
bool m_credentials_created
were the credentials created by the object
Definition: auth_ldap_kerberos.h:148
krb5_creds m_credentials
Kerberos credentials.
Definition: auth_ldap_kerberos.h:146
Class representing interface to KRB5 functions.
Definition: krb5_interface.h:138
static char * password
Definition: mysql_secure_installation.cc:58
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
Definition: auth_ldap_kerberos.cc:30
case opt name
Definition: sslopt-case.h:29