Hello,
I removed the modules_k/auth (the one coming from kamailio (openser))
and moved modules_s/auth module to directory 'modules'. All the other
modules depending on previous auth versions were updated to use the one
from 'modules'.
The RPID-related functions from modules_k/auth were moved to
modules_k/siputils - they are not really related to authentication and
pretty independent from the rest of auth.
pv_{www,digest}_authorize() functions were reimplemented in modules/auth
to use the new auth API - since they perform actually user
authentication, same functions are available in cfg also as
pv_{www,digest}_authenticate(). The prototype has been changed so that
password is given as function parameter instead of module parameter.
user parameter is not needed. An extra parameter 'flags' allows to
control the behavior of these functions (see modules/auth/README for more).
Important: the functions from modules_k/auth_db,
{www,proxy}_authorize(), as well as pv_{www,digest}_authorize() require
value for realm. Previously an empty value meant to use To-URI domain
for REGISTER and From-URI domain for the other requests - now you can
give $td or $fd as parameter to achieve the same behavior.
Realm prefix parameter is no longer available -- realm being given as
function parameter with a PV, cfg ops can be used to get the proper value.
Testing and feedback is welcome!
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fb71263…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 22:44:27 2010 +0200
auth_db(k): use fixup_var_str_12() for realm param
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=769c79c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 22:26:14 2010 +0200
auth_db(k): use post_auth() via auth api
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b12e4cb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 22:14:12 2010 +0200
auth(k): module removed
- use modules/auth insted of this one
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=90763a8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 22:10:00 2010 +0200
auth(k) and siputils: moved rpid operations
- rpid operations moved to siputils module
- it is not much relation between authentication and rpid
- auth(k) is to be removed, functionality replaced by modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=779bb37…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 22:08:50 2010 +0200
osp(k): use siputils api for rpid operations
- rpid operations were moved from auth(k) to siputils module
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2583bf4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 21:11:14 2010 +0200
kamailio.cfg: updates due to last auth changes
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9627196…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 21:06:54 2010 +0200
auth: aaa_avps.h removed
- the file was included only by modules_s/auth_db
- its content was sync'ed to modules_s/auth_db/aaa_avps.h
- this file was no longer needed
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=81b384a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 21:05:11 2010 +0200
auth_db(s): updated local aaa_avps.h
- local aaa_avps.h was not used, instead was modules/auth/aaa_avps.h
- aaa_avps.h content is taken from modules/auth/aaa_avps.h and now local
file is used
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fe69840…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:54:24 2010 +0200
osp(s): removed unused auth/api.h
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2b9ff1a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:53:55 2010 +0200
auth_radius(s): updated to use modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a9ca27b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:53:28 2010 +0200
auth_db(s): updated to use modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c9ce805…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:52:59 2010 +0200
auth_radius(k): updated to use modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=034d5d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:52:30 2010 +0200
auth_diameter(k): updated to use modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=51a5d53…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:52:07 2010 +0200
auth_db(k): updated to use modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c39e6a5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 20:26:38 2010 +0200
auth(s): module moved to modules/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=70b087d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 15:58:14 2010 +0200
osp(s): update Makefile for libosptk
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e4ee189…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 15:48:43 2010 +0200
auth_db(k): updated to use auth(s) module
- aliased {www,proxy}_authorize to {www,proxy}_authenticate since they
perform user authentication
- use the API provided by modules_s/auth, improved functionality and
security protection comparing with modules_k/auth
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d78c11…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 15:44:38 2010 +0200
auth(s): documentation updated
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9c2c336…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 14:45:32 2010 +0200
auth(s): added enum for cfg return codes
- useful to detect if user does not exists or password is wrong
- pv_{www,proxy}_authenticate() functions updated to use them
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b3f0a3f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 25 12:47:25 2010 +0200
auth(s): new cfg functions
- pv_www_authenticate(real, passwd, flags)
- pv_proxy_authenticate(real, passwd, flags)
- perform Digest authentication taking password from a parameter
(can be cfg var)
- username is taken from Auth header
- realm and passwd must have values
- $td (To URI domain) can be used for REGISTER
- $fd (From URI domain) can be used for other SIP requests
- flags - bitmask of
- 1 - the content of password param is HA1/HA1b
- 2 - build challenge header (no qop) and add it in an avp
- 4 - build challenge header (qop=auth) and add it in an avp
- 8 - build challenge header (qop=auth-int) and add it in an avp
- when challenge header is built, append_to_reply() and sl reply
functions can be used to send appropriate SIP reply to challenge
for authentication
- www_challenge(realm, flags)
- proxy_challenge(realm, flags)
- send Digest authentication challenge (401 or 407 replies)
- realm must have value
- $td (To URI domain) can be used for REGISTER
- $fd (From URI domain) can be used for other SIP requests
- flags - bitmask of
- 1 - build challenge header (qop=auth) and add it in an avp
- 2 - build challenge header (qop=auth-int) and add it in an avp
- 4 - do not send '500 Internal Server Error' reply
automatically in failure cases (error code is returned to config)
Hello,
I've just removed modules_k/sl module. modules_s/sl was moved to
modules/sl and all the other modules depending on any of sl modules were
updated to use it.
The are some differences, especially looking from K sl point of view:
- statistics - S sl module had a more detailed set of stats per reply
codes (they were available only via RPC). Therefore they were exported
to K stats API instead of importing the K implementation. Now you get
counters for common replies like 100, 400, 401, 403, 500, ... The other
replies which do not mach an exact code are counted in NXX vars (e.g.,
2xx, 3xx, 4xx)
- there is a single API exported by the module, making available several
SL send reply functions, get To-tag and register callbacks -- see
modules/sl/sl.h. The callbacks framework is completely new, using new
api and more compact parameters -- they were used only in siptrace and
nat_traversal modules, so the impact was rather small
I did a commit per module for the updates in modules depending on former
sl modules in order to be easy to trace and spot issues, therefore each
developer can see very easy the changes in his/her modules.
Tests were conducted with default config and some typical cases,
practically should not be a real big impact in modules -- sl reply
functions from former APIs use distinct names but same parameters. The
implementation was adapted to fit S SL module internals.
Testing and feedback is very much appreciate.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#80 - Major regression in db_postgres with FS#77 patch
User who did this - Bayan (bayan)
----------
Thanks for looking into it, that is nasty :-\.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=80#comment98
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Juha Heinanen (jh)
Attached to Project - sip-router
Summary - patch to add method masking to xlog function
Task Type - Feature Request
Category - Modules kamailio
Status - Assigned
Assigned To - Daniel-Constantin Mierla
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - attached find a patch to modules_k/xlog module that adds possibility, via method_mask module parameter, to filter out log messages based on method of request or reply. if method_mask parameter is set, it can be inspected and changed on the fly via rpc commands.
this patch was rejected by owner of xlog module, because it adds an overhead of two machine instructions to processing of xlog script function. i'm submitting the patch to the tracker anyhow in case some other people see it useful.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=81
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#81 - patch to add method masking to xlog function
User who did this - Juha Heinanen (jh)
http://sip-router.org/tracker/index.php?do=details&task_id=81
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#80 - Major regression in db_postgres with FS#77 patch
User who did this - Henning Westerholt (henningw)
----------
Ok, now with some delay because of some other (also nasty) bug..
I managed to reproduce your issue, indeed the postgres behaves wrong here:
openser=> select * from presentity;
id | username | domain | event | etag | expires | received_time | body | sender
----+----------+--------+-------+------+---------+---------------+------+--------
2 | 11 | 2 | 3 | 4 | 5 | 6 | | 7
-> Jul 23 15:05:52 ca ../kamailio[3526]: my AVP body is '
(syslog stops printing because of the \0)
mysql> select * from presentity;
+----+----------+--------+-------+------+---------+---------------+------+--------+
| id | username | domain | event | etag | expires | received_time | body | sender |
+----+----------+--------+-------+------+---------+---------------+------+--------+
| 1 | 11 | 2 | 3 | 4 | 5 | 6 | | 7 |
+----+----------+--------+-------+------+---------+---------------+------+--------+
-> Jul 23 15:06:25 ca ../kamailio[3719]: my AVP body is '<null>'
Here its correct. So there is something else missing in the db_postgres module, i'll investigate further.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=80#comment97
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.