inverse-inc / packetfence

PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful BYOD management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.
https://packetfence.org
GNU General Public License v2.0
1.32k stars 280 forks source link

tests: radius_request => %!\(MISSING) instead of = #7774

Closed JeGoi closed 1 year ago

JeGoi commented 1 year ago

Describe the problem

"radius_request":"Acct-Session-Id %!\(MISSING)"EBE8F523ACD84983\",\nCalled-Station-Id %!\(MISSING)"44-38-39-00-00-17:\",\nCalling-Station-Id %!\(MISSING)"00:03:00:11:13:01\",\nEAP-Message %!\(MISSING)"0x026f00061a03\",\nEAP-Type %!\(MISSING)"MSCHAPv2\",\nEvent-Timestamp %!\(MISSING)"Jul 20 2023 19:15:52 UTC\",\nFramed-MTU %!\(MISSING)"1400\",\nFreeRADIUS-Proxied-To %!\(MISSING)"127.0.0.1\",\nNAS-IP-Address %!\(MISSING)"172.18.200.201\",\nNAS-Identifier %!\(MISSING)"localhost\",\nNAS-Port %!\(MISSING)"13\",\nNAS-Port-Id %!\(MISSING)"swp17\",\nNAS-Port-Type %!\(MISSING)"Ethernet\",\nPacketFence-Domain %!\(MISSING)"LeMApXP\",\nPacketFence-KeyBalanced %!\(MISSING)"06d7ee3ef753e8b8eb2b5e393aa9db75\",\nPacketFence-NTLMv2-Only = "\",\nPacketFence-Outer-User %!\(MISSING)"packetfence\",\nPacketFence-Radius-Ip %!\(MISSING)"172.18.200.10\",\nRealm %!\(MISSING)"null\",\nService-Type %!\(MISSING)"Framed-User\",\nState %!\(MISSING)"0x2bbc4bfe2ad3513be67b087bca281518\",\nStripped-User-Name %!\(MISSING)"packetfence\",\nUser-Name %!\(MISSING)"packetfence\",\nUser-Password %!\(MISSING)"******\"","radius_reply":"EAP-Message %!\(MISSING)"0x036f0004\",\nMessage-Authenticator %!\(MISSING)"0x00000000000000000000000000000000\",\nREST-HTTP-Status-Code %!\(MISSING)"200\",\nTunnel-Medium-Type %!\(MISSING)"IEEE-802\",\nTunnel-Private-Group-Id %!\(MISSING)"100\",\nTunnel-Type %!\(MISSING)"VLAN\",\nUser-Name %!\(MISSING)"packetfence\"","radius_ip":"172.18.200.10"

Mandatory informations

Symptoms How the problem can be identified if it appears again ? Rerun the script

JeGoi commented 1 year ago
id      created_at      mac     ip      computer_name   user_name       stripped_user_name      realm   event_type      switch_id       switch_mac      switch_ip_address       radius_source_ip_address
called_station_id       calling_station_id      nas_port_type   ssid    nas_port_id     ifindex nas_port        connection_type nas_ip_address  nas_identifier  auth_status     reason  auth_type       eap
_type   role    node_status     profile source  auto_reg        is_phone        pf_domain       uuid    radius_request  radius_reply    request_time    radius_ip
1       2023-07-21 01:48:21     00:03:00:11:11:01       N/A     N/A     000300111101    000300111101    null    Radius-Access-Request   44:38:39:00:00:12       44:38:39:00:00:12       172.18.120.201  N/A
        44-38-39-00-00-12:      00:03:00:11:11:01       Ethernet                swp12   8       8       Ethernet-NoEAP  172.18.120.201  localhost       Accept          Accept          headless_device reg
        catch_wired_mac_authentication  N/A     0                               Acct-Session-Id = "FD64D8F24D789AE5",\nCalled-Station-Id = "44-38-39-00-00-12:",\nCalling-Station-Id = "00:03:00:11:11:01",
\nEvent-Timestamp = "Jul 21 2023 01:48:09 UTC",\nFramed-MTU = "1400",\nFreeRADIUS-Client-IP-Address = "172.18.120.201",\nMessage-Authenticator = "0x9f58af697b7bcf16629c57b564c7bc81",\nNAS-IP-Address = "1
72.18.120.201",\nNAS-Identifier = "localhost",\nNAS-Port = "8",\nNAS-Port-Id = "swp12",\nNAS-Port-Type = "Ethernet",\nPacketFence-KeyBalanced = "d0765eaba49810c0c2578385bc6272b2",\nPacketFence-Radius-Ip
= "172.18.120.15",\nRealm = "null",\nService-Type = "Call-Check",\nStripped-User-Name = "000300111101",\nUser-Name = "000300111101",\nUser-Password = "******"  REST-HTTP-Status-Code = "200",\nTunnel-Medi
um-Type = "IEEE-802",\nTunnel-Private-Group-Id = "100",\nTunnel-Type = "VLAN"   0       172.18.120.15

Looks fine in the db.

abprasa commented 1 year ago

Also noticed that on the Web UI, the radius files are empty (as seen in the screenshot) Git Commit ID: 738349976ae76f04720c6e24a30561080faf03aa

root@pfv13-abhi:/usr/local/pf# apt-cache madison packetfence
packetfence | 13.0.0+20230720171010+939623635+0011+devel+bullseye1 | http://inverse.ca/downloads/PacketFence/debian/13.0 bullseye/bullseye amd64 Packages
root@pfv13-abhi:/usr/local/pf#

Pic1:: Screenshot 2023-07-21 at 8 38 33 PM

Pic2:: Screenshot 2023-07-21 at 8 38 21 PM

stgmsa commented 1 year ago

Check with @jrouzierinverse and @JeGoi It's due to an urldecode we applied at the API call. We'll do the encoding on piping the logs into redis / mariadb as what we did before to keep maximum capability.

jrouzierinverse commented 1 year ago

fixed by c93b80c7cc9843ff86e2f6dedb14f0e68eb7fefe