New build path variable
[freeradius.git] / doc / rlm_jradius
1
2                               rlm_jradius 
3
4 JRadius is a Java RADIUS client and server framework. As a client, it
5 provides a pure Java interface. When ran as a (pure Java) server, JRadius
6 listens for requests from the rlm_jradius module running in FreeRADIUS. The
7 module sends JRadius the RADIUS request, reply, and the internal FreeRADIUS
8 'config_items' attribute list and returns the same after processing. 
9
10 Configuring rlm_jradius for use with a running JRadius server starts with
11 the module definition, in jradius.conf, as follows:
12
13   jradius {
14     name             = "example"           # Name of the JRadius Application
15                                            # (known as "Sender" in JRadius)
16     primary          = "127.0.0.1"         # Primary JRadius Server
17                                            # (using default port of 1814)
18     secondary        = "192.168.1.2:1815"  # Secondary JRadius Server (port 1815)
19     tertiary         = "192.168.1.2:1816"  # Tertiary JRadius Server
20     timeout          = 1                   # JRadius Server Connect Timeout (default 5)
21     onfail           = NOOP                # What to do if no JRadius
22                                            # Server is found. Options are:
23                                            # FAIL (default), OK, REJECT, NOOP
24     keepalive        = yes                 # Keep connections to JRadius pooled
25     connections      = 8                   # Number of pooled JRadius connections
26     allow_codechange = yes                 # Allow the changing the RADIUS code/type
27     allow_idchange   = yes                 # Allow the change of the RADIUS pkt id
28   }
29
30 The 'name' can be used in the JRadius server to define a specific logic
31 "chain" of handlers. Three JRadius servers can be defined for redundancy -
32 making it easier to upgrade JRadius and its handlers. It is recommended to
33 run the FreeRADIUS module in 'keepalive' mode whereby connections to JRadius
34 are pool, similar to the rlm_sql module. 
35
36 The jradius.conf configuration file then needs to be included into the
37 radiusd.conf modules block, for instance:
38
39   modules {
40     ...
41
42     $INCLUDE  ${confdir}/jradius.conf
43   }
44
45 And the 'jradius' module must be added to the appropriate handler blocks,
46 commonly:
47
48   authorize {
49     ...
50
51     jradius
52   }
53
54   preacct {
55     ...
56
57     jradius
58   }
59
60   accounting {
61     ...
62
63     jradius
64   }
65
66   ...and so on...
67
68 JRadius Quick-start:
69
70   Starting JRadius server:
71
72     wget http://jradius.net/dist/jradius-current.zip
73     unzip jradius-current.zip
74     cd jradius
75     sh jradius.sh
76
77   Running the JRadius Simulator:
78
79     sh jRadiusSimulator.sh
80
81   Using RadClient:
82
83     echo "User-Name = test"        > radius.pkt
84     echo "User-Password = test"   >> radius.pkt
85
86     sh radclient.sh localhost testing123 radius.pkt
87
88   To build a new jradius-dictionary.jar for your specific FreeRADIUS
89   dictionary, see the ant's build.xml or maven's dictionary/pom.xml in the
90   source svn.
91
92   JRadius does have some Vendor Specific Attributes; see dictionary.jradius
93   and ensure it is included in your main dictionary file. 
94
95 For more information, see http://jradius.net/