Hello,
we are currently implementing PacketFence 14.1.0 to manage Wi-Fi access for
guest users through 802.1X authentication.
Our environment and use case are as follows:
* PacketFence 14.1.0
* Huawei AC6805 wireless controller
* dedicated guest SSID
* 802.1X/EAP authentication
* users created locally in PacketFence
* "Authenticate against local users database" enabled
* local users are created with a validity window defined by the valid_from
and expiration fields
Our goal is to allow designated staff members to create temporary accounts for
visitors. Once the date/time specified in the expiration field has been
reached, we expect any new 802.1X authentication attempt using that account to
be rejected.
However, we found that a local user is still successfully authenticated even
after the account has expired.
For example, for our test user test1, we verified the following values directly
in the PacketFence database:
pid = test1
valid_from = 2026-09-24 00:00:00
expiration = 2026-09-25 18:35:00
access_duration = 1h
Although the expiration date had already passed, on September 28, 2026, new
802.1X authentication attempts were still successful.
The RADIUS logs showed, for example:
Login OK: [test1] (... via TLS tunnel)
Login OK: [test1] (...)
This also allowed us to rule out the wireless controller as the cause of the
issue, since PacketFence/FreeRADIUS itself was successfully accepting the
expired user's credentials.
We therefore investigated the FreeRADIUS configuration used to authenticate
PacketFence local users.
In the following block:
sql pflocal {
we found this authorize_check_query:
authorize_check_query = "\
SELECT 1, pid, ( \
CASE \
WHEN SUBSTR(password, 1, LENGTH('{ntlm}') ) = '{ntlm}' THEN
'NT-Password' \
ELSE 'Cleartext-Password' \
END ) AS passwordhash, \
REPLACE(password,'{ntlm}',''), \":=\" \
FROM ${authcheck_table} \
WHERE pid = '%{SQL-User-Name}' \
AND NOT EXISTS (SELECT pid FROM activation WHERE pid = '%{SQL-User-Name}')"
>From our analysis, this query checks whether the user exists and retrieves the
>corresponding password, but it does not appear to check the following fields
>from the password table:
valid_from
expiration
As a temporary workaround, we modified:
/usr/local/pf/conf/radiusd/sql.conf
and added the following conditions to the authorize_check_query in the sql
pflocal block only:
AND NOW() >= valid_from \
AND NOW() <= expiration \
The resulting portion of the query is therefore:
WHERE pid = '%{SQL-User-Name}' \
AND NOW() >= valid_from \
AND NOW() <= expiration \
AND NOT EXISTS (SELECT pid FROM activation WHERE pid = '%{SQL-User-Name}')"
After regenerating the RADIUS configuration and restarting the RADIUS service,
we confirmed that the same conditions were also present in the runtime
configuration:
/usr/local/pf/raddb/mods-enabled/sql
With this workaround in place, the behavior is now consistent with our
expectations: local users can authenticate only during the time window between
valid_from and expiration, while new authentication attempts outside that
window are rejected.
We would therefore like to ask whether the absence of valid_from and expiration
checks in the sql pflocal authorize_check_query in PacketFence 14.1.0 is
intentional or whether this should be considered an issue.
If this behavior is not intentional, would it be possible to provide an
official fix or patch so that we do not have to maintain a local modification
to sql.conf?
For our use case, the expected behavior would be:
Current time < valid_from
-> Access-Reject
valid_from <= Current time <= expiration
-> normal password validation / Access-Accept
Current time > expiration
-> Access-Reject
At this stage, our report specifically concerns new 802.1X authentication
attempts performed after the local user account has expired.
We understand that terminating an already active Wi-Fi session exactly when the
expiration time is reached is a separate matter, potentially involving
Session-Timeout, RADIUS Disconnect/CoA, or similar mechanisms. That behavior is
therefore not the main subject of this ticket.
If required, we can provide additional RADIUS logs, configuration excerpts, and
database information to help reproduce the issue.
Thank you for your support.
Best regards,
Giacinto Caretto
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
Giacinto Caretto.
TERIN-ICT-RETE
[email protected]<mailto:[email protected]>
ENEATEL 91 206.
Uff. 0831201 206-234
FAX. 0831201 207
Mob. +393283904483
ENEA - CR Brindisi
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
________________________________
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone
indicate e la casella di posta elettronica da cui ? stata inviata ? da
qualificarsi quale strumento aziendale.
La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di
queste informazioni sono rigorosamente vietate (art. 616 c.p, D.Lgs. n.
196/2003 s.m.i. e GDPR Regolamento - UE 2016/679).
Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati
di darne immediata comunicazione al mittente e di provvedere alla sua
distruzione. Grazie.
This e-mail and any attachments is confidential and may contain privileged
information intended for the addressee(s) only.
Dissemination, copying, printing or use by anybody else is unauthorised (art.
616 c.p, D.Lgs. n. 196/2003 and subsequent amendments and GDPR UE 2016/679).
If you are not the intended recipient, please delete this message and any
attachments and advise the sender by return e -mail. Thanks.
________________________________
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users