Debian Codegraph @

doc/antora/modules/tutorials/pages/dictionary.adoc

raw
1 = Custom Dictionaries and Attributes
2
3 *Goal:* To understand how the dictionaries affect the server and to create
4 a new vendor-specific dictionary with a number of custom attributes; also, to test those attributes in the server.
5
6 *Time:* 20-30 minutes
7
8 *File:*
9
10 - usr/share/freeradius/dictionary.*
11
12 *`man` page:* dictionary
13
14 The dictionary files used by FreeRADIUS form the basis for mapping protocol
15 numbers to humanly readable text. These dictionary files are ASCII and may be
16 edited to add, delete, or update entries. For this exercise, you will create a
17 custom dictionary and will send the attributes to the server using a RADIUS test
18 client.
19
20 You should first familiarize yourself with the `man` page for the "dictionary"
21 file.
22
23 You should create a file called `dictionary.test` in the appropriate directory
24 and populate it with a "test" vendor, using a vendor ID of 123456. This
25 dictionary file should be referenced from the main dictionary file. You should
26 verify that the server starts successfully with the new dictionary file, even
27 when the new dictionary is empty.
28
29 You should now stop the server and add a number of vendor specific attributes to
30 the "test" dictionary, as follows:
31
32 .Vendor Specific Attributes to add
33 |============================================
34 | Name | Number | Type
35 | Lunch time | 1 | date
36 | People to eat with | 2 | text string
37 | Where to eat | 3 | IP address
38 | What to eat | 4 | integer
39 |============================================
40
41 .Enumerated values for "What to eat" to add
42 |======================
43 | Name | Number
44 | Salad | 1
45 | Bread | 2
46 | Dessert | 3
47 | Beans | 4
48 |======================
49
50 Once the attributes and values are added to the `dictionary.test` file, re-start
51 the server. Using a RADIUS client, send the server an authentication request for
52 user "bob", containing one of each attribute. Verify that the attributes are
53 printed as names, not numbers.
54
55 Edit the file, and update the entry for user "bob" to reply with the
56 attributes and with four names for "people to eat with". Re-send the
57 authentication request for user "bob", and verify that the access accept
58 contains the expected attributes.
59
60 [[dictionary-questions]]
61 == Questions
62
63 1. What happens when the same attribute has multiple names, i.e.,
64 multiple names for one number?
65 2. Why are many of the attributes in other vendor specific dictionaries
66 prefixed with the vendor name?
67 3. Why are vendor specific attributes useful?
68
69 // Copyright (C) 2021 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
70 // This documentation was developed by Network RADIUS SAS.