Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common
Submodule common updated 47 files
+10 −3 changelog.txt
+40 −39 common/src/androidTest/java/com/microsoft/identity/common/crypto/AndroidWrappedKeyProviderTest.java
+32 −29 common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java
+1 −1 common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationSettings.java
+20 −20 common/src/main/java/com/microsoft/identity/common/crypto/AndroidAuthSdkStorageEncryptionManager.java
+27 −11 common/src/main/java/com/microsoft/identity/common/crypto/AndroidWrappedKeyProvider.java
+10 −4 common/src/main/java/com/microsoft/identity/common/internal/broker/AuthUxJavaScriptInterface.kt
+18 −22 common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerData.kt
+6 −1 common/src/main/java/com/microsoft/identity/common/internal/broker/IRestrictionsManager.kt
+6 −6 common/src/main/java/com/microsoft/identity/common/internal/broker/PackageHelper.java
+9 −3 common/src/main/java/com/microsoft/identity/common/internal/broker/SdmQrPinManager.kt
+2 −1 common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/BrokerOperationBundle.java
+6 −2 common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchHelper.kt
+4 −0 common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/AuthorizationActivityFactory.kt
+5 −1 ...on/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/AuthorizationActivityParameters.kt
+26 −19 common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/WebViewAuthorizationFragment.java
+167 −34 common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
+10 −3 ...n/src/main/java/com/microsoft/identity/common/internal/ui/webview/EmbeddedWebViewAuthorizationStrategy.java
+33 −16 common/src/main/java/com/microsoft/identity/common/internal/ui/webview/OAuth2WebViewClient.java
+26 −26 common/src/test/java/com/microsoft/identity/common/crypto/AndroidAuthSdkStorageEncryptionManagerTest.java
+16 −30 common/src/test/java/com/microsoft/identity/common/internal/mocks/MockCommonFlightsManager.java
+179 −26 .../src/test/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClientTest.java
+6 −6 common/src/test/java/com/microsoft/identity/common/shadows/ShadowAndroidSdkStorageEncryptionManager.java
+39 −0 common/src/test/java/com/microsoft/identity/common/shadows/ShadowProcessUtil.java
+5 −0 common4j/src/main/com/microsoft/identity/common/java/AuthenticationConstants.java
+50 −0 common4j/src/main/com/microsoft/identity/common/java/broker/CommonTenantInfoProvider.kt
+1 −1 common4j/src/main/com/microsoft/identity/common/java/crypto/ProviderFactory.java
+25 −25 common4j/src/main/com/microsoft/identity/common/java/crypto/StorageEncryptionManager.java
+77 −0 common4j/src/main/com/microsoft/identity/common/java/crypto/key/AES256SecretKeyGenerator.kt
+0 −144 common4j/src/main/com/microsoft/identity/common/java/crypto/key/AbstractSecretKeyLoader.java
+51 −0 common4j/src/main/com/microsoft/identity/common/java/crypto/key/ISecretKeyGenerator.kt
+88 −0 common4j/src/main/com/microsoft/identity/common/java/crypto/key/ISecretKeyProvider.kt
+3 −3 common4j/src/main/com/microsoft/identity/common/java/crypto/key/KeyUtil.java
+26 −10 common4j/src/main/com/microsoft/identity/common/java/crypto/key/PredefinedKeyProvider.java
+18 −2 common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java
+33 −0 common4j/src/main/com/microsoft/identity/common/java/interfaces/ITenantInfoProvider.kt
+4 −1 common4j/src/main/com/microsoft/identity/common/java/jwt/IJwtRequestSigner.java
+27 −0 common4j/src/main/com/microsoft/identity/common/java/jwt/JwtKeyUseTypes.kt
+46 −0 common4j/src/main/com/microsoft/identity/common/java/logging/DiagnosticContextExtensions.kt
+27 −1 common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java
+5 −0 common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/TokenRequest.java
+7 −7 common4j/src/test/com/microsoft/identity/common/java/crypto/KeyUtilTest.java
+17 −7 common4j/src/test/com/microsoft/identity/common/java/crypto/MockAES256KeyProvider.java
+10 −2 common4j/src/test/com/microsoft/identity/common/java/crypto/MockAES256KeyProviderWithGetKeyError.java
+9 −9 common4j/src/test/com/microsoft/identity/common/java/crypto/MockStorageEncryptionManager.java
+21 −23 common4j/src/test/com/microsoft/identity/common/java/crypto/StorageEncryptionManagerTest.java
+100 −0 common4j/src/test/com/microsoft/identity/common/java/crypto/key/AES256SecretKeyGeneratorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,25 @@
package com.microsoft.identity.client.e2e.shadows;

import com.microsoft.identity.common.crypto.AndroidAuthSdkStorageEncryptionManager;
import com.microsoft.identity.common.java.crypto.key.PredefinedKeyLoader;
import com.microsoft.identity.common.java.crypto.key.AES256KeyLoader;
import com.microsoft.identity.common.java.crypto.key.PredefinedKeyProvider;
import com.microsoft.identity.common.java.crypto.key.ISecretKeyProvider;

import org.robolectric.annotation.Implements;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Implements(AndroidAuthSdkStorageEncryptionManager.class)
public class ShadowAndroidSdkStorageEncryptionManager {

final byte[] encryptionKey = new byte[]{22, 78, -69, -66, 84, -65, 119, -9, -34, -80, 60, 67, -12, -117, 86, -47, -84, -24, -18, 121, 70, 32, -110, 51, -93, -10, -93, -110, 124, -68, -42, -119};
final AES256KeyLoader mUserDefinedKey = new PredefinedKeyLoader("MOCK_ALIAS", encryptionKey);
final ISecretKeyProvider mUserDefinedKey = new PredefinedKeyProvider("MOCK_ALIAS", encryptionKey);

public AES256KeyLoader getKeyLoaderForEncryption() {
public ISecretKeyProvider getKeyProviderForEncryption() {
return mUserDefinedKey;
}

public List<AES256KeyLoader> getKeyLoaderForDecryption(byte[] cipherText) {
return new ArrayList<AES256KeyLoader>() {{
add(mUserDefinedKey);
}};
public List<ISecretKeyProvider> getKeyProviderForDecryption(byte[] cipherText) {
return Collections.singletonList(mUserDefinedKey);
}
}