Data Structures | Macros | Typedefs | Enumerations | Functions
Vortex SASL: SASL profile support and related functions

Data Structures

struct  _VortexSaslProps
 Type definition used by VortexSaslCommonHandler which transports all properties required by a particular SASL profile. More...
 

Macros

#define AUTH_ID_FROM_CHANNEL(channel)   (vortex_sasl_is_authenticated (vortex_channel_get_connection (channel)) ? vortex_sasl_get_propertie (vortex_channel_get_connection (channel), VORTEX_SASL_AUTH_ID) : NULL)
 Convenience macro that allows to get the auth Id for the connection that is running the channel provided. More...
 
#define AUTH_ID_FROM_CONN(conn)   (vortex_sasl_is_authenticated (conn) ? vortex_sasl_get_propertie (conn, VORTEX_SASL_AUTH_ID) : NULL)
 Convenience macro that allows to get the auth Id for the connection provided. More...
 
#define SASL_ANONYMOUS_TOKEN   "sasl:anonymous:token"
 Mark used to store the anonymous token provided to comple the SASL ANONYMOUS mechanism. More...
 
#define SASL_AUTHID   "sasl:authid"
 Mark used by the sasl module to store the authorization id used for a successful SASL negotation (that is the user login). More...
 
#define SASL_AUTHZID   "sasl:authzid"
 Mark used by the sasl module to store the proxy authorization id. More...
 
#define SASL_HOSTNAME   "sasl:hostname"
 Mark used to store the SASL hostname used. More...
 
#define SASL_IS_AUTHENTICATED   "sasl:is:authenticated"
 Mark used to check if a connection was completely authenticated. More...
 
#define SASL_METHOD_USED   "sasl:method:used"
 Mark used to store the SASL mechanism used. More...
 
#define SASL_REALM   "sasl:realm"
 Mark used to store the realm value used by some SASL mechanism. More...
 
#define VORTEX_SASL_ANONYMOUS   "http://iana.org/beep/SASL/ANONYMOUS"
 ANONYMOUS profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_ANONYMOUS_USER_DATA   "__VORTEX_SASL_ANONYMOUS_USER_DATA"
 Key value to access the user-defined pointer associated with a connection using SASL ANONYMOUS authentication method. More...
 
#define VORTEX_SASL_CRAM_MD5   "http://iana.org/beep/SASL/CRAM-MD5"
 CRAM-MD5 profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_CRAM_MD5_USER_DATA   "__VORTEX_SASL_CRAM_MD5_USER_DATA"
 Key value to access the user-defined pointer associated with a connection using SASL CRAM MD5 authentication method. More...
 
#define VORTEX_SASL_DIGEST_MD5   "http://iana.org/beep/SASL/DIGEST-MD5"
 DIGEST-MD5 profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_DIGEST_MD5_USER_DATA   "__VORTEX_SASL_DIGEST_MD5_USER_DATA"
 Key value to access the user-defined pointer associated with a connection using SASL DIGEST MD5 authentication method. More...
 
#define VORTEX_SASL_EXTERNAL   "http://iana.org/beep/SASL/EXTERNAL"
 EXTERNAL profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_EXTERNAL_USER_DATA   "__VORTEX_SASL_EXTERNAL_USER_DATA"
 Key value to access the user-defined pointer associated with a connection using SASL EXTERNAL authentication method. More...
 
#define VORTEX_SASL_GSSAPI   "http://iana.org/beep/SASL/GSSAPI"
 GSSAPI profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_KERBEROS_V4   "http://iana.org/beep/SASL/KERBEROS_V4"
 KERBEROS_V4 profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_PLAIN   "http://iana.org/beep/SASL/PLAIN"
 PLAIN profile identification to be used at vortex_sasl_start_auth or vortex_sasl_accept_negotiation. More...
 
