Commit graph

19 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
dc842c44d1 sasl: Make this crate no_std
We mostly had to import from alloc some structs that are part of the std
prelude, such as Vec and String.
2024-10-27 21:25:14 +01:00
Emmanuel Gil Peyrot
0267383803 sasl: Improve frame parsing
All keys only have a single char, so avoid allocating a whole String for
them.  Also move to a BTreeMap as this is more efficient on such keys.
2024-10-27 21:25:14 +01:00
Alvaro Parker
2ff89a9e42 fix typos 2024-09-16 18:29:44 -03:00
xmppftw
2103ef0191 Remove manual doc_cfg feature because we have doc_auto_cfg 2024-08-05 11:14:41 +02:00
Lucas Kent
8bdd19b0ff Add SCRAM client extensions support
The SCRAM RFC describes extensions that can be used to add extra
data into the protocol.

This commit adds support for the client scram mechanism to insert extension
data into the client messages at the locations specified by the SCRAM RFC.

Kafka utilizes these extensions when authenticating delegation tokens
over scram. Since I am writing a kafka client I would like access to
these extensions so I can support delegation tokens.

I've only added them to Scram::new not Mechanism::from_credentials
since they do not apply to other mechanisms. For my purposes this is
fine since I only need to work with scram. However it would be
limiting for other use cases, so I'm quite happy to add the extension
fields into Credentials if that was desired. For now I've left it out
since the fields would be scram exclusive and everything else in
Credentials is currently generic.
2024-05-13 23:42:22 +00:00
Lucas Kent
1449d300dd Fix clippy lints for sasl crate
Some checks are pending
Build / lint (push) Waiting to run
Build / test-stable (push) Blocked by required conditions
Build / test-nightly (push) Blocked by required conditions
2024-05-13 16:03:48 +00:00
Lucas Kent
a291ab2e83 Remove an allocation in client::mechanisms::scram::Scram::initial 2024-05-06 08:25:24 +10:00
Jonas Schäfer
13be111de1 sasl: make docs.rs emit nice feature tags on feature-gated items 2024-04-23 19:22:04 +02:00
Emmanuel Gil Peyrot
b94d1b5222 sasl: Use the right name for SCRAM with channel binding
It is SCRAM-SHA-1-PLUS, not SCRAM-SHA-1.
2023-10-25 20:03:11 +02:00
6efc67a198 sasl: Update base64 to 0.21
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-08-20 21:24:04 +02:00
Gustav Palmqvist
c9931f12a9 Fixed not building when default-features = false 2022-05-20 18:54:50 +02:00
Emmanuel Gil Peyrot
6e22c0fcb4 Bump all hash crates 2021-12-25 15:57:41 +01:00
Emmanuel Gil Peyrot
7fd6923464 Use error structs for errors instead of plain strings. 2020-05-15 13:56:09 +02:00
Emmanuel Gil Peyrot
09745829f1 client: Remove Result from Mechanism::initial(). 2020-02-25 23:31:29 +01:00
Emmanuel Gil Peyrot
0c426b4d17 Remove .unwrap() in SCRAM code. 2019-01-18 00:26:48 +01:00
Emmanuel Gil Peyrot
9e9f09a9a5 Update to Edition 2018. 2019-01-17 22:54:32 +01:00
Emmanuel Gil Peyrot
a8fe78704b remove println!() introduced in 7b52210d 2017-05-06 13:21:58 +01:00
Geoffroy Couprie
a8f8744e21 isolate scram behind a compilation feature 2017-03-25 14:44:22 +01:00
lumi
4b9f2376af initial work towards server-side support 2017-03-16 20:04:22 +01:00