Skip to content

net/freeradius: restore EAP-TTLS-GTC support and fix EAP-GTC against directories that do not expose passwords (#2421) - #5692

Open
clanto007 wants to merge 3 commits into
opnsense:masterfrom
clanto007:freeradius-ttls-inner-eap-type
Open

net/freeradius: restore EAP-TTLS-GTC support and fix EAP-GTC against directories that do not expose passwords (#2421)#5692
clanto007 wants to merge 3 commits into
opnsense:masterfrom
clanto007:freeradius-ttls-inner-eap-type

Conversation

@clanto007

Copy link
Copy Markdown
Contributor

Important notices


Describe the problem

Two separate problems, both preventing EAP-TTLS-GTC from working.

  1. The EAP method used inside the EAP-TTLS tunnel is hardcoded to md5, so GTC cannot be selected. Support was added in 1.9.9 as a ttls-gtc value of the outer default_eap_type, which is not a valid EAP method: radiusd refused to start with No dictionary definition for default EAP method 'ttls-gtc' ([Freeradius] Support for EAP-TTLS-GTC is broken #2421). 1.9.20 removed the option from the model instead of correcting the implementation, leaving the template branch that tests for ttls-gtc permanently unreachable and the inner method fixed at md5.

  2. Even with GTC available, authentication fails against any directory that does not reveal password material. rlm_eap_gtc puts the password in the request and calls the Auth-Type section directly, without re-running authorize; that section ran pap unconditionally, and rlm_pap needs a known good password in the control list. With Google Workspace Secure LDAP, which only supports bind-based authentication, every request ends in EAP sub-module failed.


Describe the proposed solution

Three commits.

  1. Add a default_eap_ttls_type field holding a real EAP method and use it inside the ttls block, replacing the dead branch. Non-EAP inner methods such as PAP and MSCHAPv2 are handled by the inner-tunnel virtual server and are deliberately absent from the option list, since a non-EAP value makes radiusd fail to start — this is what went wrong in 1.9.9. The field defaults to md5, so existing configurations render byte-identical output and no model migration is needed, and it is hidden in the GUI unless TTLS is the selected outer type.

  2. In the inner tunnel, bind against LDAP when no password is available, keeping pap whenever Cleartext-Password, Password-With-Header or NT-Password is present. Local users therefore keep the existing code path and LDAP users gain a working one, so both backends can be used at the same time. Guarded by the existing "LDAP in inner-tunnel" setting, so installations without it are untouched.

  3. Version bump and changelog.

Tested on a live instance: EAP-TTLS-GTC from a real access point against Google Workspace Secure LDAP, Login OK ... via TLS tunnel, and local users accepted from the same configuration.


Related issue

#2421

…urable (opnsense#2421)

The inner EAP method was hardcoded to md5, so EAP-TTLS-GTC could not be
used. Support was added in 1.9.9 as a "ttls-gtc" value of the outer
default_eap_type, which radiusd rejected with "No dictionary definition
for default EAP method 'ttls-gtc'"; 1.9.20 removed the option again and
left the template branch testing for it unreachable.

Add a separate default_eap_ttls_type field holding a real EAP method and
use it inside the ttls block, replacing the dead branch. Non-EAP inner
methods such as PAP are handled by the inner-tunnel virtual server and
are deliberately absent from the option list, as radiusd fails to start
on a non-EAP value. The field defaults to md5, keeping existing
configurations unchanged, and is hidden unless TTLS is the outer type.
…expose passwords

rlm_eap_gtc places the password in the request and calls the Auth-Type
section directly, without re-running authorize. The section ran pap
unconditionally, which needs a known good password in the control list.
Directories that never reveal one, such as Google Workspace Secure LDAP,
therefore always failed with "EAP sub-module failed".

Bind against LDAP instead when no password is available, keeping pap for
the local users file so both backends can be used at the same time. The
change only applies when LDAP is enabled in the inner tunnel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant