name mode size
..
doc 040000
Makefile 100644 281B
README 100644 7.27kB
auth_diameter.c 100644 6.07kB
auth_diameter.h 100644 1.51kB
authorize.c 100644 18.26kB
authorize.h 100644 2.01kB
avp.c 100644 11.63kB
defs.h 100644 1.51kB
diameter_msg.h 100644 10.77kB
message.c 100644 9kB
tcp_comm.c 100644 8.39kB
tcp_comm.h 100644 1.68kB
user_in.c 100644 8.31kB
README
AUTH_DIAMETER Module Elena-Ramona Modroiu FhG FOKUS 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. SER 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. SER 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 SER 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. Example 1-5. diameter_www_authorize usage ... if(!diameter_www_authorize("iptel.org")) { /* 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. Example 1-6. diameter_proxy_authorize usage ... if(!diameter_proxy_authorize("iptel.org")) { /* 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. 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 sort of API to use in other SER modules. _________________________________________________________ Chapter 3. Frequently Asked Questions 3.1. Where can I find more about SER? 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 SER? Take a look at http://iptel.org/ser. 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: * http://mail.iptel.org/mailman/listinfo/serusers * http://mail.iptel.org/mailman/listinfo/serdev E-mails regarding any stable version should be sent to <serusers@iptel.org> and e-mail regarding development versions or CVS snapshots should be send to <serdev@iptel.org>. If you want to keep the mail private, send it to <serhelp@iptel.org>. 3.3. How can I report a bug? Please follow the guidelines provided at: http://iptel.org/ser/bugs