summaryrefslogtreecommitdiff
path: root/chromium/chrome/credential_provider
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/chrome/credential_provider
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/credential_provider')
-rw-r--r--chromium/chrome/credential_provider/gaiacp/BUILD.gn29
-rw-r--r--chromium/chrome/credential_provider/gaiacp/mojom/BUILD.gn11
-rw-r--r--chromium/chrome/credential_provider/gaiacp/mojom/gaia_credential_provider_win_hid.mojom26
-rw-r--r--chromium/chrome/credential_provider/test/BUILD.gn2
4 files changed, 63 insertions, 5 deletions
diff --git a/chromium/chrome/credential_provider/gaiacp/BUILD.gn b/chromium/chrome/credential_provider/gaiacp/BUILD.gn
index dc8054f7511..9b76575b5b7 100644
--- a/chromium/chrome/credential_provider/gaiacp/BUILD.gn
+++ b/chromium/chrome/credential_provider/gaiacp/BUILD.gn
@@ -17,6 +17,10 @@ import("//tools/grit/grit_rule.gni")
# This static library is shared with the setup program.
source_set("common") {
sources = [
+ "device_policies.cc",
+ "device_policies.h",
+ "device_policies_manager.cc",
+ "device_policies_manager.h",
"gcp_crash_reporter_client.cc",
"gcp_crash_reporter_client.h",
"gcp_crash_reporting_utils.cc",
@@ -25,12 +29,22 @@ source_set("common") {
"gcp_utils.h",
"gcpw_strings.cc",
"gcpw_strings.h",
+ "gcpw_version.cc",
+ "gcpw_version.h",
"logging.cc",
"logging.h",
"mdm_utils.cc",
"mdm_utils.h",
+ "os_user_manager.cc",
+ "os_user_manager.h",
"reg_utils.cc",
"reg_utils.h",
+ "user_policies.cc",
+ "user_policies.h",
+ "user_policies_manager.cc",
+ "user_policies_manager.h",
+ "win_http_url_fetcher.cc",
+ "win_http_url_fetcher.h",
]
public_configs = [ ":common_config" ]
public_deps = [ "//chrome/credential_provider/common:common_constants" ]
@@ -56,7 +70,9 @@ config("common_config") {
libs = [
"secur32.lib", # For LsaXXX functions
"wbemuuid.lib", # For CLSID_WbemLocator
+ "netapi32.lib", # For NetUserXXX()
"iphlpapi.lib", # For GetAdaptersInfo
+ "userenv.lib", # For GetUserProfileDirectoryW()
]
}
@@ -70,6 +86,8 @@ source_set("gaiacp_lib") {
"auth_utils.h",
"chrome_availability_checker.cc",
"chrome_availability_checker.h",
+ "credential_provider_broker_win.cc",
+ "credential_provider_broker_win.h",
"event_logging_api_manager.cc",
"event_logging_api_manager.h",
"event_logs_upload_manager.cc",
@@ -95,8 +113,6 @@ source_set("gaiacp_lib") {
"internet_availability_checker.h",
"os_process_manager.cc",
"os_process_manager.h",
- "os_user_manager.cc",
- "os_user_manager.h",
"password_recovery_manager.cc",
"password_recovery_manager.h",
"reauth_credential.cc",
@@ -107,8 +123,6 @@ source_set("gaiacp_lib") {
"scoped_user_profile.cc",
"scoped_user_profile.h",
"stdafx.h",
- "win_http_url_fetcher.cc",
- "win_http_url_fetcher.h",
]
public_configs = [ ":gaiacp_config" ]
public_deps = [ ":common" ]
@@ -119,6 +133,7 @@ source_set("gaiacp_lib") {
"//build:branding_buildflags",
"//chrome/common:non_code_constants",
"//chrome/common:version_header",
+ "//chrome/credential_provider/gaiacp/mojom",
"//chrome/installer/launcher_support",
"//components/crash/core/app:app",
"//components/crash/core/app:crash_export_thunks",
@@ -131,7 +146,11 @@ source_set("gaiacp_lib") {
} else {
deps += [ "//content/public/common:static_switches" ]
}
- libs = [ "wevtapi.lib" ]
+ libs = [
+ "hid.lib",
+ "setupapi.lib",
+ "wevtapi.lib",
+ ]
}
config("gaiacp_config") {
diff --git a/chromium/chrome/credential_provider/gaiacp/mojom/BUILD.gn b/chromium/chrome/credential_provider/gaiacp/mojom/BUILD.gn
new file mode 100644
index 00000000000..8b7e7fd0af7
--- /dev/null
+++ b/chromium/chrome/credential_provider/gaiacp/mojom/BUILD.gn
@@ -0,0 +1,11 @@
+# Copyright 2020 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("mojom") {
+ sources = [ "gaia_credential_provider_win_hid.mojom" ]
+
+ public_deps = [ "//mojo/public/mojom/base" ]
+}
diff --git a/chromium/chrome/credential_provider/gaiacp/mojom/gaia_credential_provider_win_hid.mojom b/chromium/chrome/credential_provider/gaiacp/mojom/gaia_credential_provider_win_hid.mojom
new file mode 100644
index 00000000000..2c29a257b2b
--- /dev/null
+++ b/chromium/chrome/credential_provider/gaiacp/mojom/gaia_credential_provider_win_hid.mojom
@@ -0,0 +1,26 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module gcpw_hid.mojom;
+
+import "mojo/public/mojom/base/string16.mojom";
+
+// This interface exposes a method to return the FIDO2 HID device
+// handle. This IPC is hosted by GaiaCredentialProvider
+// (aka GCPW) process and invoked via Chrome browser process.
+// The APIs for getting a FIDO2 HID device handle is only accessible
+// from privileged processes (GCPW runs with SYSTEM privilege).
+// Since Chrome shouldn't run with administrator privileges, this
+// interface is required to enable 2FA in GCPW login workflow.
+// For more details, look at go/gcpw-security-key-design.
+interface GaiaCredentialProviderHidBroker {
+ // Returns the device handle back to the caller for the
+ // corresponding input device path. Note: These devices
+ // are currently restricted to only FIDO2 devices. For
+ // any other device path, this method would return null.
+ // Note: This definition is exported to external clients and must
+ // remain backward incompatible indefinitely.
+ OpenDevice(mojo_base.mojom.String16 device_path)
+ => (handle<platform>? out_handle);
+};
diff --git a/chromium/chrome/credential_provider/test/BUILD.gn b/chromium/chrome/credential_provider/test/BUILD.gn
index 09eb1ea90a3..a9dd9bb6d38 100644
--- a/chromium/chrome/credential_provider/test/BUILD.gn
+++ b/chromium/chrome/credential_provider/test/BUILD.gn
@@ -8,12 +8,14 @@ import("//testing/test.gni")
test("gcp_unittests") {
sources = [
"../gaiacp/associated_user_validator_unittests.cc",
+ "../gaiacp/device_policies_manager_unittests.cc",
"../gaiacp/gaia_credential_base_unittests.cc",
"../gaiacp/gaia_credential_other_user_unittests.cc",
"../gaiacp/gaia_credential_provider_unittests.cc",
"../gaiacp/gaia_credential_unittests.cc",
"../gaiacp/gcp_utils_unittests.cc",
"../gaiacp/reauth_credential_unittests.cc",
+ "../gaiacp/user_policies_manager_unittests.cc",
"../gaiacp/win_http_url_fetcher_unittests.cc",
"com_fakes.cc",
"com_fakes.h",