Hello,
On 6/8/12 4:24 PM, patrice.bodeven(a)orange.com wrote:
Hello,
I try to understand the nonce count handling.
By parameter "modparam("auth", "nonce_expire", 21600)" I
can define
the validity of the Nonce in the time.
But I want also to define the validity of the Nonce in the number of
use. For exemple, I want to limit the reuse of the nonce at 64 times
(including register, Invite)
But I can see the definition of the nonce_count for all the SIP users
on Kamailio and not user per user.
If I understand when I use
/modparam("auth", "nonce_count", 1) # enable nonce_count support /
/modparam("auth", "nc_array_order", 20) # 1M in-flight nonces,
using 1Mb memory/
/modparam("auth", "nid_pool_no", 4)/
I define a memory to store the nonce values for all the SIP users.
So when User A use nonce x for REGISTER and nonce y for INVITE, nonce
x is still valid !
My understanding is it correct ?
Is anyway to define a nonce validity in number of times per user ?
nid_pool_no is to define more sets of nonces, that will allow better
concurrency. nonce_count is about handling nc parameter which is set by
client for qop -- if you look in the rfc for www digest authentication,
you may get a better picture of these parameters.
Afaik, there is no way to set the number of valid times for a nonce per
user, it's only time base option. One time nonce means that the nonce is
rendered invalid when used even it is still valid from time point of
view (better security, avoiding reply attacks).
Cheers,
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 -
http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 -
http://asipto.com/u/kpw