mirror of
https://github.com/fleetdm/fleet
synced 2026-05-14 20:48:35 +00:00
For #32788. ## Testing - [X] Added/updated automated tests - [X] QA'd all new/changed functionality manually ## fleetd/orbit/Fleet Desktop - [X] Verified compatibility with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)) - [X] If the change applies to only one platform, confirmed that `runtime.GOOS` is used as needed to isolate changes - [x] Verified that fleetd runs on macOS, Linux and Windows - [X] Verified auto-update works from the released version of component to the new version (see [tools/tuf/test](../tools/tuf/test/README.md)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Enhanced Linux setup experience: persists status on disk, resumes automatically, and completes when software/scripts finish. - Opens the “My Device” page only when desktop is enabled, using a user-aware launcher on Linux. - Linux setup status now focuses on software progress for faster, clearer feedback. - Bug Fixes - Corrected auth/MDM checks: macOS requires Apple MDM; Linux no longer blocked by MDM configuration on shared endpoints. - Improved reliability and logging around software installation and temporary directory cleanup. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
89 lines
4.8 KiB
Go
89 lines
4.8 KiB
Go
package constant
|
|
|
|
import "time"
|
|
|
|
const (
|
|
// DefaultDirMode is the default file mode to apply to created directories.
|
|
DefaultDirMode = 0o755
|
|
// DefaultFileMode is the default file mode to apply to created files.
|
|
DefaultFileMode = 0o600
|
|
// DefaultWorldReadableFileMode is the default file mode to apply to files
|
|
// that can be read by other processes.
|
|
DefaultWorldReadableFileMode = 0o644
|
|
// DefaultSystemdUnitMode is the required file mode to systemd unit files.
|
|
DefaultSystemdUnitMode = DefaultWorldReadableFileMode
|
|
// DesktopAppExecName is the name of Fleet's Desktop executable.
|
|
//
|
|
// We use fleet-desktop as name to properly identify the process when listing
|
|
// running processes/tasks.
|
|
DesktopAppExecName = "fleet-desktop"
|
|
// DesktopTokenFileName is the filename on disk (in the orbit base dir) where we store the Fleet Desktop auth token
|
|
DesktopTokenFileName = "identifier"
|
|
// OrbitNodeKeyFileName is the filename on disk where we write the orbit node key to
|
|
OrbitNodeKeyFileName = "secret-orbit-node-key.txt"
|
|
// HardwareUUIDFileName is the filename on disk where we store the hardware UUID for migration detection
|
|
HardwareUUIDFileName = "hardware-uuid.txt"
|
|
// OrbitEnrollMaxRetries is the max number of retries when doing an enroll request.
|
|
// We set it to 6 to allow the retry backoff to take effect.
|
|
OrbitEnrollMaxRetries = 6
|
|
// OrbitEnrollBackoffMultiplier is the multiplier to use for backing off between enroll retries.
|
|
OrbitEnrollBackoffMultiplier = 2
|
|
// OrbitEnrollRetrySleep is the duration to sleep between enroll retries.
|
|
OrbitEnrollRetrySleep = 10 * time.Second
|
|
// OsqueryPidfile is the file containing the PID of the running osqueryd process
|
|
OsqueryPidfile = "osquery.pid"
|
|
// OsqueryEnrollSecretFileName is the filename on disk where we write
|
|
// the orbit enroll secret.
|
|
OsqueryEnrollSecretFileName = "secret.txt"
|
|
// SystemServiceName is the name of Orbit system service
|
|
// The service name is used by the OS service management framework
|
|
SystemServiceName = "Fleet osquery"
|
|
// FleetTLSClientCertificateFileName is the name of the TLS client certificate file
|
|
// used when connecting to the Fleet server.
|
|
FleetTLSClientCertificateFileName = "fleet_client.crt"
|
|
// FleetTLSClientKeyFileName is the name of the TLS client private key file
|
|
// used when connecting to the Fleet server.
|
|
FleetTLSClientKeyFileName = "fleet_client.key"
|
|
// UpdateTLSClientCertificateFileName is the name of the TLS client certificate file
|
|
// used when connecting to the update server.
|
|
UpdateTLSClientCertificateFileName = "update_client.crt"
|
|
// UpdateTLSClientKeyFileName is the name of the TLS client private key file
|
|
// used when connecting to the update server.
|
|
UpdateTLSClientKeyFileName = "update_client.key"
|
|
// SilenceEnrollLogErrorEnvVer is an environment variable name for disabling enroll log errors
|
|
SilenceEnrollLogErrorEnvVar = "FLEETD_SILENCE_ENROLL_ERROR"
|
|
// ServerOverridesFileName is the name of the file in the root directory
|
|
// that specifies the override configuration fetched from the server.
|
|
ServerOverridesFileName = "server-overrides.json"
|
|
// MigrationFileName is the name of the file used by fleetd to determine if the host is
|
|
// partially through an MDM migration.
|
|
MigrationFileName = "mdm_migration.txt"
|
|
// MDMMigrationTypeManual indicates that the MDM migration is for a manually enrolled host.
|
|
MDMMigrationTypeManual = "manual"
|
|
// MDMMigrationTypeADE indicates that the MDM migration is for an ADE enrolled host.
|
|
MDMMigrationTypeADE = "ade"
|
|
// MDMMigrationTypePreSonoma indicates that the MDM migration is for a host on a macOS version < 14.
|
|
MDMMigrationTypePreSonoma = "pre-sonoma"
|
|
// MDMMigrationOfflineWatcherInterval is the interval at which the offline watcher checks for
|
|
// the presence of the migration file.
|
|
MDMMigrationOfflineWatcherInterval = 3 * time.Minute
|
|
SonomaMajorVersion = 14
|
|
|
|
// OrbitTUFTargetName is the target name of the orbit component of fleetd in TUF.
|
|
OrbitTUFTargetName = "orbit"
|
|
// OsqueryTUFTargetName is the target name of the osquery component of fleetd in TUF.
|
|
OsqueryTUFTargetName = "osqueryd"
|
|
// DesktopTUFTargetName is the target name of the Fleet Desktop component of fleetd in TUF.
|
|
DesktopTUFTargetName = "desktop"
|
|
// FleetURLFileName is the file where Fleet URL is stored after being read from Apple config profile.
|
|
FleetURLFileName = "fleet_url.txt"
|
|
|
|
// SetupExperienceComplete is a file created when Linux (and soon Windows) completes setup experience
|
|
SetupExperienceFilename = "setup_experience.json"
|
|
|
|
FleetHTTPSignatureCertificateFileName = "host_identity.crt"
|
|
// FleetHTTPSignatureTPMKeyFileName is the filename for the TPM key used for HTTP signature authentication
|
|
FleetHTTPSignatureTPMKeyFileName = "host_identity_tpm.pem"
|
|
// FleetHTTPSignatureTPMKeyBackupFileName is the filename for the backup of the TPM key during renewal
|
|
FleetHTTPSignatureTPMKeyBackupFileName = "host_identity_tpm.old.pem"
|
|
)
|