15 releases (6 stable)

new 2.0.0-preview1 Jan 14, 2022
1.4.2 Dec 3, 2021
1.4.1 Sep 20, 2021
1.0.1 Apr 8, 2021
0.1.1 Apr 28, 2020

#28 in Authentication

Download history 7/week @ 2021-09-25 18/week @ 2021-10-02 19/week @ 2021-10-09 11/week @ 2021-10-16 1/week @ 2021-10-23 1/week @ 2021-10-30 15/week @ 2021-11-06 31/week @ 2021-11-20 28/week @ 2021-11-27 85/week @ 2021-12-04 26/week @ 2021-12-11 2/week @ 2021-12-18 13/week @ 2021-12-25 30/week @ 2022-01-01 30/week @ 2022-01-08

75 downloads per month

LGPL-2.1-or-later

700KB
13K SLoC

The Rust SASL framework

Latest Version docs maintenance license

rsasl is an framework for the Simple Authentication and Security Layer — SASL.

rsasl provide a large number of mechanisms by itself: (Crossed off ones are ported to pure Rust already, striked through ones aren't yet implemented in the 2.0 version / main branch)

  • EXTERNAL
  • ANONYMOUS
  • PLAIN
  • LOGIN
  • CRAM-MD5
  • DIGEST-MD5
  • SCRAM-SHA-1
  • SCRAM-SHA-256
  • NTLM
  • SECURID
  • GSSAPI
  • GS2-KRB5
  • SAML20
  • OPENID20
  • KERBEROS_V5

Additional mechanisms can be implemented by other crates.

Conditional compilation of mechanism

rsasl allows users to select the available mechanisms at compile time using cargo features. For an overview refer to the module documentation of rsasl::mechanisms.

Versions

Major version 1 of this crate uses gsasl-sys which are binding to GNU gsasl. This makes the use of unsafe code and FFI necessary. You can find the latest 1.X.Y version in the branch 1.X.X

Version 2.0.0-preview is a pure-Rust rewrite using sources transpiled using c2rust. Keep in mind that despite being Rust this code is as least as unsafe as the original C code. Most of this unsafe code will be removed before the first non-preview 2.0.0 release.

License

Version 2 of this library is a transpilation of gsasl and thus under the very same license of LGPL 2.1 or later.

Examples

You can find a few examples on GitHub.

Dependencies