-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into restcomm1657
* master: (28 commits) Update on DigestAuthentication unit test update rn wording updated RN wording updated RNs updated release notes updated migration notes reverted unused change Added extra log statements around the check of client Authorization header Updated External project version DigestAuthentication unit test tha patch corected data corrected test data dial DID with proper org test data Fixes for 8.4.0 release notes. This close RESTCOMM-2054 Patch for race condition when SBC is enabled, where the Cancel from one of the forking branches will cause the initial call state to be marked as Canceled and thus the Bye wont be send at the end of the call. This refer to RESTCOMM-1932 added release notes log,and link to main page added ReferOrganizationTest refactored for readability ...
- Loading branch information
Showing
15 changed files
with
1,644 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...restcomm.commons/src/test/java/org/restcomm/connect/commons/DigestAuthenticationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2018, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation; either version 3 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
*/ | ||
|
||
package org.restcomm.connect.commons; | ||
|
||
import org.junit.Test; | ||
import org.restcomm.connect.commons.dao.Sid; | ||
import org.restcomm.connect.commons.util.DigestAuthentication; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class DigestAuthenticationTest { | ||
|
||
private String client = "alice0000000"; | ||
private String domain = "org0000000.restcomm.com"; | ||
private String password = "1234"; | ||
private String proxyAuthHeader = "Digest username=\"alice0000000\",realm=\"org0000000.restcomm.com\",cnonce=\"6b8b4567\",nc=00000001,qop=auth,uri=\"sip:172.31.45.30:5080\",nonce=\"61343361383534392d633237372d343\",response=\"bc322276e42a123c53c2ed6f53d5e7c7\",algorithm=MD5"; | ||
|
||
@Test | ||
public void testAuth(){ | ||
String hashedPass = DigestAuthentication.HA1(client, domain, password, "MD5"); | ||
|
||
assertEquals("9b11a2924d0881aca84f9db97f834d99", hashedPass); | ||
|
||
assertTrue(permitted(proxyAuthHeader, "INVITE", hashedPass)); | ||
|
||
} | ||
|
||
static boolean permitted(final String authorization, final String method, String clientPassword) { | ||
final Map<String, String> map = authHeaderToMap(authorization); | ||
String user = map.get("username"); | ||
final String algorithm = map.get("algorithm"); | ||
final String realm = map.get("realm"); | ||
final String uri = map.get("uri"); | ||
final String nonce = map.get("nonce"); | ||
final String nc = map.get("nc"); | ||
final String cnonce = map.get("cnonce"); | ||
final String qop = map.get("qop"); | ||
final String response = map.get("response"); | ||
final String password2 = clientPassword; | ||
final String result = DigestAuthentication.response(algorithm, user, realm, "", password2, nonce, nc, cnonce, | ||
method, uri, null, qop); | ||
return result.equals(response); | ||
} | ||
|
||
private static Map<String, String> authHeaderToMap(final String header) { | ||
final Map<String, String> map = new HashMap<String, String>(); | ||
final int endOfScheme = header.indexOf(" "); | ||
map.put("scheme", header.substring(0, endOfScheme).trim()); | ||
final String[] tokens = header.substring(endOfScheme + 1).split(","); | ||
for (final String token : tokens) { | ||
final String[] values = token.trim().split("=",2); //Issue #935, split only for first occurrence of "=" | ||
map.put(values[0].toLowerCase(), values[1].replace("\"", "")); | ||
} | ||
|
||
return map; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/release-notes.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
= Restcomm-Connect Release Notes | ||
|
||
These notes group both Community and Telscale changes in a single document. | ||
|
||
=== Tags | ||
|
||
The folowing tags are used to categorize and state the scope of a change | ||
|
||
* **security improvement** tags changes related to security | ||
* **commercial** tags changes that are available only in the commercial RestcommOne product | ||
|
||
|
||
//add release-notes with newer on top | ||
== 8.4.0 version | ||
=== New Features | ||
// New features (whether major or minor) go here | ||
* Clients passwords are now hashed in DB - **security improvement** | ||
* Profiles allow arbitrary properties to be saved/retrieved. | ||
* Added configurable SBC mode which if enabled will disable all NAT handling operations | ||
|
||
=== Breaking Changes | ||
// draws attention to functionality that is getting removed | ||
* Accessing Olympus WebRTC from Console now requires to login again. This because of the new feature to hash passwords | ||
* Removed default clients `alice` and `bob` | ||
|
||
=== Bug Fixes | ||
// any difference in functionality | ||
* Dial Timeout does not cancel task when Callee is busy | ||
* Configurable inbound/outbound SMPP encoding | ||
* Race condition on sending BYE to incoming call for a dial fork scenario | ||
* Fixed SDR event for SMS - **commercial** | ||
* Fixed REFER (Call Transfer) support to work with organizations | ||
|
||
|
||
=== Migration Notes | ||
// Things to consider during migration from previous release | ||
* Clients password are considered to be MD5 hashed in DB. Database migration | ||
scripts are available in **commercial** version. Database migration script will ensure existing clients passwords are properly migrated. | ||
** Database migration script will automatically take a backup of complete database before making any changes | ||
** Please take a backup of restcomm clients table (to be used in case we need to rollback as explained below) | ||
** In case of rollback to older version, kindly restore restcomm clients table only. | ||
|
||
=== External Dependencies Updates | ||
// any dependencies | ||
* Console updated to version **__8.4.0__** | ||
** Integrated Feature Access Control (FAC) limitations | ||
** Updated Console Look & Feel to match new Restcomm branding | ||
** Implemented new Sign In page in Console | ||
** Use Designer location in Console from configuration file | ||
* Designer updated to version **__1.2.0-131__** | ||
** Integrated Feature Access Control (FAC) limitations | ||
** Improved Designer performance with better xstream usage | ||
** Designer Look & Feel to match new Restcomm branding | ||
* Olympus WebRTC Demo updated to version **__1.1.0-167__** | ||
** Fixed an issue in WebRTC Demo jain-sip library, parsing some headers | ||
** Improve WebRTC Demo UX by showing incoming call screen on top even if caller is not the selected contact | ||
** Add additional configuration to WebRTC Demo for specifying client-specific parameters | ||
** Improve WebRTC Xirsys integration by checking for actual success response and using domain property as namespace (now required) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.