=============
This release:
- PR added new functions to work with
Dictionary
:from_str
- creates an intsance ofDictionary
from dictionary stringadd_str
- reads dictionary string and adds it to an existing instance ofDictionary
- Added
1.77.1, 1.77.2, 1.78.0, 1.79.0, 1.80.0, 1.80.1, 1.81.0
Rust versions to Action pipeline
- Removed
1.65.0
Rust version from Github Actions (this version is still supported by library)
- PR also improves line parsing logic of
Dictionary
to be more generic - Reworked
decrypt_data
&salt_decrypt_data
functions - extracted shared code intodecrypt_helper
=============
This release fixes issues reported in:
- Added
1.72.0, 1.72.1,1.73.0, 1.74.0, 1.74.1, 1.75.0, 1.76.0, 1.77.0
Rust versions to Action pipeline - Incorporated !29 to support addition of multiple dictionary files to a single
Dictionary
instance via newadd_file
function (Fixes #27)
- Removed
1.63.0 & 1.64.0
Rust versions from Action pipeline as they were failing to installcargo-make
(those versions are still supported by library)
- Changed
initialise_packet_from_bytes
function ofradius_packet
to: (Fixes #28)- Handle packets of the length less than 20 or more than 4096 octets - returns
RadiusError
(to comply with RFC2865) - Derive packet length from
RadiusPacket
(Length field) instead of relying onbytes.len()
- If derived packet length is greater than
bytes.len()
- returnsRadiusError
(to comply with RFC2865)
- Handle packets of the length less than 20 or more than 4096 octets - returns
- Fixed incorrect tests in
protocol/host.rs
(flagged by the changed above)
=============
This release fixes some outstanding items and, hopefully, makes it's easier to use the library
- Add new Error Type to handle exceptions when working with
InterfaceId
- Add functions to encode to/decode from
InterfaceId
bytes - Add tests for
InterfaceId
related functions - Add function to encode to/decode from
Integer64
bytes - Add tests for
Integer64
related functions - Add
original_integer64_value
function to retrieveInteger64
value fromRadiusAttribute
timestamp_to_bytes
function foru64
is substituted withu32
(see section below)- Remove validation in
verify_original_value
forByteString
&Concat
because it is not really possible to validate those values once received
- Closes #17
- Fix for
timestamp_to_bytes
function - it was incorrectly expectingu64
while RADIUS expects timestamps to beu32
verify_original_value
function now handles verify forInteger64
&InterfaceId
data typesoriginal_string_value
function now handles retrieval of string value forIPv4Prefix
&InterfaceId
data types- Functions to encode to/decode from
IPv4
bytes now also handle values with prefix/subnet - Functions to encode to/decode from
IPv6
bytes now also handle values with prefix/subnet - Not related to RADIUS implementation - Github Action CI/CD add support for newer Rust versions and drop support for older versions (because unfortunately Action fails on those)
=============
This is small release/patch fixing a few bits here & there
- Now all
unwrap()
calls are removed - with exception for agenerate_message_authenticator
inclient.rs
- Now using
md-5
&hmac
libraries instead ofrust-crypto
- Added more tests
client.rs
-->generate_message_authenticator
function is marked as deprecated and would be removed in release 0.5.0rust-crypto
library has been removed from dependencies as it is no longer maintained and Miri was flagging it as unsafe
- Re-work functions to generate Message-Authenticator, so now it should work correctly - previous function was only working if RADIUS packet had Message-Authenticator attribute set to zeros, now it can work with any initial state of the attribute
- Re-work
RadiusError
to return better error messages - Bumped versions of the following dependencies:
rand
,0.7.3
-->0.8.5
thiserror
,1.0.23
-->1.0.32
log
library is moved intodev-dependencies
and bumped to0.4.17
- Added code from PR !24 - ensure dictionary parser not failing when file has tabs as well as whitespaces
=============
Got a couple of PRs & issues raised with some of them introducing breaking changes(read details below), so had to increase minor version to reflect that
- Added a few more tests for encrypt_data() & decrypt_data() (thanks to Istvan91 !2)
- Added salt_encrypt_data() & salt_decrypt_data() functions, which are handling salting (thanks to Istvan91 !3)
- Breaking change - Changed encrypt_data() function signature, so data parameter is now of type &[u8] instead of &str. Was reported in #4 by Istvan91
- Breaking change - RADIUS packet creation now doesn't require Vec. To set attributes for packet, call set_attributes() function. For examples have a look at examples/*_client.rs (Fixes #11)
- Rewrote encrypt_data() a bit to remove unneeded allocations (thanks to Istvan91 !2)
- Rewrote decrypt_data() a bit to remove unneeded allocations (thanks to Istvan91 !2)
=============
I've decided to rewrite previous implementations of RADIUS Client and Server so they are now only have bare minimum in order to allow users to decide on the crates they want to use to get UdpSockets, async and runtimes
- There is now Generic RADIUS Client implementation
- There is now Generic RADIUS Server implementation
- Added SyncClientTrait & AsyncClientTrait
- Added SyncServerTrait & AsyncServerTrait
- Added dependency on
async-trait
crate to allow Async traits - Add a few more rust versions to Actions pipeline (crate compiles on
1.43.0+
for async version, and1.42.0+
for sync version)
mio
dependency is removed, so user can choosemio
's UdpSocket implementation,async-std
UdpSocket or any other- Any actual implementations related to UdpSockets and etc have been removed
- Breaking change - client module now only has Generic RADIUS Client implementation
- Breaking change - server module now only has Generic RADIUS Server implementation
- Breaking change - RadiusMsgType code has been moved from servers module into radius_packet module
- Breaking change - get prefix was removed for all functions where it was used before (C-GETTER Rust convention)
- Breaking change - client & server implementations now require related traits to be implemented. For more information have a look into
examples/
- All RADIUS defined errors now have Error suffix, ie MalformedPacketError
=============
Last minor release before publishing
- Add
log
crate to handle logs (instead ofprintln!
) - Add a few more rust versions to Actions pipeline (crate compiles on
1.45.0+
andnightly
versions)
- Upgrade dependencies so non of them are yanked
=============
First proper release with basic functionality in place, so it could be moved into more production-like environments
- Add GitHub action, so it checks library against stable/nightly Rust on Linux. Unfortunately macOS isn't nicely supported by GitHub Action, however development is done on macOS and all tests pass
- Message-Authenticator HMAC-MD5 hash generation and verification
- Various RADIUS packet verification methods, ie verify that all received RADIUS attributes match those defined in dictionary file (for the full list refer to docs)
- Various helper methods to ensure data is encoded/decoded correctly, ie convert IPv4/6 to bytes and bytes to IPv4/6 (for the full list, look into
tools
module) - User-Password now could be encoded/decoded (it is important one, since RADIUS packets are sent in plaintext by default)
- Add tests to ensure the core functionality is covered and all works as expected
- Add custom error struct (with the help of
thiserror
crate). This way, crate users would only need to handle singleRadiusError
error
- Various code refactoring and cleaning
Dictionary
is now should be passed to Server/Client, instead of&Dictionary
simple_radius_server.rs
example now has better error handling (removed all unwrap calls)
=============
Initial version with limited support - basically a PoC to see, how feasible is to create RADIUS server/client library from scratch. PoC turned out to be a great starting point for a future development