krb5_auth(3)

πŸ“¦
version 7.8.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

✨ krb5_auth ✨

okay so bestie, welcome to krb5_auth from the Heimdal Kerberos 5 library manual (section 3, library functions, we're fancy like that πŸ’…). this is the page about the Heimdal Kerberos 5 authentication functions, and yes it is a whole vibe. grab a strawberry πŸ“ and let's go.


πŸŽ€ NAME πŸŽ€

krb5_auth β€” Heimdal Kerberos 5 authentication functions


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

here's the whole squad, signatures exactly as they are, no edits, no cap:

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc
    (krb5_context context, krb5_rd_req_in_ctx *ctx)

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
    krb5_rd_req_in_set_keytab (krb5_context context, krb5_rd_req_in_ctx
    in, krb5_keytab keytab)

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
    krb5_rd_req_in_set_pac_check (krb5_context context,
    krb5_rd_req_in_ctx in, krb5_boolean flag)

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
    krb5_rd_req_out_get_server (krb5_context context,
    krb5_rd_req_out_ctx out, krb5_principal *principal)

KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free
    (krb5_context context, krb5_rd_req_out_ctx ctx)

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx
    (krb5_context context, krb5_auth_context *auth_context, const
    krb5_data *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx
    inctx, krb5_rd_req_out_ctx *outctx)

🌸 Detailed Description 🌸

like. that's it. that's the whole detailed description. the real tea is all in the function docs below, so scroll, bestie πŸ’–


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’œ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx
    (krb5_context context, krb5_auth_context *auth_context, const krb5_data
    *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx,
    krb5_rd_req_out_ctx *outctx)

this is the core server function β€” the main character, honestly πŸ‘‘. it verifies application authentication requests from clients.

Parameters

  • context β€” Keberos 5 context. (yes the spelling is theirs, we don't touch the canon, periodt)
  • auth_context β€” the authentication context, can be NULL, then default values for the authentication context will used.
  • inbuf β€” the (AP-REQ) authentication buffer
  • server β€” the server to authenticate to. If NULL the function will try to find any available credential in the keytab that will verify the reply. The function will prefer the server specified in the AP-REQ, but if there is no mach, it will try all keytab entries for a match. This has serious performance issues for large keytabs. πŸ’€
  • inctx β€” control the behavior of the function, if NULL, the default behavior is used.
  • outctx β€” the return outctx, free with krb5_rd_req_out_ctx_free().

Returns

Kerberos 5 error code, see krb5_get_error_message().


🧚 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc
    (krb5_context context, krb5_rd_req_in_ctx * ctx)

Allocate a krb5_rd_req_in_ctx as an input parameter to krb5_rd_req_ctx(). The caller should free the context with krb5_rd_req_in_ctx_free() when done with the context. so like, clean up after yourself, we're not messy here 🫢

Parameters

  • context β€” Keberos 5 context.
  • ctx β€” in ctx to krb5_rd_req_ctx().

Returns

Kerberos 5 error code, see krb5_get_error_message().


🌈 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_keytab

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_keytab
    (krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)

Set the keytab that krb5_rd_req_ctx() will use. πŸ”‘

Parameters

  • context β€” Keberos 5 context.
  • in β€” in ctx to krb5_rd_req_ctx().
  • keytab β€” keytab that krb5_rd_req_ctx() will use, only copy the pointer, so the caller must free they keytab after krb5_rd_req_in_ctx_free() is called.
ngl the pointer thing is important β€” it's a pointer copy, not a deep copy, so mind your lifetimes bestie 😭

Returns

Kerberos 5 error code, see krb5_get_error_message().


⭐ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_pac_check

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_pac_check
    (krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)

Set if krb5_rq_red() is going to check the Windows PAC or not. (that function name is exactly how the page spells it, iykyk, i am simply the messenger πŸŽ€)

Parameters

  • context β€” Keberos 5 context.
  • in β€” krb5_rd_req_in_ctx to check the option on.
  • flag β€” flag to select if to check the pac (TRUE) or not (FALSE).

Returns

Kerberos 5 error code, see krb5_get_error_message().


πŸ“ KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free

KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free (krb5_context
    context, krb5_rd_req_out_ctx ctx)

Free the krb5_rd_req_out_ctx. bye bestie, you served πŸ’œ

Parameters

  • context β€” Keberos 5 context.
  • ctx β€” krb5_rd_req_out_ctx context to free.

πŸ”₯ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_out_get_server

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_out_get_server
    (krb5_context context, krb5_rd_req_out_ctx out, krb5_principal *
    principal)

Get the principal that was used in the request from the client. Might not match whats in the ticket if krb5_rd_req_ctx() searched in the keytab for a matching key. so like, lowkey don't assume it's the same one, okay? πŸ‘€

Parameters

  • context β€” a Kerberos 5 context.
  • out β€” a krb5_rd_req_out_ctx from krb5_rd_req_ctx().
  • principal β€” return principal, free with krb5_free_principal().

πŸ’– Author πŸ’–

Generated automatically by Doxygen for Heimdal Kerberos 5 library from the source code. (not a human, just doxygen doing its little thing, and honestly? ate. ✨)


okay that's the whole page bestie, you're officially educated πŸ’… no cap. this was Version 7.8.0, dated Tue Nov 15 2022 β€” go forth and authenticate responsibly, mwah 🫢🌈

πŸ“¦ where this page comes from