info > Authen::SASL::Perl

📛 NAME

Authen::SASL::Perl — Perl implementation of the SASL Authentication framework

🚀 Quick Reference

Use CaseCommandDescription
🧑 Create SASL client with CRAM-MD5, PLAIN, ANONYMOUSAuthen::SASL->new( mechanism => 'CRAM-MD5 PLAIN ANONYMOUS', callback => { user => $user, pass => \&fetch_password } )Instantiate a pure Perl SASL client with multiple mechanisms and callbacks
🔐 Anonymous accessmechanism => 'ANONYMOUS'Use the Anonymous SASL mechanism (RFC 2245) for no-auth internet access
🔑 Challenge-response with CRAM-MD5mechanism => 'CRAM-MD5'Use CRAM-MD5 (RFC 2195) — simple challenge-response, no plaintext passwords
đŸ›Ąī¸ Stronger authentication with DIGEST-MD5mechanism => 'DIGEST-MD5'Use DIGEST-MD5 (RFC 2831) — prevents chosen plaintext attacks, recommended over CRAM-MD5
🔗 External authenticationmechanism => 'EXTERNAL'Use EXTERNAL (RFC 2222) to delegate to an external auth system
đŸŽĢ Kerberos via GSSAPImechanism => 'GSSAPI'Use GSSAPI (RFC 2222) — almost exclusively for Kerberos 5
📧 Username/password with LOGINmechanism => 'LOGIN'Use LOGIN (draft-murchison-sasl-login) — plaintext credentials, use with encryption
📄 Username/password with PLAINmechanism => 'PLAIN'Use PLAIN (RFC 2595) — plaintext credentials, use with encryption
🖧 Server-side options for DIGEST-MD5server_new => { no_integrity => 1, no_confidentiality => 1 }Configure security layer negotiation for DIGEST-MD5 server

📋 SYNOPSIS

use Authen::SASL qw(Perl);

$sasl = Authen::SASL->new(
  mechanism => 'CRAM-MD5 PLAIN ANONYMOUS',
  callback => {
    user => $user,
    pass => \&fetch_password
  }
);

📝 DESCRIPTION

Authen::SASL::Perl is the pure Perl implementation of SASL mechanisms in the Authen::SASL framework.

At the time of this writing it provides the client part implementation for the following SASL mechanisms:

👤 ANONYMOUS

The Anonymous SASL Mechanism as defined in RFC 2245 resp. in IETF Draft draft-ietf-sasl-anon-03.txt from February 2004 provides a method to anonymously access internet services.

Since it does no authentication it does not need to send any confidential information such as passwords in plain text over the network.

🔐 CRAM-MD5

The CRAM-MD5 SASL Mechanism as defined in RFC2195 resp. in IETF Draft draft-ietf-sasl-crammd5-XX.txt offers a simple challenge-response authentication mechanism.

Since it is a challenge-response authentication mechanism no passwords are transferred in clear-text over the wire.

Due to the simplicity of the protocol CRAM-MD5 is susceptible to replay and dictionary attacks, so DIGEST-MD5 should be used in preference.

đŸ›Ąī¸ DIGEST-MD5

The DIGEST-MD5 SASL Mechanism as defined in RFC 2831 resp. in IETF Draft draft-ietf-sasl-rfc2831bis-XX.txt offers the HTTP Digest Access Authentication as SASL mechanism.

Like CRAM-MD5 it is a challenge-response authentication method that does not send plain text passwords over the network.

Compared to CRAM-MD5, DIGEST-MD5 prevents chosen plaintext attacks, and permits the use of third party authentication servers, so that it is recommended to use DIGEST-MD5 instead of CRAM-MD5 when possible.

🔗 EXTERNAL

The EXTERNAL SASL mechanism as defined in RFC 2222 allows the use of external authentication systems as SASL mechanisms.

đŸŽĢ GSSAPI

The GSSAPI SASL mechanism as defined in RFC 2222 resp. IETF Draft draft-ietf-sasl-gssapi-XX.txt allows using the Generic Security Service Application Program Interface [GSSAPI] KERBEROS V5 as as SASL mechanism.

Although GSSAPI is a general mechanism for authentication it is almost exclusively used for Kerberos 5.

📧 LOGIN

The LOGIN SASL Mechanism as defined in IETF Draft draft-murchison-sasl-login-XX.txt allows the combination of username and clear-text password to be used in a SASL mechanism.

It does does not provide a security layer and sends the credentials in clear over the wire. Thus this mechanism should not be used without adequate security protection.

📄 PLAIN

The Plain SASL Mechanism as defined in RFC 2595 resp. IETF Draft draft-ietf-sasl-plain-XX.txt is another SASL mechanism that allows username and clear-text password combinations in SASL environments.

Like LOGIN it sends the credentials in clear over the network and should not be used without sufficient security protection.

🖧 Server Support

As for server support, only PLAIN, LOGIN and DIGEST-MD5 are supported at the time of this writing.

âš™ī¸ server_new Options

"server_new" OPTIONS is a hashref that is only relevant for DIGEST-MD5 for now and it supports the following options:

These configure how the security layers are negotiated with the client (or rather imposed to the client).

📚 SEE ALSO

âœī¸ AUTHOR

Peter Marschall <peter AT adpm.de>

Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap AT perl.org>

ÂŠī¸ COPYRIGHT

Copyright (c) 2004-2006 Peter Marschall. All rights reserved. This document is distributed, and may be redistributed, under the same terms as Perl itself.

Authen::SASL::Perl
📛 NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION
👤 ANONYMOUS 🔐 CRAM-MD5 đŸ›Ąī¸ DIGEST-MD5 🔗 EXTERNAL đŸŽĢ GSSAPI 📧 LOGIN 📄 PLAIN 🖧 Server Support âš™ī¸ server_new Options
📚 SEE ALSO âœī¸ AUTHOR ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-25 03:04 @216.73.216.179
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!