I'm currently using version 3.2.2.4 of the turn server and I have some authorization problems when doing ConnectionBinds.
I use the shared secret solution as specified in REST Turn API.
It usually works fine, but if the allocation of one of my clients is alive for x hours that client cannot do connection binds anymore. Unfortunately I do not know when it starts to fail, but I have a hunch that it might be connected to the TTL in the username.
It seems to accept refreshes of the allocation and permission fine so I guess some parts of the server finds the username to be OK.
150184: refreshed: session id=000000000000000142, username=<1401290823:00408CDC898B>, lifetime=600
150184: user <1401290823:00408CDC898B>: incoming packet REFRESH processed, success
150244: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
150514: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
150754: refreshed: session id=000000000000000142, username=<1401290823:00408CDC898B>, lifetime=600
150754: user <1401290823:00408CDC898B>: incoming packet REFRESH processed, success
150785: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
151055: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
151324: refreshed: session id=000000000000000142, username=<1401290823:00408CDC898B>, lifetime=600
151324: user <1401290823:00408CDC898B>: incoming packet REFRESH processed, success
151325: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
151595: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
151865: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
151894: refreshed: session id=000000000000000142, username=<1401290823:00408CDC898B>, lifetime=600
151894: user <1401290823:00408CDC898B>: incoming packet REFRESH processed, success
152135: user <1401290823:00408CDC898B>: incoming packet CREATE_PERMISSION processed, success
152165: user <>: incoming packet message processed, error 401
152165: new: session id=000000000000000143, username=<1401435308:1300>, lifetime=600
152165: user <1401435308:1300>: incoming packet ALLOCATE processed, success
152165: user <1401435308:1300>: incoming packet CONNECT processed, success
152165: user <>: incoming packet message processed, error 401
152165: user <>: incoming packet message processed, error 401
152165: user <>: incoming packet CONNECTION_BIND processed, success
152165: TURN connection closed (non-mobile pattern), user <>
152165: check_stun_auth: Cannot find credentials of user <1401290823:00408CDC898B>
152165: user <>: incoming packet message processed, error 401
152174: TURN connection closed (non-mobile pattern), user <>
152174: TURN connection closed (non-mobile pattern), user <1401290823:00408CDC898B>
152174: delete: session id=000000000000000142, username=<1401290823:00408CDC898B>
152174: TURN connection closed (non-mobile pattern), user <1401435308:1300>
152174: delete: session id=000000000000000143, username=<1401435308:1300>
The user failing to do a connectionbind is "1401290823:00408CDC898B".
I've also attached a wireshark trace of the communication between my clients and the turn server.
For this test I started both clients on the same computer. One of them was started two days ago and kept its allocation alive and when I started the second one today and tried to connect to the first one, the first one gets unauthorized on the connection bind request.
This works if I restart the first client so it gets a new "fresh" allocation.
Hope someone can help me figure out why I get the unauthorized message.
I'm also a bit curious why some log entries has empty users (user<>).