#define VORTEX_SASL_PLAIN_USER_DATA   "__VORTEX_SASL_PLAIN_USER_DATA"
 Key value to access the user-defined pointer associated with a connection using SASL PLAIN authentication method. More...
 

Typedefs

typedef axl_bool(* VortexSaslAuthAnonymous )(VortexConnection *connection, const char *anonymous_token)
 Asynchronous notification to enable user space to accept or deny anonymous authentication for SASL ANONYMOUS profile. More...
 
typedef axl_bool(* VortexSaslAuthAnonymousFull )(VortexConnection *connection, const char *anonymous_token, axlPointer user_data)
 Asynchronous notification to enable user space to accept or deny anonymous authentication for SASL ANONYMOUS profile. More...
 
typedef char *(* VortexSaslAuthCramMd5 )(VortexConnection *connection, const char *auth_id)
 Asynchronous notification to enable user space code to validate SASL CRAM MD5 request received. More...
 
typedef char *(* VortexSaslAuthCramMd5Full )(VortexConnection *connection, const char *auth_id, axlPointer user_data)
 Asynchronous notification to enable user space code to validate SASL CRAM MD5 request received. More...
 
typedef char *(* VortexSaslAuthDigestMd5 )(VortexConnection *connection, const char *auth_id, const char *authorization_id, const char *realm)
 Asynchronous notification to enable user space to validate SASL DIGEST MD5 received requests. More...
 
typedef char *(* VortexSaslAuthDigestMd5Full )(VortexConnection *connection, const char *auth_id, const char *authorization_id, const char *realm, axlPointer user_data)
 Asynchronous notification to enable user space to validate SASL DIGEST MD5 received requests. More...
 
typedef axl_bool(* VortexSaslAuthExternal )(VortexConnection *connection, const char *authorization_id)
 Asynchronous notification to enable user space to accept or deny authentication for SASL EXTERNAL profile. More...
 
typedef axl_bool(* VortexSaslAuthExternalFull )(VortexConnection *connection, const char *authorization_id, axlPointer user_data)
 Asynchronous notification to enable user space to accept or deny authentication for SASL EXTERNAL profile, and passes a user defined pointer. More...
 
typedef void(* VortexSaslAuthNotify )(VortexConnection *connection, VortexStatus status, char *status_message, axlPointer user_data)
 Async notifications for SASL auth process. More...
 
typedef axl_bool(* VortexSaslAuthPlain )(VortexConnection *connection, const char *auth_id, const char *authorization_id, const char *password)
 Asynchronous notification to enable user space code to validate SASL PLAIN request received. More...
 
typedef axl_bool(* VortexSaslAuthPlainFull )(VortexConnection *connection, const char *auth_id, const char *authorization_id, const char *password, axlPointer user_data)
 Asynchronous notification to enable user space code to validate SASL PLAIN request received. More...
 
typedef axlPointer(* VortexSaslCommonHandler )(VortexConnection *connection, VortexSaslProps *properties, axlPointer user_data)
 Common handler that unifies all SASL profiles allowing to manage all incoming SASL request, for all supported profiles, using the same handler. More...
 
typedef struct _VortexSaslProps VortexSaslProps
 Type definition used by VortexSaslCommonHandler which transports all properties required by a particular SASL profile. More...
 

Enumerations

enum  VortexSaslProperties {
  VORTEX_SASL_AUTH_ID = 1, VORTEX_SASL_AUTHORIZATION_ID = 2, VORTEX_SASL_PASSWORD = 3, VORTEX_SASL_REALM = 4,
  VORTEX_SASL_ANONYMOUS_TOKEN = 5, VORTEX_SASL_HOSTNAME = 6
}
 Set of properties to be used to configure client authentication. More...
 

Functions

axl_bool vortex_sasl_accept_negotiation (VortexCtx *ctx, const char *mech)
 Allows to configure current Vortex Library process to accept incoming SASL negotiations. More...
 
