23#ifndef AUTH_LDAP_KERBEROS_H_
24#define AUTH_LDAP_KERBEROS_H_
157 void log(
int error_code);
Kerberos class is built around kerberos library.
Definition: auth_ldap_kerberos.h:57
krb5_context m_context
Kerberos context.
Definition: auth_ldap_kerberos.h:141
void get_ldap_host(std::string &host)
This function gets LDAP host from krb5.conf file.
Definition: auth_ldap_kerberos.cc:42
~Kerberos()
Destructor.
Definition: auth_ldap_kerberos.cc:40
void set_user_and_password(const char *user, const char *password)
Set user and password member variables.
Definition: auth_ldap_kerberos.h:73
void cleanup()
This function frees kerberos context, credentials, credentials cache and user principal.
Definition: auth_ldap_kerberos.cc:75
Krb5_interface krb5
interface to kerberos functions
Definition: auth_ldap_kerberos.h:149
bool get_kerberos_config()
This method gets kerberos profile settings from krb5.conf file.
Definition: auth_ldap_kerberos.cc:252
bool open_default_cache()
Opens default Kerberos cache.
Definition: auth_ldap_kerberos.cc:91
bool obtain_store_credentials()
Definition: auth_ldap_kerberos.cc:116
krb5_ccache m_krb_credentials_cache
Kerberos cache.
Definition: auth_ldap_kerberos.h:143
void destroy_credentials()
Destroys existing credentials (remove them from the cache).
Definition: auth_ldap_kerberos.cc:454
std::string m_user
user name
Definition: auth_ldap_kerberos.h:133
std::string m_ldap_server_host
LDAP host.
Definition: auth_ldap_kerberos.h:137
std::string m_password
user password
Definition: auth_ldap_kerberos.h:135
bool m_destroy_tgt
shall be the credentials destroyed on cleanup
Definition: auth_ldap_kerberos.h:139
Kerberos()
Constructor.
Definition: auth_ldap_kerberos.cc:31
void close_default_cache()
Closes default Kerberos cache.
Definition: auth_ldap_kerberos.cc:105
bool credentials_valid()
Check if the cache contains valid credentials.
Definition: auth_ldap_kerberos.cc:365
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:467
bool m_initialized
is the object initialized
Definition: auth_ldap_kerberos.h:131
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:516
bool initialize()
This function creates kerberos context, initializes credentials cache and user principal.
Definition: auth_ldap_kerberos.cc:46
bool m_credentials_created
were the credentials created by the object
Definition: auth_ldap_kerberos.h:147
krb5_creds m_credentials
Kerberos credentials.
Definition: auth_ldap_kerberos.h:145
Class representing interface to KRB5 functions.
Definition: krb5_interface.h:137
static char * password
Definition: mysql_secure_installation.cc:57
char * user
Definition: mysqladmin.cc:64
const char * host
Definition: mysqladmin.cc:63
Definition: auth_ldap_kerberos.cc:29
case opt name
Definition: sslopt-case.h:32