#include "device/fido/features.h"
#include "base/feature_list.h"
#include "build/build_config.h"
namespace {
constexpr int kDefaultMaxRequests = 10;
constexpr int kDefaultWindowSeconds = 60;
constexpr int kDefaultImmediateMediationTimeoutMs = 500;
}
namespace device {
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OHOS)
BASE_FEATURE(kPasskeyUnlockManager, base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kPasskeyUnlockErrorUi, base::FEATURE_DISABLED_BY_DEFAULT);
constexpr base::FeatureParam<PasskeyUnlockErrorUiExperimentArm>::Option
kPasskeyUnlockErrorUiExperimentArms[] = {
{PasskeyUnlockErrorUiExperimentArm::kUnlock,
"text_with_unlock_wording"},
{PasskeyUnlockErrorUiExperimentArm::kGet, "text_with_get_wording"},
{PasskeyUnlockErrorUiExperimentArm::kVerify,
"text_with_verify_wording"},
};
constexpr base::FeatureParam<PasskeyUnlockErrorUiExperimentArm>
kPasskeyUnlockErrorUiExperimentArm{
&kPasskeyUnlockErrorUi, "passkey_unlock_ui_experiment_arm",
PasskeyUnlockErrorUiExperimentArm::kVerify,
&kPasskeyUnlockErrorUiExperimentArms};
#endif
#if BUILDFLAG(IS_WIN)
BASE_FEATURE(kWebAuthUseNativeWinApi,
"WebAuthenticationUseNativeWinApi",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
BASE_FEATURE(kWebAuthCableExtensionAnywhere,
"WebAuthenticationCableExtensionAnywhere",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnActorCheck, base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnICloudKeychainForGoogle,
"WebAuthenticationICloudKeychainForGoogle",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnICloudKeychainForActiveWithDrive,
"WebAuthenticationICloudKeychainForActiveWithDrive",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnICloudKeychainForActiveWithoutDrive,
"WebAuthenticationICloudKeychainForActiveWithoutDrive",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnICloudKeychainForInactiveWithDrive,
"WebAuthenticationICloudKeychainForInactiveWithDrive",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnICloudKeychainForInactiveWithoutDrive,
"WebAuthenticationICloudKeychainForInactiveWithoutDrive",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnUseInsecureSoftwareUnexportableKeys,
"WebAuthenticationUseInsecureSoftwareUnexportableKeys",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnEnclaveAuthenticatorDelay,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnAmbientSignin,
"WebAuthenticationAmbientSignin",
base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_ANDROID)
BASE_FEATURE(kWebAuthnPublishPrelinkingInfo,
"WebAuthenticationPublishPrelinkingInfo",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
BASE_FEATURE(kWebAuthnHelloSignal,
"WebAuthenticationHelloSignal",
base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_ANDROID)
BASE_FEATURE(kWebAuthnAndroidSignal,
"WebAuthenticationAndroidSignal",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
BASE_FEATURE(kDigitalCredentialsHybridLinking,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnPasskeyUpgrade,
"WebAuthenticationPasskeyUpgrade",
base::FEATURE_ENABLED_BY_DEFAULT
);
BASE_FEATURE(kWebAuthnEnclaveAttestation,
"WebAuthenticationEnclaveAttestation",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnMicrosoftSoftwareUnexportableKeyProvider,
"WebAuthenticationMicrosoftSoftwareUnexportableKeyProvider",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnSignalApiHidePasskeys,
"WebAuthenticationSignalApiHidePasskeys",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnImmediateRequestRateLimit,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE_PARAM(int,
kWebAuthnImmediateRequestRateLimitMaxRequests,
&kWebAuthnImmediateRequestRateLimit,
"max_requests",
kDefaultMaxRequests);
BASE_FEATURE_PARAM(int,
kWebAuthnImmediateRequestRateLimitWindowSeconds,
&kWebAuthnImmediateRequestRateLimit,
"window_seconds",
kDefaultWindowSeconds);
BASE_FEATURE(kWebAuthnImmediateGet,
"WebAuthenticationImmediateGet",
#if BUILDFLAG(IS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT);
#else
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
BASE_FEATURE_PARAM(int,
kWebAuthnImmediateMediationTimeoutMilliseconds,
&kWebAuthnImmediateGet,
"timeout_ms",
kDefaultImmediateMediationTimeoutMs);
BASE_FEATURE(kWebAuthnImmediateGetAutoselect,
"WebAuthenticationImmediateGetAutoselect",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnLargeBlobForGPM,
"WebAuthenticationLargeBlobGPM",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnSendPinGeneration,
"WebAuthenticationSendPinGeneration",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnWrapCohortData,
"WebAuthenticationWrapCohortData",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kAuthenticatorPasswordsOnlyImmediateRequests,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnNewRefreshFlow,
"WebAuthenticationNewRefreshFlow",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthenticationFixWindowsHelloRdp,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthenticationHashClientDataJsonForEnclave,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnOpportunisticRetrieval, base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthenticationWindowsHints, base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebAuthnEnableRefreshingStateOfGpmEnclaveController,
base::FEATURE_ENABLED_BY_DEFAULT);
}