SASL_CALLBACKS(3)

πŸ’– SASL_CALLBACKS πŸ’–

okay bestie, so this is the Cyrus SASL manual page for SASL_CALLBACKS(3), and honestly? it's giving "the library needs to ask you stuff" energy. let's get into it 🫢


✨ NAME ✨

sasl_callbacks β€” Cyrus SASL documentation


✨ SYNOPSIS ✨

#include <sasl/sasl.h>

✨ DESCRIPTION ✨

so like. sasl_callbacks are what you pull out when the application needs some information from the application. yes that's the whole bit. the most common reasons are getting usernames and passwords, because of course they are 😭

A client MUST specify what callbacks they support in the sasl_client_init(3)/sasl_server_init(3) or sasl_client_new(3)/sasl_server_new(3) calls. no cap, it's required. and if an authentication mechanism needs a callback that the application does not state it supports, then it cannot be used. that's it, that's the rule, no exceptions, periodt πŸ’…

If a callback has an id parameter, that should be checked to make sure you are giving the appropriate value. like, vibe check your id, bestie πŸ”

If an application is using the client side of the library, functions to handle the callbacks are not necessary. instead the application may deal with callbacks via SASL_INTERACT's. see sasl_client_start(3)/sasl_client_step(3) for more information. slay, you've got options ✨


🌸 Common Callbacks 🌸

these ones are for everyone, main character callbacks fr fr:

  • sasl_getopt_t β€” Get an option value
  • sasl_log_t β€” Log message handler
  • sasl_getpath_t β€” Get path to search for plugins (e.g. SASL mechanisms)
  • sasl_verifyfile_t β€” Verify files for use by SASL
  • sasl_canon_user_t(3) β€” Username canonicalization function

πŸ¦‹ Client-only Callbacks πŸ¦‹

client side only, iykyk:

  • sasl_getsimple_t β€” Get user/language list
  • sasl_getsecret_t β€” Get authentication secret
  • sasl_chalprompt_t(3) β€” Display challenge and prompt for response
  • sasl_getrealm_t β€” Get the realm for authentication

πŸ‘‘ Server-only Callbacks πŸ‘‘

server girlies, this section is yours:

  • sasl_authorize_t(3) β€” Authorize policy callback
  • sasl_server_userdb_checkpass_t β€” verify plaintext password
  • sasl_server_userdb_setpass_t β€” set plaintext password
  • sasl_getconfpath_t β€” Get path to search for SASL configuration file (server side only). New in SASL 2.1.22. ⭐

✨ RETURN VALUE ✨

SASL callback functions should return SASL return codes. see sasl_errors(3) for a complete list. SASL_OK typically indicates success β€” like when everything just works and you feel like the moment is iconic 🌈


✨ CONFORMING TO ✨

RFC 4422 β€” we stay compliant, we stay cute πŸ’–


✨ SEE ALSO ✨

sasl(3), sasl_errors(3), sasl_authorize_t(3), sasl_log_t(3), sasl_getpath_t(3), sasl_getconfpath_t(3), sasl_verifyfile_t(3), sasl_canon_user_t(3), sasl_getsimple_t(3), sasl_getsecret_t(3), sasl_chalprompt_t(3), sasl_getrealm_t(3), sasl_server_userdb_checkpass_t(3), sasl_server_userdb_setpass_t(3)


✨ AUTHOR ✨

The Cyrus Team β€” absolute legends, no notes πŸ’œ


1993-2016, The Cyrus Team


okay that's the whole page bestie, you ate that πŸ’…βœ¨

version 2.1.28, dated February 18, 2022 β€” shoutout to the Cyrus Team for this one, ily, bye πŸŽ€πŸ¦‹πŸ’–