axl_bool vortex_sasl_accept_negotiation_common (VortexCtx *ctx, const char *mech, VortexSaslCommonHandler auth_handler, axlPointer user_data)
 Unified SASL listener side profile activation. More...
 
axl_bool vortex_sasl_accept_negotiation_full (VortexCtx *ctx, const char *mech, axlPointer user_data)
 Allows to configure current Vortex Library process to accept incoming SASL negotiations. More...
 
char * vortex_sasl_auth_method_used (VortexConnection *connection)
 Allows to get SASL method used to authenticate the connection. More...
 
void vortex_sasl_cleanup (VortexCtx *ctx)
 Allows to cleanup and terminate SASL module function on the provided context. More...
 
char * vortex_sasl_get_propertie (VortexConnection *connection, VortexSaslProperties prop)
 Allows to get current SASL properties from the given connection. More...
 
axl_bool vortex_sasl_init (VortexCtx *ctx)
 Initializes SASL profile implementation on the provided context. More...
 
axl_bool vortex_sasl_is_authenticated (VortexConnection *connection)
 Allows to check if the given connection have been successfully authenticated. More...
 
void vortex_sasl_set_anonymous_validation (VortexCtx *ctx, VortexSaslAuthAnonymous auth_handler)
 Allows to set current auth validation handler for the the SASL ANONYMOUS profile. More...
 
void vortex_sasl_set_anonymous_validation_full (VortexCtx *ctx, VortexSaslAuthAnonymousFull auth_handler)
 Allows to set current auth validation handler for the the SASL ANONYMOUS profile. More...
 
void vortex_sasl_set_cram_md5_validation (VortexCtx *ctx, VortexSaslAuthCramMd5 auth_handler)
 Allows to set the validation handler to be used while authenticating CRAM-MD5 SASL profile. More...
 
void vortex_sasl_set_cram_md5_validation_full (VortexCtx *ctx, VortexSaslAuthCramMd5Full auth_handler)
 Allows to set the validation handler to be used while authenticating CRAM-MD5 SASL profile. More...
 
void vortex_sasl_set_digest_md5_validation (VortexCtx *ctx, VortexSaslAuthDigestMd5 auth_handler)
 Allows to set current auth validation handler for the the SASL DIGEST-MD5 profile. More...
 
void vortex_sasl_set_digest_md5_validation_full (VortexCtx *ctx, VortexSaslAuthDigestMd5Full auth_handler)
 Allows to set current auth validation handler for the the SASL DIGEST-MD5 profile. More...
 
void vortex_sasl_set_external_validation (VortexCtx *ctx, VortexSaslAuthExternal auth_handler)
 Allows to set current auth validation handler for the the SASL EXTERNAL profile. More...
 
void vortex_sasl_set_external_validation_full (VortexCtx *ctx, VortexSaslAuthExternalFull auth_handler)
 Allows to set current auth validation handler for the the SASL EXTERNAL profile. More...
 
void vortex_sasl_set_plain_validation (VortexCtx *ctx, VortexSaslAuthPlain auth_handler)
 Allows to set the validation handler to be used while authenticating PLAIN SASL profile. More...
 
void vortex_sasl_set_plain_validation_full (VortexCtx *ctx, VortexSaslAuthPlainFull auth_handler)
 Allows to set the validation handler to be used while authenticating PLAIN SASL profile. More...
 
axl_bool vortex_sasl_set_propertie (VortexConnection *connection, VortexSaslProperties prop, char *value, axlDestroyFunc value_destroy)
 Allows to configure SASL properties used for the SASL authentication process. More...
 
void vortex_sasl_start_auth (VortexConnection *connection, const char *profile, VortexSaslAuthNotify process_status, axlPointer user_data)
 Begin SASL authentication process using the selected profile. More...
 
void vortex_sasl_start_auth_sync (VortexConnection *connection, const char *profile, VortexStatus *status, char **status_message)
 Perform SASL negotiation in a synchronous mode (blocking the caller until process finish). More...
 

Detailed Description