SASL_AUTHORIZE_T(3)
π sasl_authorize_t(3) β Cyrus SASL, bestie edition π
okay so real talk, this one lives in the Cyrus SASL manual, section 3, and it's literally the bouncer-at-the-club of the SASL world. let's get into it π«Ά
β¨ NAME β¨
sasl_authorize_t β Cyrus SASL documentation π
πΈ SYNOPSIS πΈ
#include <sasl/sasl.h>
int sasl_authorize_t(void *context,
const char *requested_user, unsigned alen,
const char *auth_identity, unsigned alen,
const char *def_realm, unsigned urlen,
struct propctx *propctx)
like yes, alen shows up twice, that's just how it is, we don't question the ancestors π
π¦ DESCRIPTION π¦
so sasl_authorize_t is the callback that answers the question: is this allowed?? specifically, it checks whether the authorized user auth_identity is actually permitted to act as the user requested_user. it's giving "who do you think you are" but make it polite β¨
the classic example, and it's a good one: the user root might wanna authenticate with his own credentials but then act as the user mmercer β and when that happens, it's with all of mmercer's rights, not root's. big difference, no cap. π
β οΈ a server application should be very careful here, and should probably err on the side of caution when deciding which users are allowed to proxy as which other users. this is not the place to be chill and generous. this is the place to be a little paranoid, bestie. π
π RETURN VALUE π
SASL callback functions should return SASL return codes β peek at sasl.h for the full list, it's all in there. and SASL_OK means success. that's the one you want. π
π SEE ALSO π
π AUTHOR π
The Cyrus Team β icons only, we stan π
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page, you ate it, you understood it, go forth and authorize responsibly π§β¨
this little deep-dive comes from Cyrus SASL 2.1.28, dated February 18, 2022 β mwah, sending you the manual page equivalent of a forehead kiss ππΈπ«Ά
π¦ where this page comes from
- alpine 3.22: cyrus-sasl-doc 2.1.28-r8 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.23: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.24: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- centos-stream 10: cyrus-sasl-devel 2.1.28-27.el10 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms