< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Registration Autenthication Failure


Hello,

I am trying to use DUM to set up a simple application. And so far like
what I see, however, I noticed a problem with Registration that I
thought you should know. 

The registration fails if challenged after the first time. I have
included a trace below but the problem is that in your
ClientAuthManager::handleAuthHeader(...) method you are not removing any
existing authorizations before calling Helper::addAuthorization(...).
Thus, subsequent Registration Challenges keep added authorizations to
the existing one.

Thanks,

Brian.


===================================================
TRACE OF REGISTER NOT AUTHENTICATING PROPERLY

Frame 20 (394 bytes on wire, 394 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-666583564-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 1 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Content-Length: 0

Frame 21 (505 bytes on wire, 505 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.30 (192.168.0.30)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Status line: SIP/2.0 401 Unauthorized
        Status-Code: 401
    Message Header
        To: 52017
<sip:52017@xxxxxxxxxxxxxx>;tag=ec5154884c15db89cef5049aa4f06328.ec0f
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-666583564-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 1 REGISTER
        WWW-Authenticate: Digest realm="fwd.pulver.com",
nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc"
        Server: Free World Dialup (0.8.11rc3 (i386/linux))
        Content-Length: 0

Frame 24 (588 bytes on wire, 588 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-1034500969-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 2 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Content-Length: 0

Frame 28 (458 bytes on wire, 458 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.30 (192.168.0.30)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Status line: SIP/2.0 200 OK
        Status-Code: 200
    Message Header
        t: 52017
<sip:52017@xxxxxxxxxxxxxx>;tag=ec5154884c15db89cef5049aa4f06328.854d
        f: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-1034500969-1--c87542-;rport
        i: 248a05227d4b7966
        CSeq: 2 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>;q=0.00;expires=55
        Server: Free World Dialup (0.8.11rc3 (i386/linux))
        Expires: 55
        Content-Length: 0

----------> That was the first register (everything is fine)
<------------------


Frame 669 (589 bytes on wire, 589 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-1034500969-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 20 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Content-Length: 0

Frame 670 (368 bytes on wire, 368 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.30 (192.168.0.30)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Status line: SIP/2.0 200 OK
        Status-Code: 200
    Message Header
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-1034500969-1--c87542-;rport
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        Call-Id: 248a05227d4b7966
        CSeq: 20 REGISTER
        Expires: 67
        Contact: <sip:52017@xxxxxxxxxxxx:5060>;expires=67
        Content-Length: 0


------> This is the second challenge (the authorization is added to what
was there)

Frame 708 (781 bytes on wire, 781 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-687007397-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 22 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed8b458f648cd827826bce50fed8bbbeab1808",uri="sip:fwd.pulver.com",response="cac7fe1e3899b461e57f10743cb8e5da",algorithm=MD5
        Content-Length: 0

Frame 709 (496 bytes on wire, 496 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.30 (192.168.0.30)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Status line: SIP/2.0 401 Unauthorized
        Status-Code: 401
    Message Header
        t: 52017
<sip:52017@xxxxxxxxxxxxxx>;tag=ec5154884c15db89cef5049aa4f06328.91fd
        f: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-687007397-1--c87542-;rport
        i: 248a05227d4b7966
        CSeq: 22 REGISTER
        WWW-Authenticate: Digest realm="fwd.pulver.com",
nonce="40ed8b46c7006966fdeeebfd34e772261c210916"
        Server: Free World Dialup (0.8.11rc3 (i386/linux))
        Content-Length: 0

Frame 710 (781 bytes on wire, 781 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-687007397-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 23 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed8b458f648cd827826bce50fed8bbbeab1808",uri="sip:fwd.pulver.com",response="cac7fe1e3899b461e57f10743cb8e5da",algorithm=MD5
        Content-Length: 0

Frame 741 (781 bytes on wire, 781 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-687007397-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 24 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed8b458f648cd827826bce50fed8bbbeab1808",uri="sip:fwd.pulver.com",response="cac7fe1e3899b461e57f10743cb8e5da",algorithm=MD5
        Content-Length: 0

Frame 742 (496 bytes on wire, 496 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.30 (192.168.0.30)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Status line: SIP/2.0 401 Unauthorized
        Status-Code: 401
    Message Header
        t: 52017
<sip:52017@xxxxxxxxxxxxxx>;tag=ec5154884c15db89cef5049aa4f06328.91fd
        f: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-687007397-1--c87542-;rport
        i: 248a05227d4b7966
        CSeq: 24 REGISTER
        WWW-Authenticate: Digest realm="fwd.pulver.com",
nonce="40ed8b6cda40e6b3b6cc0b4737f22ca8bce4ddd0"
        Server: Free World Dialup (0.8.11rc3 (i386/linux))
        Content-Length: 0

Frame 745 (974 bytes on wire, 974 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.30 (192.168.0.30), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Request line: REGISTER sip:fwd.pulver.com SIP/2.0
        Method: REGISTER
    Message Header
        To: 52017 <sip:52017@xxxxxxxxxxxxxx>
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6635253d
        Via: SIP/2.0/UDP
192.168.0.30:5060;branch=z9hG4bK-c87542-755874072-1--c87542-;rport
        Call-ID: 248a05227d4b7966
        CSeq: 25 REGISTER
        Contact: <sip:52017@xxxxxxxxxxxx:5060>
        Expires: 70
        Max-Forwards: 70
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed892fe24ebdcbd8cd5c5056f08c1ed5e463fc",uri="sip:fwd.pulver.com",response="fb9748b043eea8ce3a35927fa42773e0",algorithm=MD5
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed8b458f648cd827826bce50fed8bbbeab1808",uri="sip:fwd.pulver.com",response="cac7fe1e3899b461e57f10743cb8e5da",algorithm=MD5
        Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40ed8b6cda40e6b3b6cc0b4737f22ca8bce4ddd0",uri="sip:fwd.pulver.com",response="12bc5d5e0c7928943c81c9cf6858f129",algorithm=MD5
        Content-Length: 0