File: README

package info (click to toggle)
openser 1.1.0-9etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,828 kB
  • ctags: 11,809
  • sloc: ansic: 120,528; sh: 5,249; yacc: 1,716; makefile: 1,261; php: 656; perl: 205; sql: 190
file content (261 lines) | stat: -rw-r--r-- 7,608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

AUTH_DIAMETER Module

Elena-Ramona Modroiu

   voice-system.ro

Edited by

Elena-Ramona Modroiu

   Copyright  2003, 2004 FhG FOKUS
     _________________________________________________________

   Table of Contents
   1. User's Guide

        1.1. Overview
        1.2. Dependencies

              1.2.1. OpenSER Modules
              1.2.2. External Libraries or Applications

        1.3. Exported Parameters

              1.3.1. diameter_client_host (string)
              1.3.2. diameter_client_port (int)
              1.3.3. use_domain (int)

        1.4. Exported Functions

              1.4.1. diameter_www_authorize(realm)
              1.4.2. diameter_proxy_authorize(realm)
              1.4.3. diameter_is_user_in(who, group)

        1.5. Installation & Running

   2. Developer's Guide
   3. Frequently Asked Questions

   List of Examples
   1-1. Digest Authentication
   1-2. Set diameter_client_host parameter
   1-3. Set diameter_client_port parameter
   1-4. Set use_domain parameter
   1-5. diameter_www_authorize usage
   1-6. diameter_proxy_authorize usage
   1-7. diameter_is_user_in usage
     _________________________________________________________

Chapter 1. User's Guide

1.1. Overview

   This module implements SIP authentication and authorization
   with DIAMETER server, namely DIameter Server Client (DISC).

   The digest authentication mechanism is presented in next
   figure.

   Example 1-1. Digest Authentication
...
        a) First phase of Digest Authentication for SIP:


     +----+ SIP INVITE   +=====+  DIAMETER      +------+       +------+
     |    | no Auth hdr  #/////#  AA-Request    |      |       |      |
     |    |---------1--->#/////#-------2------->|      |---2-->|      |
     |UAC |              #UAS//#                |DClnt |       |DSrv  |
     |    |<-----4-------#(SER)#<------3--------|(DISC)|<--3---|(DISC)|
     |    |     401      #/////#  DIAMETER      |      |       |      |
     +----+ Unauthorized +=====+  AA-Answer     +------+       +------+
                                  Result-Code=4001


        b) Second phase of Digest Authentication for SIP:


     +----+ SIP INVITE   +=====+  DIAMETER     +------+       +----+
     |    | Auth hdr     #/////#  AA-Request   |      |       |    |
     |    |--------1---->#/////#-------2------>|      |---2-->|    |
     |UAC |              #UAS//#               |DClnt |       |DSrv|
     |    |<-------4-----#(SER)#<------3-------|      |<--3---|    |
     |    |      200 OK  #/////#  DIAMETER     |      |       |    |
     +----+              +=====+  AA-Answer    +------+       +----+
                                  Result-Code=2001

...
     _________________________________________________________

1.2. Dependencies

1.2.1. OpenSER Modules

   The following modules must be loaded before this module:

     * sl - used to send stateless replies.
     _________________________________________________________

1.2.2. External Libraries or Applications

   The following libraries or applications must be installed
   before running OpenSER with this module loaded:

     * None.
     _________________________________________________________

1.3. Exported Parameters

1.3.1. diameter_client_host (string)

   Hostname of the machine where the DIAMETER Client is running.

   Default value is "localhost". 

   Example 1-2. Set diameter_client_host parameter
...
modparam("auth_diameter", "diameter_client_host", "10.10.10.10")
...
     _________________________________________________________

1.3.2. diameter_client_port (int)

   Port number where the DIAMETER Client is listening.

   Default value is "3000". 

   Example 1-3. Set diameter_client_port parameter
...
modparam("auth_diameter", "diameter_client_port", 3000)
...
     _________________________________________________________

1.3.3. use_domain (int)

   Specifies whether the domain name part of URI is used when
   checking the user's privileges.

   Default value is "0 (0==false and 1==true )". 

   Example 1-4. Set use_domain parameter
...
modparam("auth_diameter", "use_domain", 1)
...
     _________________________________________________________

1.4. Exported Functions

1.4.1. diameter_www_authorize(realm)

   SIP Server checks for authorization having a DIAMETER server
   in backend. If no credentials are provided inside the SIP
   request then a challenge is sent back to UAC. If the
   credentials don't match the ones computed by DISC then "403
   Forbidden" is sent back.

   Meaning of the parameters is as follows:

     * realm - the realm to be use for authentication and
       authorization. The string may contain pseudo variables.

   This function can be used from REQUEST_ROUTE.

   Example 1-5. diameter_www_authorize usage
...
if(!diameter_www_authorize("siphub.net"))
{ /* user is not authorized */
        break;
};
...
     _________________________________________________________

1.4.2. diameter_proxy_authorize(realm)

   SIP Proxy checks for authorization having a DIAMETER server in
   backend. If no credentials are provided inside the SIP request
   then a challenge is sent back to UAC. If the credentials don't
   match the ones computed by DISC then "403 Forbidden" is sent
   back.

   Meaning of the parameters is as follows:

     * realm - the realm to be use for authentication and
       authorization. The string may contain pseudo variables.

   This function can be used from REQUEST_ROUTE.

   Example 1-6. diameter_proxy_authorize usage
...
if(!diameter_proxy_authorize("siphub.net"))
{ /* user is not authorized */
        break;
};
...
     _________________________________________________________

1.4.3. diameter_is_user_in(who, group)

   The method performs group membership checking with DISC.

   Meaning of the parameters is as follows:

     * who - what header to be used to get the SIP URI that is
       wanted to be checked being member in a certain group. It
       can be: "Request-URI", "From", "To" or "Credentials".
     * group - the group name where to check if the user is part
       of.

   This function can be used from REQUEST_ROUTE.

   Example 1-7. diameter_is_user_in usage
...
if(!diameter_is_user_in("From", "voicemail"))
{ /* user is not authorized */
        break;
};
...
     _________________________________________________________

1.5. Installation & Running

   Notes about installation and running.
     _________________________________________________________

Chapter 2. Developer's Guide

   The module does not provide any API to use in other OpenSER
   modules.
     _________________________________________________________

Chapter 3. Frequently Asked Questions

   3.1. Where can I find more about OpenSER?
   3.2. Where can I post a question about this module?
   3.3. How can I report a bug?

   3.1. Where can I find more about OpenSER?

   Take a look at http://openser.org/.

   3.2. Where can I post a question about this module?

   First at all check if your question was already answered on
   one of our mailing lists:

     * User Mailing List -
       http://openser.org/cgi-bin/mailman/listinfo/users
     * Developer Mailing List -
       http://openser.org/cgi-bin/mailman/listinfo/devel

   E-mails regarding any stable OpenSER release should be sent to
   <users@openser.org> and e-mails regarding development versions
   should be sent to <devel@openser.org>.

   If you want to keep the mail private, send it to
   <team@openser.org>.

   3.3. How can I report a bug?

   Please follow the guidelines provided at:
   http://sourceforge.net/tracker/?group_id=139143.