1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/credential_provider/common/gcp_strings.h" 6 7 #include "build/branding_buildflags.h" 8 9 namespace credential_provider { 10 11 // Names of keys returned on json data from UI process. 12 const char kKeyEmail[] = "email"; 13 const char kKeyPicture[] = "picture"; 14 const char kKeyFullname[] = "full_name"; 15 const char kKeyId[] = "id"; 16 const char kKeyMdmUrl[] = "mdm_url"; 17 const char kKeyMdmIdToken[] = "mdm_id_token"; 18 const char kKeyPassword[] = "password"; 19 const char kKeyRefreshToken[] = "refresh_token"; 20 const char kKeyAccessToken[] = "access_token"; 21 const char kKeyMdmAccessToken[] = "mdm_access_token"; 22 const char kKeySID[] = "sid"; 23 const char kKeyTokenHandle[] = "token_handle"; 24 const char kKeyUsername[] = "user_name"; 25 const char kKeyDomain[] = "domain"; 26 const char kKeyExitCode[] = "exit_code"; 27 28 // AD attributes related to the device. 29 const char kKeyIsAdJoinedUser[] = "is_ad_joined_user"; 30 31 // Name of registry value that holds user properties. 32 const wchar_t kUserTokenHandle[] = L"th"; 33 const wchar_t kUserEmail[] = L"email"; 34 const wchar_t kUserId[] = L"id"; 35 const wchar_t kUserPictureUrl[] = L"pic"; 36 37 // Username and password key for special GAIA account to run GLS. 38 const wchar_t kDefaultGaiaAccountName[] = L"gaia"; 39 // L$ prefix means this secret can only be accessed locally. 40 const wchar_t kLsaKeyGaiaUsername[] = L"L$GAIA_USERNAME"; 41 const wchar_t kLsaKeyGaiaPassword[] = L"L$GAIA_PASSWORD"; 42 43 // These two variables need to remain consistent. 44 const wchar_t kDesktopName[] = L"Winlogon"; 45 const wchar_t kDesktopFullName[] = L"WinSta0\\Winlogon"; 46 47 // Google Update related registry paths. 48 #define GCPW_UPDATE_CLIENT_GUID L"{32987697-A14E-4B89-84D6-630D5431E831}" 49 50 const wchar_t kGcpwUpdateClientGuid[] = GCPW_UPDATE_CLIENT_GUID; 51 52 const wchar_t kRegUpdaterClientStateAppPath[] = 53 L"SOFTWARE\\Google\\Update\\ClientState\\" GCPW_UPDATE_CLIENT_GUID; 54 const wchar_t kRegUpdaterClientsAppPath[] = 55 L"SOFTWARE\\Google\\Update\\Clients\\" GCPW_UPDATE_CLIENT_GUID; 56 const wchar_t kRegUninstallStringField[] = L"UninstallString"; 57 const wchar_t kRegUninstallArgumentsField[] = L"UninstallArguments"; 58 const wchar_t kRegUsageStatsName[] = L"usagestats"; 59 const wchar_t kRegUpdateTracksName[] = L"ap"; 60 const wchar_t kRegVersionName[] = L"pv"; 61 62 const wchar_t kRegUninstall[] = 63 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; 64 const wchar_t kRegUninstallProduct[] = L"GCPW"; 65 const wchar_t kRegUninstallString[] = L"UninstallString"; 66 const wchar_t kRegUninstallDisplayName[] = L"DisplayName"; 67 const wchar_t kRegInstallLocation[] = L"InstallLocation"; 68 const wchar_t kRegDisplayIcon[] = L"DisplayIcon"; 69 const wchar_t kRegNoModify[] = L"NoModify"; 70 const wchar_t kRegNoRepair[] = L"NoRepair"; 71 const wchar_t kRegPublisherName[] = L"Publisher"; 72 const wchar_t kRegVersion[] = L"Version"; 73 const wchar_t kRegDisplayVersion[] = L"DisplayVersion"; 74 const wchar_t kRegInstallDate[] = L"InstallDate"; 75 const wchar_t kRegVersionMajor[] = L"VersionMajor"; 76 const wchar_t kRegVersionMinor[] = L"VersionMinor"; 77 const wchar_t kRegPublisher[] = L"Google LLC"; 78 79 // Chrome is being opened to show the credential provider logon page. This 80 // page is always shown in incognito mode. 81 const char kGcpwSigninSwitch[] = "gcpw-signin"; 82 83 // The email to use to prefill the Gaia signin page. 84 const char kPrefillEmailSwitch[] = "prefill-email"; 85 86 // Comma separated list of valid Gaia signin domains. If email that is signed 87 // into gaia is not part of these domains no LST will be minted and an error 88 // will be reported. 89 const char kEmailDomainsSwitch[] = "email-domains"; 90 91 // Expected gaia-id of user that will be signing into gaia. If the ids do not 92 // match after signin, no LST will be minted and an error will be reported. 93 const char kGaiaIdSwitch[] = "gaia-id"; 94 95 // Allows specification of the gaia endpoint to use to display the signin page 96 // for GCPW. 97 const char kGcpwEndpointPathSwitch[] = "gcpw-endpoint-path"; 98 99 // Allows specifying additional oauth scopes for the access token being passed 100 // to GCPW. 101 const char kGcpwAdditionalOauthScopes[] = "gcpw-additional-oauth-scopes"; 102 103 // The show_tos parameter is used to specify whether tos screen needs to be 104 // shown as part of the login process or not. 105 const char kShowTosSwitch[] = "show_tos"; 106 107 // Parameter appended to sign in URL to pass valid signin domains to the inline 108 // login handler. These domains are separated by ','. 109 const char kEmailDomainsSigninPromoParameter[] = "emailDomains"; 110 const char kEmailDomainsSeparator[] = ","; 111 const char kValidateGaiaIdSigninPromoParameter[] = "validate_gaia_id"; 112 const char kGcpwEndpointPathPromoParameter[] = "gcpw_endpoint_path"; 113 114 const wchar_t kRunAsCrashpadHandlerEntryPoint[] = L"RunAsCrashpadHandler"; 115 116 // Flags to manipulate behavior of Chrome when importing credentials for the 117 // account signs in through GCPW. 118 const wchar_t kAllowImportOnlyOnFirstRun[] = L"allow_import_only_on_first_run"; 119 const wchar_t kAllowImportWhenPrimaryAccountExists[] = 120 L"allow_import_when_primary_exists"; 121 122 #if BUILDFLAG(GOOGLE_CHROME_BRANDING) 123 const wchar_t kRegHkcuAccountsPath[] = L"Software\\Google\\Accounts"; 124 #else 125 const wchar_t kRegHkcuAccountsPath[] = L"Software\\Chromium\\Accounts"; 126 #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) 127 128 } // namespace credential_provider 129