lirantal / daloradius

daloRADIUS is an advanced RADIUS web management application for managing hotspots and general-purpose ISP deployments. It features user management, graphical reporting, accounting, a billing engine, and integrates with OpenStreetMap for geolocation. The system is based on FreeRADIUS with which it shares access to the backend database.
http://www.daloradius.com
GNU General Public License v2.0
662 stars 339 forks source link

No attributes found for dictionary.rfc3580 #401

Open dleventidis opened 1 year ago

dleventidis commented 1 year ago

Hello,

while trying to create a New Profile and choosing "Select attributes from dictionary" i'm getting an error "No attributes found for dictionary.rfc3580" as you can see in the attached screenshot

dalo1

dleventidis commented 1 year ago

This issue still remains on the #409

filippolauria commented 1 year ago

Have you loaded that dictionary in the db?

dleventidis commented 1 year ago

Yes i can see it inside the table

Sent from my iPhone

On 9 Mar 2023, at 6:23 PM, Filippo @.***> wrote:

 Have you loaded that dictionary in the db?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

momothefox commented 1 year ago

Hi @dleventidis

this dictionary contains values only

# -*- text -*-
# Copyright (C) 2019 The FreeRADIUS Server project and contributors
# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0
#
#   Attributes and values defined in RFC 3580.
#   http://www.ietf.org/rfc/rfc3580.txt
#
#   $Id: 234076858412d1fdf138189ee799d5c88d779d42 $
#
VALUE   Acct-Terminate-Cause        Supplicant-Restart  19
VALUE   Acct-Terminate-Cause        Reauthentication-Failure 20
VALUE   Acct-Terminate-Cause        Port-Reinit     21
VALUE   Acct-Terminate-Cause        Port-Disabled       22

VALUE   NAS-Port-Type           Token-Ring      20
VALUE   NAS-Port-Type           FDDI            21

VALUE   Tunnel-Type         VLAN            13

So, this attribute Acct-Terminate-Cause can be found 23 times in database

bandicam 2023-03-10 00-06-15-781

if you notice check out 1st few lines. the type and recommended op are updated after i selected the dictionary from list and manually typed in the attribute name Acct-Terminate-Cause

bandicam 2023-03-10 00-00-44-311

So, i went to a profile and started editing it went to Attribute tab and selected rfc3580 No Attribute found

bandicam 2023-03-10 00-01-44-802

Now try it manually by typing out the attribute it says Warning. Attribute non-existent or inconsistency in your vendor/attribute dictionary

bandicam 2023-03-10 00-02-17-559

If there is a way to import new updated dictionaries from freeradius shared dictionary folder to daloradius would be great

in config file $configValues['CONFIG_PATH_RADIUS_DICT'] = '/usr/share/freeradius'; but i cannot see why this option is there

by the way it is the same for 1.3 and 2.0b i don't think it is related to UI it is related to dictionary table data

so i updated the Acct-Terminate-Cause in dictionary rfc.2866 too and boom it worked ,

bandicam 2023-03-10 00-23-21-448

Dictionary table needs update.

dleventidis commented 1 year ago

Even though your workaround works the issue still remains. In the Profiles/Edit Profile/Attributes screen when you choose Select attributes from dictionary on the selector box (Attribute Specification Method) and then choose dictionary.rfc3580 from the Vendor then you get the popup "No attributes found for dictionary.rfc3580.

filippolauria commented 1 year ago

I have investigated a little bit more on this issue.

The list function shows you vendors which have a type (i.e. type is not NULL nor empty). Attributes that have multiple values have no type.

So, I think that this is related to how daloRADIUS dictionary table has been originally implemented. In my opinion, to solve this issue the db schema should be reworked and a new table (i.e. attribute_values or something like that) should be inserted to form a 1 to N relationship (1 attribute, N possible values).