diff --git a/app/build.gradle b/app/build.gradle index 7506fd3a5b..d07e728cba 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -313,9 +313,6 @@ dependencies { implementation 'androidx.annotation:annotation:1.8.2' implementation 'com.vanniktech:emoji-google:0.21.0' - implementation "com.github.nextcloud-deps.hwsecurity:hwsecurity-fido:$fidoVersion" - implementation "com.github.nextcloud-deps.hwsecurity:hwsecurity-fido2:$fidoVersion" - // document scanner not available on FDroid (generic) due to OpenCV binaries gplayImplementation project(':appscan') huaweiImplementation project(':appscan') diff --git a/app/src/main/java/com/owncloud/android/MainApp.java b/app/src/main/java/com/owncloud/android/MainApp.java index 1e96fa3169..e38bb9b725 100644 --- a/app/src/main/java/com/owncloud/android/MainApp.java +++ b/app/src/main/java/com/owncloud/android/MainApp.java @@ -27,7 +27,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.RestrictionsManager; -import android.content.pm.ActivityInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.Resources; @@ -64,7 +63,6 @@ import com.nextcloud.receiver.NetworkChangeListener; import com.nextcloud.receiver.NetworkChangeReceiver; import com.nextcloud.utils.extensions.ContextExtensionsKt; import com.nmc.android.ui.LauncherActivity; -import com.owncloud.android.authentication.AuthenticatorActivity; import com.owncloud.android.authentication.PassCodeManager; import com.owncloud.android.datamodel.ArbitraryDataProvider; import com.owncloud.android.datamodel.ArbitraryDataProviderImpl; @@ -121,8 +119,6 @@ import androidx.lifecycle.ProcessLifecycleOwner; import dagger.android.AndroidInjector; import dagger.android.DispatchingAndroidInjector; import dagger.android.HasAndroidInjector; -import de.cotech.hw.SecurityKeyManager; -import de.cotech.hw.SecurityKeyManagerConfig; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP; @@ -317,8 +313,6 @@ public class MainApp extends Application implements HasAndroidInjector, NetworkC insertConscrypt(); - initSecurityKeyManager(); - registerActivityLifecycleCallbacks(new ActivityInjector()); //update the app restart count when app is launched by the user @@ -476,35 +470,6 @@ public class MainApp extends Application implements HasAndroidInjector, NetworkC }); } - @SuppressWarnings("unchecked") - private void initSecurityKeyManager() { - SecurityKeyManager securityKeyManager = SecurityKeyManager.getInstance(); - final SecurityKeyManagerConfig.Builder configBuilder = new SecurityKeyManagerConfig.Builder() - .setEnableDebugLogging(BuildConfig.DEBUG); - - try { - // exclude all activities except AuthenticatorActivity - final PackageManager pm = this.getPackageManager(); - final PackageInfo info = pm.getPackageInfo(this.getPackageName(), PackageManager.GET_ACTIVITIES); - final ActivityInfo[] activities = info.activities; - for (ActivityInfo activityInfo : activities) { - try { - final Class aClass = (Class) Class.forName(activityInfo.name); - if (aClass != AuthenticatorActivity.class) { - configBuilder.addExcludedActivityClass(aClass); - } - } catch (ClassNotFoundException | ClassCastException e) { - Log_OC.e(TAG, "Couldn't disable activity for security key listener", e); - } - } - } catch (PackageManager.NameNotFoundException e) { - Log_OC.e(TAG, "Couldn't disable activities for security key listener", e); - } - - - securityKeyManager.init(this, configBuilder.build()); - } - public static void initContactsBackup(UserAccountManager accountManager, BackgroundJobManager backgroundJobManager) { ArbitraryDataProvider arbitraryDataProvider = new ArbitraryDataProviderImpl(appContext.get()); if (accountManager == null) { diff --git a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java index c4b1cc81d5..f68fb8e34e 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -146,10 +146,6 @@ import androidx.fragment.app.FragmentTransaction; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleEventObserver; import androidx.lifecycle.ProcessLifecycleOwner; -import de.cotech.hw.fido.WebViewFidoBridge; -import de.cotech.hw.fido.ui.FidoDialogOptions; -import de.cotech.hw.fido2.WebViewWebauthnBridge; -import de.cotech.hw.fido2.ui.WebauthnDialogOptions; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import okhttp3.FormBody; import okhttp3.RequestBody; @@ -230,9 +226,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity private GetServerInfoOperation.ServerInfo mServerInfo = new GetServerInfoOperation.ServerInfo(); /// Authentication PRE-Fragment elements - private WebViewFidoBridge webViewFidoU2fBridge; - private WebViewWebauthnBridge webViewWebauthnBridge; - private String mAuthStatusText = EMPTY_STRING; private int mAuthStatusIcon; @@ -521,19 +514,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity accountSetupWebviewBinding.loginWebview.getSettings().setSaveFormData(false); accountSetupWebviewBinding.loginWebview.getSettings().setSavePassword(false); - FidoDialogOptions.Builder dialogOptionsBuilder = FidoDialogOptions.builder(); - dialogOptionsBuilder.setShowSdkLogo(true); - dialogOptionsBuilder.setTheme(R.style.FidoDialog); - webViewFidoU2fBridge = WebViewFidoBridge.createInstanceForWebView( - this, accountSetupWebviewBinding.loginWebview, dialogOptionsBuilder); - - WebauthnDialogOptions.Builder webauthnOptionsBuilder = WebauthnDialogOptions.builder(); - webauthnOptionsBuilder.setShowSdkLogo(true); - webauthnOptionsBuilder.setAllowSkipPin(true); - webauthnOptionsBuilder.setTheme(R.style.FidoDialog); - webViewWebauthnBridge = WebViewWebauthnBridge.createInstanceForWebView( - this, accountSetupWebviewBinding.loginWebview, webauthnOptionsBuilder); - Map headers = new HashMap<>(); headers.put(RemoteOperation.OCS_API_HEADER, RemoteOperation.OCS_API_HEADER_VALUE); @@ -572,16 +552,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity accountSetupWebviewBinding.loginWebview.setWebViewClient(new NextcloudWebViewClient(getSupportFragmentManager()) { @Override public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { - webViewFidoU2fBridge.delegateShouldInterceptRequest(view, request); - webViewWebauthnBridge.delegateShouldInterceptRequest(view, request); return super.shouldInterceptRequest(view, request); } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); - webViewFidoU2fBridge.delegateOnPageStarted(view, url, favicon); - webViewWebauthnBridge.delegateOnPageStarted(view, url, favicon); } @Override diff --git a/app/src/main/res/layout/dialog_set_status.xml b/app/src/main/res/layout/dialog_set_status.xml index bd038a3dfe..878261f43e 100644 --- a/app/src/main/res/layout/dialog_set_status.xml +++ b/app/src/main/res/layout/dialog_set_status.xml @@ -75,7 +75,7 @@ android:layout_marginEnd="@dimen/standard_half_margin" android:contentDescription="@null" android:src="@drawable/online_status" - app:tint="@color/hwSecurityGreen" /> + app:tint="@color/online" /> #ffffff #ffffff #000000 + #2d7b41 #FFFFFF diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 4c15630851..76a8f30eb1 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -62,7 +62,6 @@ @@ -335,7 +334,6 @@ - - -