#sasl #framework #middleware #sso #api-bindings #sha-1

no-std rsasl

The Rust SASL framework, aimed at both middleware-style protocol implementation and application code. Designed to make SASL authentication simple and safe while handing as much control to the user as possible

35 releases (11 stable)

2.2.0 Oct 15, 2024
2.0.1 Apr 15, 2024
2.0.0 Feb 4, 2023
2.0.0-rc.4 Nov 22, 2022
0.1.1 Apr 28, 2020

#40 in Authentication

Download history 701/week @ 2024-08-17 2415/week @ 2024-08-24 1394/week @ 2024-08-31 500/week @ 2024-09-07 1734/week @ 2024-09-14 1285/week @ 2024-09-21 2213/week @ 2024-09-28 1293/week @ 2024-10-05 2132/week @ 2024-10-12 1882/week @ 2024-10-19 2401/week @ 2024-10-26 1317/week @ 2024-11-02 1759/week @ 2024-11-09 1932/week @ 2024-11-16 634/week @ 2024-11-23 1625/week @ 2024-11-30

6,040 downloads per month
Used in 15 crates (5 directly)

Apache-2.0 OR MIT

315KB
6K SLoC

The Rust SASL framework

Latest Version docs maintenance license msrv

rsasl is an framework for RFC 4422; the Simple Authentication and Security Layer - aka SASL.

It is designed to enable implementing SASL support in protocol handling crates while abstracting away the details, allowing downstream users to select available mechanisms and add support for additional mechanisms without any changes required in the protocol handling crate.

rsasl provide a number of mechanisms by itself:

  • ANONYMOUS
  • EXTERNAL
  • GSSAPI
  • LOGIN
  • OAUTHBEARER
  • PLAIN
  • SCRAM-SHA-1 and SCRAM-SHA-1-PLUS
  • SCRAM-SHA-256 and SCRAM-SHA-256-PLUS
  • SCRAM-SHA-512 and SCRAM-SHA-512-PLUS
  • XOAUTH2

Support for the following mechanisms was available in rsasl 1 but is not yet implemented in rsasl 2:

  • OPENID20
  • SAML20
  • GS2-KRB5
  • KERBEROS_V5
  • NTLM
  • SECURID
  • CRAM-MD5
  • DIGEST-MD5

Additional mechanisms can be implemented by other crates. (NOTE: In the current v2.0.0 this feature is unstable)

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.

MSRV - Minimum Supported Rust Version

The current msrv rsasl is Rust 0, however do note that certain features (e.g. registry_static) have dependencies with much more recent msrv.

Versions

The CHANGELOG.md contains a detailed release history, including added features and fixed bugs.

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 is a pure-Rust rewrite of this crate that is able to drop almost all unsafe code from the crate. The main branch contains the tagged stable releases, the current state of development can be found in the development state.

License

Version 2 and later of this library are dual licensed under both Apache-2.0 and MIT, at your option.

Examples

You can find a few examples on GitHub.

Dependencies

~0.5–2MB
~40K SLoC