daloradius icon indicating copy to clipboard operation
daloradius copied to clipboard

No attributes found for dictionary.rfc3580

Open dleventidis opened this issue 1 year ago • 6 comments

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 avatar Mar 02 '23 10:03 dleventidis

This issue still remains on the #409

dleventidis avatar Mar 09 '23 07:03 dleventidis

Have you loaded that dictionary in the db?

filippolauria avatar Mar 09 '23 16:03 filippolauria

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.

dleventidis avatar Mar 09 '23 17:03 dleventidis

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.

momothefox avatar Mar 09 '23 22:03 momothefox

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.

dleventidis avatar Mar 10 '23 07:03 dleventidis

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).

filippolauria avatar Mar 10 '23 16:03 filippolauria