RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
242 stars 215 forks source link

Support MD5 and ClearText for Client registration - RESTCOMM-2096 #2933

Closed gvagenas closed 6 years ago

gvagenas commented 6 years ago

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Special notes for your reviewer:

jaimecasero commented 6 years ago

I only saw UserMAnager changes in the signalling side. Do we need to care about the rest of authentication in voice/sms/ussd side? I guess the signalling itself requires authentication as well,right? not only the registration...

abdulazizali77 commented 6 years ago

Do we need to care about the rest of authentication in voice/sms/ussd side?

Jaime, no we dont need sms/ussd auth, this is only SIP Client authentication. so it only happens during SIP Register

gvagenas commented 6 years ago

@jaimecasero @abdulazizali77 The CallControlHelper will take care of the authentication of UserAgentManager and the rest (CallManager, SmsManager etc). At the CallControlHelper we use the DigestAuthentication to generate the proper response based on the client's password and password_algorithm. The support for clear_text password is implemented at the DigestAuthentication which is common to UserAgentManager, CallManager etc. Testsuite covers this for all kind of traffic..

The fallback mechanism is implemented in the MybatisClientsDao, where if the password_algorithm column is missing, we assume it cleartext and as we discussed this is temporary patch that will be removed in the next iteration. And this is also covered in the testsuite