preflight

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MOD float64 = 11

Select a MOD that will enable a proper dithering technique such as a proven cyclic group https://mathworld.wolfram.com/ModuloMultiplicationGroup.html

Functions

This section is empty.

Types

type PostPreflightHandler

type PostPreflightHandler struct {
	// contains filtered or unexported fields
}

func (*PostPreflightHandler) Boot

func (h *PostPreflightHandler) Boot() (err error)

func (*PostPreflightHandler) Handle

func (*PostPreflightHandler) Handles

type PreflightRequest

type PreflightRequest struct {
	OSBuild              string           `json:"os_build"`
	SantaVersion         string           `json:"santa_version"`
	Hostname             string           `json:"hostname"`
	OSVersion            string           `json:"os_version"`
	CertificateRuleCount int              `json:"certificate_rule_count"`
	BinaryRuleCount      int              `json:"binary_rule_count"`
	ClientMode           types.ClientMode `json:"client_mode"`
	SerialNumber         string           `json:"serial_num"`
	PrimaryUser          string           `json:"primary_user"`
	CompilerRuleCount    int              `json:"compiler_rule_count"`
	TransitiveRuleCount  int              `json:"transitive_rule_count"`
	CDHashRuleCount      int              `json:"cdhash_rule_count"`
	TeamIDRuleCount      int              `json:"teamid_rule_count"`
	SigningIDRuleCount   int              `json:"signingid_rule_count"`
	RequestCleanSync     bool             `json:"request_clean_sync"`
	ModelIdentifier      string           `json:"model_identifier"`
}

PreflightRequest represents sync payload sent to a sync server from a Santa client.

type PreflightResponse

type PreflightResponse struct {
	ClientMode               types.ClientMode `json:"client_mode"`
	BlockedPathRegex         string           `json:"blocked_path_regex"`
	AllowedPathRegex         string           `json:"allowed_path_regex"`
	BatchSize                int              `json:"batch_size"`
	EnableBundles            bool             `json:"enable_bundles"`
	EnabledTransitiveRules   bool             `json:"enable_transitive_rules"`
	FullSyncInterval         int              `json:"full_sync_interval,omitempty"`
	UploadLogsURL            string           `json:"upload_logs_url,omitempty"`
	BlockUsbMount            bool             `json:"block_usb_mount,omitempty"`
	RemountUsbMode           string           `json:"remount_usb_mode,omitempty"`
	SyncType                 types.SyncType   `json:"sync_type,omitempty"`
	OverrideFileAccessAction string           `json:"override_file_access_action,omitempty"`
}

PreflightResponse represents sync response returned to a Santa client by the sync server.

WARNING: The PreflightResponse copies its format directly from the database; make sure this struct's fields

are consistent with the fields of the store.MachineConfiguration type

Use Santa defined constants https://github.com/google/santa/blob/main/Source/santactl/Commands/sync/SNTCommandSyncConstants.m#L32-L35

func ConstructPreflightResponse

func ConstructPreflightResponse(machineConfiguration machineconfiguration.MachineConfiguration, cleanSync bool) *PreflightResponse

ConstructPreflightResponse converts a MachineConfiguration pulled from the database into the corresponding response to be return as an API response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL