Open arcesino opened 4 years ago
Hmm, if the server you are talking to doesn't support the 'Message-Authenticator' why are you calling verify_response?
I don't think we should change verify_response to call packets without the authenticator present to be ok. Otherwise a MITM could simply strip that attribute and modify the packet.
Sorry, I miss read the rfc. It says 'Message-Authenticator' is optional for the clients to send which I misread and thought that it was optional for the servers.
Disregard my previous comment.
Can you provide a pcap file with an actual request 'Status-Server' request and response?
Attaching pcap file generated with Wireshark with a single Status-Server
request to FreeRADIUS. The secret used for the packets is default adminsecret
in case you also need it. Let me know if you need additional info
If using wireshark to open the pcap file, you can decode the packets as RADIUS and they will show the packet contents in human-readable format
Hello guys. I'm trying to use this library to perform
Status-Server
requests to a FreeRADIUS server v3.0.19 following the spec and examples in official RFC (section 6.): https://freeradius.org/rfc/rfc5997.htmlThis is how my packet looks:
The packet is accepted and successfully processed by FreeRADIUS as shown in the server logs:
but when I call
radius.verify_response
the function returnsfalse
given that it's expecting aMessage-Authenticator
attribute in the response packet: https://github.com/retailnext/node-radius/blob/master/lib/radius.js#L426Looking at the FreeRADIUS RFC, I see that request packets must provide a
Message-Authenticator
attribute but response packets does not have this attribute. Response packets are still verified by looking at byte range 4:20 of the encoded packet, which is what's done in methodradius.verify_response
, but I think that the call tothis._ verify_response_message_authenticator
at the end of the method should be omitted forStatus-Server
packets.I see that the library has some support for
Status-Server
since it's mentioned in the README that aMessage-Authenticator
is automatically added forStatus-Server
packets but couldn't find any examples of this type of request to think this could be an error with my FreeRADIUS server installation.I'll open a PR with a potential fix.
Thanks!