Skip to content

Commit 2235d58

Browse files
shahzaibjAzure DevOps Pipelinerpdomesiddhijainfadidurah
authored
Merge alias branch into release branch for 21.4.0 (#2706)
See title. --------- Co-authored-by: Azure DevOps Pipeline <[email protected]> Co-authored-by: Dome Pongmongkol <[email protected]> Co-authored-by: Siddhi <[email protected]> Co-authored-by: fadidurah <[email protected]>
1 parent ef18a07 commit 2235d58

File tree

10 files changed

+68
-13
lines changed

10 files changed

+68
-13
lines changed

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
vNext
22
----------
3+
4+
Version 21.4.0
5+
----------
36
- [MINOR] Updating handling of ssl error received in Android WebView's onReceivedSslError callback (#2691)
47
- [MINOR] Fixing the sign in screens when edge to edge is enabled (#2665)
58
- [MINOR] Showing webcp flow in webview (#2673)

common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ codeCoverageReport {
3131

3232
// In dev, we want to keep the dependencies(common4j, broker4j, common) to 1.0.+ to be able to be consumed by daily dev pipeline.
3333
// In release/*, we change these to specific versions being consumed.
34-
def common4jVersion = "1.0.+"
34+
def common4jVersion = "21.4.0"
3535
if (project.hasProperty("distCommon4jVersion") && project.distCommon4jVersion != '') {
3636
common4jVersion = project.distCommon4jVersion
3737
}

common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,16 @@ public static String computeMaxHostBrokerProtocol() {
14751475
*/
14761476
public static final String GET_FLIGHTS_RESULT = "active_flights";
14771477

1478+
/**
1479+
* The Bundle key name of the result of the number match operation.
1480+
*/
1481+
public static final String GET_NUMBER_MATCH_RESULT = "number_match";
1482+
1483+
/**
1484+
* SessionID for the number match operation.
1485+
*/
1486+
public static final String SESSION_ID = "session_id";
1487+
14781488
/**
14791489
* Time out for the AccountManager's remove account operation in broker.
14801490
*/
@@ -1656,6 +1666,7 @@ public enum API {
16561666
BROKER_UPDATE_BRT(BROKER_API_UPDATE_BRT_PATH, BROKER_VERSION_1, null),
16571667
BROKER_SET_FLIGHTS(BROKER_API_SET_FLIGHTS_PATH, BROKER_VERSION_3, null),
16581668
BROKER_GET_FLIGHTS(BROKER_API_GET_FLIGHTS_PATH, BROKER_VERSION_3, null),
1669+
16591670
GET_SSO_TOKEN(GET_SSO_TOKEN_PATH, null, VERSION_7),
16601671
UNKNOWN(null, null, null),
16611672
DEVICE_REGISTRATION_PROTOCOLS(DEVICE_REGISTRATION_PROTOCOLS_PATH, null, null),
@@ -1674,7 +1685,9 @@ public enum API {
16741685
WEBAPPS_GET_SUPPORTED_WEB_APPS_CONTRACTS(WEBAPPS_GET_SUPPORTED_WEB_APPS_CONTRACTS_PATH, null, null),
16751686
WEBAPPS_EXECUTE_WEB_APPS_REQUEST(WEBAPPS_EXECUTE_WEB_APPS_REQUEST_PATH, null, null),
16761687
PROVISION_RESOURCE_ACCOUNT(PROVISION_RESOURCE_ACCOUNT_PATH, null, null),
1677-
GET_AAD_DEVICE_ID(GET_AAD_DEVICE_ID_PATH, null, null);
1688+
GET_AAD_DEVICE_ID(GET_AAD_DEVICE_ID_PATH, null, null),
1689+
BROKER_GET_NUMBER_MATCH(BROKER_API_GET_NUMBER_MATCH_PATH, BROKER_VERSION_3, null);
1690+
16781691

16791692
/**
16801693
* The content provider path that the API exists behind.
@@ -1794,6 +1807,11 @@ public String getMsalVersion(){
17941807
*/
17951808
public static final String BROKER_API_GET_FLIGHTS_PATH = "/brokerApi/getFlights";
17961809

1810+
/**
1811+
* Broker api path constant for getting number match.
1812+
*/
1813+
public static final String BROKER_API_GET_NUMBER_MATCH_PATH = "/brokerApi/getNumberMatch";
1814+
17971815
/**
17981816
* ContentProvider path for retrieving Broker Discovery Metadata.
17991817
*/

common/src/main/java/com/microsoft/identity/common/internal/broker/AuthUxJavaScriptInterface.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import com.google.gson.JsonSyntaxException
2929
import com.google.gson.stream.MalformedJsonException
3030
import com.microsoft.identity.common.adal.internal.AuthenticationConstants
3131
import com.microsoft.identity.common.internal.numberMatch.NumberMatchHelper
32+
import com.microsoft.identity.common.java.opentelemetry.AttributeName
33+
import com.microsoft.identity.common.java.opentelemetry.SpanExtension
3234
import com.microsoft.identity.common.logging.Logger
3335
import java.net.MalformedURLException
3436
import java.net.URL
@@ -115,10 +117,11 @@ class AuthUxJavaScriptInterface {
115117
"Correlation ID during JavaScript Call: [${payloadObject.correlationId}]"
116118
)
117119

118-
119-
// TODO: Leaving these here, as these will be relevant for next WebCP feature
120-
// val actionName = payloadObject.actionName
121-
// val actionComponent = payloadObject.actionComponent
120+
val span = SpanExtension.current()
121+
val actionName = payloadObject.actionName
122+
span.setAttribute(AttributeName.authux_js_action_name.name, actionName)
123+
val actionComponent = payloadObject.actionComponent
124+
span.setAttribute(AttributeName.authux_js_action_component.name, actionComponent)
122125

123126
val parameters = payloadObject.params
124127
if (parameters == null) {
@@ -127,6 +130,9 @@ class AuthUxJavaScriptInterface {
127130
}
128131

129132
val operation = parameters.operation
133+
if (operation != null) {
134+
span.setAttribute(AttributeName.authux_js_operation.name, operation)
135+
}
130136

131137
Logger.info(methodTag, "Function name: [$operation]")
132138

common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/BrokerOperationBundle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public enum Operation {
7878
BROKER_WEBAPPS_API_GET_SUPPORTED_WEB_APPS_CONTRACTS(API.WEBAPPS_GET_SUPPORTED_WEB_APPS_CONTRACTS, null),
7979
BROKER_WEBAPPS_API_EXECUTE_WEB_APPS_REQUEST(API.WEBAPPS_EXECUTE_WEB_APPS_REQUEST, null),
8080
PROVISION_RESOURCE_ACCOUNT(API.PROVISION_RESOURCE_ACCOUNT, null),
81-
GET_AAD_DEVICE_ID(API.GET_AAD_DEVICE_ID, null);
81+
GET_AAD_DEVICE_ID(API.GET_AAD_DEVICE_ID, null),
82+
BROKER_GET_NUMBER_MATCH(API.BROKER_GET_NUMBER_MATCH, null);
8283

8384
final API mContentApi;
8485
final String mAccountManagerOperation;

common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchHelper.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
// THE SOFTWARE.
2323
package com.microsoft.identity.common.internal.numberMatch
2424

25+
import com.microsoft.identity.common.java.opentelemetry.AttributeName
26+
import com.microsoft.identity.common.java.opentelemetry.SpanExtension
2527
import com.microsoft.identity.common.logging.Logger
2628

2729
/**
@@ -41,8 +43,6 @@ class NumberMatchHelper {
4143
companion object {
4244
val TAG = NumberMatchHelper::class.java.simpleName
4345
val numberMatchMap: HashMap<String, String> = HashMap()
44-
const val SESSION_ID_ATTRIBUTE_NAME = "sessionID"
45-
const val NUMBER_MATCH_ATTRIBUTE_NAME = "numberMatch"
4646

4747
/**
4848
* Method to add a key:value pair of sessionID:numberMatch to static hashmap. This hashmap will be accessed
@@ -53,15 +53,19 @@ class NumberMatchHelper {
5353
Logger.info(methodTag,
5454
"Adding entry in NumberMatch hashmap for session ID: $sessionId")
5555

56+
val span = SpanExtension.current()
57+
5658
// If both parameters are non-null, add a new entry to the hashmap
5759
if (sessionId != null && numberMatch != null) {
5860
numberMatchMap[sessionId] = numberMatch
61+
span.setAttribute(AttributeName.stored_number_match_entry.name, true)
5962
}
6063
// If either parameter is null, do nothing
6164
else {
6265
Logger.warn(methodTag,
6366
"Either session ID or number match is null. Nothing to add for number match."
6467
)
68+
span.setAttribute(AttributeName.stored_number_match_entry.name, false)
6569
}
6670
}
6771

common4j/src/main/com/microsoft/identity/common/java/jwt/IJwtRequestSigner.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
// THE SOFTWARE.
2323
package com.microsoft.identity.common.java.jwt;
2424

25+
import com.microsoft.identity.common.java.authorities.Authority;
2526
import com.microsoft.identity.common.java.exception.ClientException;
2627

2728
import java.security.cert.CertificateEncodingException;
@@ -39,5 +40,7 @@ public interface IJwtRequestSigner {
3940
* @param jwtRequestBody JWT payload
4041
* @return Return signed JWT string (encodedJwtHeader.encodedJwtBody.Signature(encodedJwtHeader, encodedJwtBody))
4142
*/
42-
@NonNull String getSignedJwt(@NonNull final JwtRequestBody jwtRequestBody) throws ClientException, CertificateEncodingException;
43+
@NonNull
44+
String getSignedJwt(@NonNull final JwtRequestBody jwtRequestBody,
45+
@NonNull final Authority authority) throws ClientException, CertificateEncodingException;
4346
}

common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,5 +384,25 @@ public enum AttributeName {
384384
* Records the if webview received an SSL error and
385385
* corresponding primary error code.
386386
*/
387-
web_view_ssl_primary_error_code
387+
web_view_ssl_primary_error_code,
388+
389+
/**
390+
* Record action name from Webview JavaScript Payload
391+
*/
392+
authux_js_action_name,
393+
394+
/**
395+
* Record action component from Webview JavaScript Payload
396+
*/
397+
authux_js_action_component,
398+
399+
/**
400+
* Record operation name from Webview JavaScript Payload
401+
*/
402+
authux_js_operation,
403+
404+
/**
405+
* Record whether or not the request stored a number match entry.
406+
*/
407+
stored_number_match_entry
388408
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#Wed May 12 20:08:39 UTC 2021
2-
versionName=21.3.0
2+
versionName=21.4.0
33
versionCode=1
44
latestPatchVersion=227

versioning/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#Tue Apr 06 22:55:08 UTC 2021
2-
versionName=21.3.0
2+
versionName=21.4.0
33
versionCode=1
44
latestPatchVersion=234

0 commit comments

Comments
 (0)