Closed horsitis closed 4 years ago
FreeRadius pull request
2nd FreeRadius pull request
Are the changes in those PRs the only thing that needs to be done ?
seems to be enough... added a dictionary.hp to be included in radius and modified the 2930M Aruba module a little
Now i get the matching user-role defined on the switch
This is the Radius-Accept with the added attribute
2020-06-15 15:08:19.287066 (2) Access-Accept Id 223 ens192:192.168.4.19:1812 <- 192.168.1.89:1812 +0.084 +0.084
Attr-26.11.25 = 0x6775657374
Authenticator-Field = 0x715a1093506145a78aba66083e7548fe
0x6775657374 == guest
You can use the switch template now instead of doing some modifications in the switch module.
Ok, thanks i will try that.
Is adding/modifying the dictionary the correct way to add vendor specific stuff ? @fdurand
And is it normal to be displayed as Attr-26.11.25
instead of the name in the dictionary ?
@erSitzt, if you use PacketFence v10.0.1, you should be able to directly find FreeRADIUS attributes from GUI using Switch Templates menu:
Also since this issue has been opened we created a new switch template for Aruba switches.
Perhaps you can try to edit this switch template and see if you fit your need.
@nqb i tried that, i configured my template that way, but the radius attributes are missing HP-User-Role
As Aruba is HP now, i think Aruba-User-Role
is no longer working for Aruba 2920 / 2930... (not tested)
Where does the UI get the radius attribute available in the dropdown ? It does not use the dictionary i added it seems.
My old install is still pf 5.1 so i have to get up to speed with all the changes ( nice work btw :) )
Where does the UI get the radius attribute available in the dropdown ? It does not use the dictionary i added it seems.
You need to edit FreeRADIUS dictionnary then you need to run ./addons/dev-helpers/bin/generator-radius-attributes.sh
to generate this dictionnary in Perl (used by PacketFence API)sh
Thanks I will try that
I guess a full "dev" setup is needed then ?
And to get back to the topic of this issue, what needs to be done to add support for the current Aruba/HP dictionary ? Do you add it as an extra file in raddb or are the attributes added somewhere in a master file ?
I guess a full "dev" setup is needed then ?
Normally, you can run following command on a PF server:
# install golang environment
make -C /usr/local/pf/go go-env
# get golang dependencies
go get github.com/inverse-inc/go-radius/dictionary
# generate RADIUS attributes
/usr/local/pf/addons/dev-helpers/bin/generator-radius-attributes.sh
And to get back to the topic of this issue, what needs to be done to add support for the current Aruba/HP dictionary ?
What is your exact issue ?
Do you add it as an extra file in raddb or are the attributes added somewhere in a master file ?
It seems that all dictionnary files under /usr/share/freeradius
will be read by the generator-radius-attributes.sh
I'm not sure if the paths and the script will correctly work on Debian.
The attributes posted by @horsitis are not available by default in packetfence and HP-User-Role
should be added, because it's the attribute used by all current HPE Aruba Switches
I'll try setting up the go env
It only reads /usr/local/pf/lib/pf/util/combined_dictionary
which includes /usr/local/pf/raddb/dictionary.inverse
Is there a reason not using /usr/local/pf/raddb/dictionary
which in term has the following include where i added the HP stuff
$INCLUDE /usr/local/pf/raddb/dictionary.inverse
$INCLUDE /usr/local/pf/raddb/dictionary.hp
#ATTRIBUTE My-Local-String 3000 string
#ATTRIBUTE My-Local-IPAddr 3001 ipaddr
#ATTRIBUTE My-Local-Integer 3002 integer
ATTRIBUTE AD-Samaccountname 3003 string
I hope i dont annoy anyone :) I'm just trying to figure out the correct way to support Aruba 2920/2930 Switches as i have lots of them and i want to stay as close to a standard installation of PF as possible ;)
Combined dictionnary should include all FreeRADIUS dictionnary:
What is the content of /usr/local/pf/lib/pf/util/combined_dictionary
on your setup ?
...forget it now i see it... im stupid :)
All default freeradius dictionaries are included, but the freeradius version on debian 9 doesnt seem to include the PR with the updated HP attributes...
sorry
All default freeradius dictionaries are included, but the freeradius version on debian 9 doesnt seem to include the PR with the updated HP attributes...
The 2nd PR mentioned in this issue has been merged but in the latest release of FreeRADIUS (3.0.21) provided with PacketFence 10.1.0, the file doesn't contain this change. It seems to have been replaced by:
ATTRIBUTE HP-CPPM-Role 27 string
HP-CPPM-Role is not a replacement, it is for downloadable user-roles. Roles are then not defined local on the switch, but in ClearPass from where they get downloaded.
Both are supported.
ATTRIBUTE HP-User-Role 25 string
ATTRIBUTE HP-Management-Protocol 26 integer
ATTRIBUTE HP-CPPM-Role 27 string
still there
Yes, 2nd Pull request added: HPE-CPPM-Role
not HP-CPPM-Role
.
Last thing I can tell on this issue is that I'm able to create a switch template using all RADIUS attributes you mentioned in https://github.com/inverse-inc/packetfence/issues/3842#issuecomment-646011075 on v10.1.0 using CentOS 7 (not tested on Debian Stretch).
After
HP-User-Role
to the correct dictionary/usr/local/pf/bin/pfcmd configreload hard
/usr/local/pf/bin/pfcmd service pf restart
I can now select the attribute in the Switch Template UI
I guess this issue can be closed, as it is/was only related to the older version of freeradius on debian ?
Thanks for your feedback @erSitzt.
Yes and as I mentioned, @fdurand bumped FreeRADIUS version to 3.0.21 for 10.1.0 release. So issue has been fixed in v10.1.0.
Description
Add support for Aruba Switches 802.1X authentication. Aruba Switches (eg. 2930F) require user role (string) to be sent with this VSA : Vendor Code : 11 Attribute number : 25 Attribute : HP-User-Role Currently this is not the case when using PacketFence - no user role is sent. Rest of 802.1X for Aruba 2930F Switches works the same as ProCurve ones (ex. "HP ProCurve 2920 Series").
Impacts
Switches