75 Commits

Author SHA1 Message Date
ionutboangiu
fe4d8b5924 radagent: check CHAP-Challenge AVP for CHAP auth
CHAP authentication was always using the Request Authenticator as
challenge, ignoring CHAP-Challenge AVP when present. Per RFC 2865, the
CHAP-Challenge attribute takes precedence if included in the packet.

Ref: #4963
2026-01-09 12:10:35 +01:00
ionutboangiu
d73e9c0803 radagent: use MS-CHAP2-Response for MSCHAPv2
MSCHAPv2 authentication was looking for the wrong RADIUS attribute. Per
RFC 2548, MSCHAPv2 uses MS-CHAP2-Response (vendor-type 25), not
MS-CHAP-Response (vendor-type 1, which is for v1).

Ref: #4962
2026-01-09 12:09:53 +01:00
ionutboangiu
8443af3a89 Relicense from GPLv3 to AGPLv3 2025-10-29 19:42:40 +01:00
ionutboangiu
9991b29cae Implement DisconnectSession API for RADIUS Agent
Updated radigo library to latest version.

Updated RadiusAgent to satisfy the birpc client interface.

Added *radDAdiscMsg OrderedNavigableMap type field within AgentRequest.
This one is similar to *diamreq, as it is used for building RADIUS
server-initiated Disconnect Requests.

radReplyAppendAttributes: refactored to reflect that it can now be
used to also append attributes to request packets, not only reply.

Added bidirectional support for session related RadiusAgent methods.

For Dynamic Authorization to be possible, a new field was added within RadiusAgent
that holds dicts and secrets only for the clients that support it. They are used
to create the DA Client sending Disconnect Requests.

Added a new cache partition to store Access-Request packets with the purpose
of using them to build the Disconnect Requests. They are identified by sessionID.
It defaults to the value of 'Acct-Session-id'.

Added a predefined '*dmr' template as well as a 'dmr_template' config option within
the 'radius_agent' config section. This will map to a custom or to the predefined
template and will be used to build the Disconnect Request. By default, it doesn't
point to any template (this also means that the Access-Request packets will not be
cached).

Another option added to 'radius_agent' is 'client_da_addresses', which lists the
RADIUS clients supporting Dynamic Authorization. The key represents the host of
the client, while the value represents the address to which we will send the
Disconnect Request.

Added integration test.
2024-02-07 18:28:17 +01:00
arberkatellari
4a812a294b Correct addition of vendor at radReplyAppendAttributes & IT test for it 2023-10-05 17:24:08 +02:00
ionutboangiu
6c16ff320f Replace interface{} with any 2023-05-31 10:23:12 +02:00
ionutboangiu
7771de5e07 Apply go fmt project wide 2022-11-11 13:43:51 +01:00
Trial97
ec539b5994 Updated DNSAgent 2021-10-04 11:30:13 +02:00
Trial97
faf1fba125 Refactored EventRequest 2021-07-06 20:52:40 +02:00
Trial97
c13a5cf790 Finished implementing the DataNode as a replacement 2021-03-26 13:46:25 +01:00
Trial97
ba090352ec Updated agents tests 2021-03-26 13:46:25 +01:00
Trial97
aecafbc290 Updated the code with the new Flags format 2020-07-20 12:58:41 +02:00
Trial97
f10f570a27 Removed config.NavigableMap 2020-05-18 13:26:06 +02:00
Trial97
86ff489008 Updated agents 2020-05-07 11:17:41 +02:00
Trial97
441ffdcd2e Updated integration tests 2020-05-07 11:17:41 +02:00
Trial97
13e813f848 Fixed agents unit tests 2020-05-07 11:17:41 +02:00
Trial97
763710fb80 Updated AgentRequest 2020-05-07 11:17:41 +02:00
TeoV
83a41eb191 Add integration tests for Auth and Challange with Radius 2020-03-25 17:45:44 +01:00
TeoV
d8f50310c8 Update server with mschapv2 auth 2020-03-25 17:45:44 +01:00
TeoV
77f0e69ffe Update config template and beautify the code 2020-03-25 17:45:44 +01:00
TeoV
d218868777 Implement PAP and CHAP auth + tests 2020-03-25 17:45:44 +01:00
TeoV
45ff034a48 Implement logic from diameter template in Radius Agent 2020-03-25 17:45:44 +01:00
TeoV
30f8207bf9 Add PAP example for Radius 2020-03-25 17:45:44 +01:00
adragusin
4c323e8839 Fixed one test in config 2020-03-18 09:48:53 +01:00
adragusin
4f04b0c8c9 Changed the strip strategy (e.g. "right" to "*right") 2020-03-12 17:24:56 +01:00
TeoV
aa6d5a5450 Update integration test for RadiuAgent 2020-02-05 15:57:58 +01:00
Trial97
ab3fb01e7d Starting adding absolute path to cdre 2020-01-30 10:21:48 +01:00
Tripon Alexandru-Ionut
5af9e7385f Updated IfaceAsString and MapEvent tests 2019-06-21 15:35:01 +02:00
DanB
134ffc7a0a AgentRequest.setCGRReply implementation, DNSAgent with one supplier 2019-06-06 14:32:59 +02:00
TeoV
5674a18c6b Update RemoteHost to return only ip and add tests 2018-12-20 19:51:58 +01:00
TeoV
d0d09240da Replace in agents utils.ToJSON with utils.ToIJSON 2018-12-17 11:35:59 +01:00
TeoV
7997e42be5 Add support for *remote_host in AgentRequest 2018-12-10 09:40:06 +01:00
TeoV
f2436288f6 Update glide.lock with correct version of mongo for encoding time.Time 2018-11-28 17:13:27 +01:00
TeoV
a11c96c6fa Simplify the code for newRadAgent 2018-11-25 17:42:42 +01:00
TeoV
b60673794e Add log action for radius and http agent 2018-11-18 11:54:09 +01:00
DanB
4d94021a1d NavigableMap.Set with append for []*NMItem 2018-11-14 19:34:13 +01:00
DanB
96960f28ee AgentRequest constructor updated 2018-10-05 14:04:29 +02:00
DanB
56ada587d2 Completing Diameter DryRun integration test 2018-10-03 19:43:35 +02:00
Trial97
1741cca805 Replace CastFieldIfToString with IfaceAsString 2018-10-02 11:35:37 +02:00
DanB
6799214941 Diameter method diamAVPAsIface converting go diameter avp value into interface understood internally 2018-09-20 15:31:21 +02:00
TeoV
1299065a58 XML use . as separator 2018-09-13 17:19:33 +02:00
TeoV
6e93a9489c Replace ID with Tag for FCTemplate 2018-09-10 16:31:16 +02:00
TeoV
3fd9ed1886 Update HttpAgent + RadAgent config 2018-08-30 11:40:06 +02:00
TeoV
6d1a3f07fd Move DataProvider,NavigableMap,RsrParser into config package 2018-08-30 11:40:06 +02:00
TeoV
a386f98990 Update Radius 2018-07-19 17:55:45 +02:00
TeoV
ebaf5791b3 Update config for Radius 2018-07-19 17:55:45 +02:00
DanB
40c7699ee4 NavigableMap should not analyze values internally to keep flexibility and speed 2018-07-03 17:01:38 +02:00
DanB
44dedd7875 NMItem with support for Config attached, NavigableMap.Set with NMItem 2018-06-29 19:41:58 +02:00
DanB
28411f4825 SessionSv1 argumets ProcessStatQueues->ProcessStats, boolPointer->bool, NavigableMap.Add->NavigableMap.Set, flags based methods in HTTPAgent 2018-06-19 17:32:37 +02:00
DanB
73552ef89c NavigableMap with ordered items 2018-06-13 18:34:46 +02:00