chromium/components/policy/core/common/cloud/cloud_policy_constants.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/policy/core/common/cloud/cloud_policy_constants.h"

#include <stdint.h>

#include "base/command_line.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/policy/core/common/policy_switches.h"

namespace policy {

// Constants related to the device management protocol.
namespace dm_protocol {

// Name constants for URL query parameters.
const char kParamAgent[] =;
const char kParamAppType[] =;
const char kParamCritical[] =;
const char kParamDeviceID[] =;
const char kParamDeviceType[] =;
const char kParamLastError[] =;
const char kParamOAuthToken[] =;
const char kParamPlatform[] =;
const char kParamRequest[] =;
const char kParamRetry[] =;
const char kParamProfileID[] =;

// Policy constants used in authorization header.
const char kAuthHeader[] =;
const char kServiceTokenAuthHeaderPrefix[] =;
const char kDMTokenAuthHeaderPrefix[] =;
const char kEnrollmentTokenAuthHeaderPrefix[] =;
const char kOAuthTokenHeaderPrefix[] =;
const char kOidcAuthHeaderPrefix[] =;
const char kOidcAuthTokenHeaderPrefix[] =;
const char kOidcIdTokenHeaderPrefix[] =;

// String constants for the device and app type we report to the server.
const char kValueAppType[] =;
const char kValueBrowserUploadPublicKey[] =;
const char kValueDeviceType[] =;
const char kValueRequestAutoEnrollment[] =;
const char kValueRequestPsmHasDeviceState[] =;
const char kValueCheckUserAccount[] =;
const char kValueRequestPolicy[] =;
const char kValueRequestRegister[] =;
const char kValueRequestRegisterProfile[] =;
const char kValueRequestApiAuthorization[] =;
const char kValueRequestUnregister[] =;
const char kValueRequestUploadCertificate[] =;
const char kValueRequestUploadEuiccInfo[] =;
const char kValueRequestDeviceStateRetrieval[] =;
const char kValueRequestUploadStatus[] =;
const char kValueRequestRemoteCommands[] =;
const char kValueRequestDeviceAttributeUpdatePermission[] =;
const char kValueRequestDeviceAttributeUpdate[] =;
const char kValueRequestGcmIdUpdate[] =;
const char kValueRequestCheckAndroidManagement[] =;
const char kValueRequestCertBasedRegister[] =;
const char kValueRequestTokenBasedRegister[] =;
const char kValueRequestActiveDirectoryEnrollPlayUser[] =;
const char kValueRequestActiveDirectoryPlayActivity[] =;
const char kValueRequestAppInstallReport[] =;
const char kValueRequestRegisterBrowser[] =;
const char kValueRequestRegisterPolicyAgent[] =;
const char kValueRequestChromeDesktopReport[] =;
const char kValueRequestChromeOsUserReport[] =;
const char kValueRequestInitialEnrollmentStateRetrieval[] =;
const char kValueRequestUploadPolicyValidationReport[] =;
const char kValueRequestPublicSamlUser[] =;
const char kValueRequestCertProvisioningRequest[] =;
const char kValueRequestChromeProfileReport[] =;
const char kValueRequestFmRegistrationTokenUpload[] =;

const char kChromeDevicePolicyType[] =;
#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kChromeUserPolicyType[] = "google/chromeos/user";
#elif BUILDFLAG(IS_ANDROID)
const char kChromeUserPolicyType[] = "google/android/user";
#elif BUILDFLAG(IS_IOS)
const char kChromeUserPolicyType[] = "google/ios/user";
#else
const char kChromeUserPolicyType[] =;
#endif
const char kChromePublicAccountPolicyType[] =;
const char kChromeExtensionPolicyType[] =;
const char kChromeSigninExtensionPolicyType[] =;

const char kChromeMachineLevelUserCloudPolicyType[] ="google/chrome/machine-level-user-android";
#elif BUILDFLAG(IS_IOS)
    "google/chrome/machine-level-user-ios";
#else
    "google/chrome/machine-level-user";
#endif
const char kChromeMachineLevelExtensionCloudPolicyType[] =;
const char kChromeRemoteCommandPolicyType[] =;

// A policy type which is expanded to google/machine-level-omaha,
// google/chrome/machine-level-user, and google/chrome/machine-level-extension
// on the server side. This type is used by policy agents (i.e. GoogleUpdater
// and Chrome Enterprise Companion App) on Linux, Mac, and Windows.
// TODO(b/361632880): Consider removing this if google/machine-level-omaha can
// be requested directly.
const char kGoogleUpdateMachineLevelAppsPolicyType[] =;

const char kGoogleUpdateMachineLevelOmahaPolicyType[] =;

const char kChromeAshUserRemoteCommandType[] =;
const char kChromeDeviceRemoteCommandType[] =;
const char kChromeBrowserRemoteCommandType[] =;
const char kChromeUserRemoteCommandType[] =;

const char kChromeMachineLevelUserCloudPolicyTypeBase64[] =;

}  // namespace dm_protocol

const uint8_t kPolicyVerificationKey[] =;

const char kPolicyVerificationKeyHash[] =;

const char kDemoModeDomain[] =;

std::string GetPolicyVerificationKey() {}
// Notes from the past: When the key is rotated in the future, the old one may
// still worth being kept to verified any existing policy cache so that browser
// can load it one last time. However, it really depends on the reason of the
// rotation. From a different angle, if a key is no longer trusted, so should
// anything bound to it.

}  // namespace policy