mdm

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalCommandPayload

func MarshalCommandPayload(cmd *CommandPayload) ([]byte, error)

func UnmarshalCommandPayload

func UnmarshalCommandPayload(data []byte, payload *CommandPayload) error

Types

type AccountConfiguration

type AccountConfiguration struct {
	SkipPrimarySetupAccountCreation     bool           `plist:",omitempty" json:"skip_primary_setup_account_creation,omitempty"`
	SetPrimarySetupAccountAsRegularUser bool           `plist:",omitempty" json:"set_primary_setup_account_as_regular_user,omitempty"`
	DontAutoPopulatePrimaryAccountInfo  bool           `plist:",omitempty" json:"dont_auto_populate_primary_account_info,omitempty"`
	LockPrimaryAccountInfo              bool           `plist:",omitempty" json:"lock_primary_account_info,omitempty"`
	PrimaryAccountFullName              string         `plist:",omitempty" json:"primary_account_full_name,omitempty"`
	PrimaryAccountUserName              string         `plist:",omitempty" json:"primary_account_user_name,omitempty"`
	AutoSetupAdminAccounts              []AdminAccount `plist:",omitempty" json:"auto_setup_admin_accounts,omitempty"`
}

type ActiveNSExtensions

type ActiveNSExtensions struct {
	FilterExtensionPoints []string `plist:",omitempty" json:"filter_extensions_points,omitempty"`
}

type AdminAccount

type AdminAccount struct {
	ShortName    string `plist:"shortName" json:"short_name"`
	FullName     string `plist:"fullName,omitempty" json:"full_name,omitempty"`
	PasswordHash []byte `plist:"passwordHash" json:"password_hash"`
	Hidden       bool   `plist:"hidden,omitempty" json:"hidden,omitempty"`
}

type ApplyRedemptionCode

type ApplyRedemptionCode struct {
	Identifier     string `plist:",omitempty" json:"identifier,omitempty"`
	RedemptionCode string `plist:",omitempty" json:"redemption_code,omitempty"`
}

type ClearPasscode

type ClearPasscode struct {
	UnlockToken []byte `json:"unlock_token"`
}

type Command

type Command struct {
	RequestType                     string `json:"request_type"`
	InstallProfile                  *InstallProfile
	RemoveProfile                   *RemoveProfile
	InstallProvisioningProfile      *InstallProvisioningProfile
	RemoveProvisioningProfile       *RemoveProvisioningProfile
	InstalledApplicationList        *InstalledApplicationList
	DeviceInformation               *DeviceInformation
	DeviceLock                      *DeviceLock
	ClearPasscode                   *ClearPasscode
	EraseDevice                     *EraseDevice
	RequestMirroring                *RequestMirroring
	Restrictions                    *Restrictions
	UnlockUserAccount               *UnlockUserAccount
	DeleteUser                      *DeleteUser
	EnableLostMode                  *EnableLostMode
	InstallApplication              *InstallApplication
	InstallEnterpriseApplication    *InstallEnterpriseApplication
	AccountConfiguration            *AccountConfiguration
	ApplyRedemptionCode             *ApplyRedemptionCode
	ManagedApplicationList          *ManagedApplicationList
	RemoveApplication               *RemoveApplication
	InviteToProgram                 *InviteToProgram
	ValidateApplications            *ValidateApplications
	InstallMedia                    *InstallMedia
	RemoveMedia                     *RemoveMedia
	Settings                        *Settings
	ManagedApplicationConfiguration *ManagedApplicationConfiguration
	ManagedApplicationAttributes    *ManagedApplicationAttributes
	ManagedApplicationFeedback      *ManagedApplicationFeedback
	SetFirmwarePassword             *SetFirmwarePassword
	VerifyFirmwarePassword          *VerifyFirmwarePassword
	SetRecoveryLock                 *SetRecoveryLock
	VerifyRecoveryLock              *VerifyRecoveryLock
	SetAutoAdminPassword            *SetAutoAdminPassword
	ScheduleOSUpdate                *ScheduleOSUpdate
	ScheduleOSUpdateScan            *ScheduleOSUpdateScan
	ActiveNSExtensions              *ActiveNSExtensions
	RotateFileVaultKey              *RotateFileVaultKey
}

func (*Command) MarshalJSON

func (c *Command) MarshalJSON() ([]byte, error)

func (*Command) MarshalPlist

func (c *Command) MarshalPlist() (interface{}, error)

func (*Command) UnmarshalJSON

func (c *Command) UnmarshalJSON(data []byte) error

func (*Command) UnmarshalPlist

func (c *Command) UnmarshalPlist(unmarshal func(i interface{}) error) error

type CommandPayload

type CommandPayload struct {
	CommandUUID string   `json:"command_uuid"`
	Command     *Command `json:"command"`
}

func NewCommandPayload

func NewCommandPayload(request *CommandRequest) (*CommandPayload, error)

type CommandRequest

type CommandRequest struct {
	UDID        string `json:"udid"`
	CommandUUID string `json:"command_uuid"`
	*Command
}

func (*CommandRequest) UnmarshalJSON

func (c *CommandRequest) UnmarshalJSON(data []byte) error

type DeleteUser

type DeleteUser struct {
	UserName      string `plist:",omitempty" json:"username,omitempty"`
	ForceDeletion bool   `plist:",omitempty" json:"force_deletion,omitempty"`
}

type DeviceInformation

type DeviceInformation struct {
	Queries []string `plist:",omitempty" json:"queries,omitempty"`
}

type DeviceLock

type DeviceLock struct {
	PIN         string `plist:",omitempty" json:"pin"`
	Message     string `plist:",omitempty" json:"message,omitempty"`
	PhoneNumber string `plist:",omitempty" json:"phone_number,omitempty"`
}

type EnableLostMode

type EnableLostMode struct {
	Message     string `plist:",omitempty" json:"message,omitempty"`
	PhoneNumber string `plist:",omitempty" json:"phone_number,omitempty"`
	Footnote    string `plist:",omitempty" json:"footnote,omitempty"`
}

type EraseDevice

type EraseDevice struct {
	PIN                    string `json:"pin"`
	PreserveDataPlan       bool   `plist:",omitempty" json:"preserve_data_plan,omitempty"`
	DisallowProximitySetup bool   `plist:",omitempty" json:"disallow_proximity_setup,omitempty"`
}

type FileVaultUnlock

type FileVaultUnlock struct {
	Password                 string `plist:",omitempty" json:"password,omitempty"`
	PrivateKeyExport         []byte `plist:",omitempty" json:"private_key_export,omitempty"`
	PrivateKeyExportPassword string `plist:",omitempty" json:"private_key_export_password,omitempty"`
}

type InstallApplication

type InstallApplication struct {
	ITunesStoreID         *int64                           `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"`
	Identifier            *string                          `plist:",omitempty" json:"identifier,omitempty"`
	ManagementFlags       *int                             `plist:",omitempty" json:"management_flags,omitempty"`
	ChangeManagementState *string                          `plist:",omitempty" json:"change_management_state,omitempty"`
	ManifestURL           *string                          `plist:",omitempty" json:"manifest_url,omitempty"`
	Options               *InstallApplicationOptions       `plist:"Options,omitempty" json:"options,omitempty"`
	Configuration         *InstallApplicationConfiguration `plist:",omitempty" json:"configuration,omitempty"`
	Attributes            *InstallApplicationAttributes    `plist:",omitempty" json:"attributes,omitempty"`
}

type InstallApplicationAttributes

type InstallApplicationAttributes struct{}

type InstallApplicationConfiguration

type InstallApplicationConfiguration struct{}

type InstallApplicationOptions

type InstallApplicationOptions struct {
	PurchaseMethod *int64 `plist:"PurchaseMethod,omitempty" json:"purchase_method,omitempty"`
}

type InstallEnterpriseApplication added in v1.3.1

type InstallEnterpriseApplication struct {
	Manifest                       *appmanifest.Manifest `plist:",omitempty" json:"manifest,omitempty"`
	ManifestURL                    *string               `plist:",omitempty" json:"manifest_url,omitempty"`
	ManifestURLPinningCerts        [][]byte              `plist:",omitempty" json:"manifest_url_pinning_certs,omitempty"`
	PinningRevocationCheckRequired *bool                 `plist:",omitempty" json:"pinning_revocation_check_required,omitempty"`
}

type InstallMedia

type InstallMedia struct {
	ITunesStoreID *int64 `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"`
	MediaURL      string `plist:",omitempty" json:"media_url,omitempty"`
	MediaType     string `plist:",omitempty" json:"media_type,omitempty"`
}

type InstallProfile

type InstallProfile struct {
	Payload []byte `json:"payload,omitempty"`
}

InstallProfile is an InstallProfile MDM Command

type InstallProvisioningProfile

type InstallProvisioningProfile struct {
	ProvisioningProfile []byte `plist:",omitempty" json:"provisioning_profile,omitempty"`
}

type InstalledApplicationList

type InstalledApplicationList struct {
	Identifiers     []string `plist:",omitempty" json:"identifiers,omitempty"`
	ManagedAppsOnly bool     `plist:",omitempty" json:"managed_appd_only,omitempty"`
}

type InviteToProgram

type InviteToProgram struct {
	ProgramID     string `plist:",omitempty" json:"program_id,omitempty"`
	InvitationURL string `plist:",omitempty" json:"invitation_url,omitempty"`
}

type ManagedApplicationAttributes

type ManagedApplicationAttributes struct {
	Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}

type ManagedApplicationConfiguration

type ManagedApplicationConfiguration struct {
	Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}

type ManagedApplicationFeedback

type ManagedApplicationFeedback struct {
	Identifiers    []string `plist:",omitempty" json:"identifiers,omitempty"`
	DeleteFeedback bool     `plist:",omitempty" json:"delete_feedback,omitempty"`
}

type ManagedApplicationList

type ManagedApplicationList struct {
	Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}

type OSUpdate

type OSUpdate struct {
	ProductKey       string `plist:",omitempty" json:"product_key,omitempty"`
	InstallAction    string `json:"install_action"`
	MaxUserDeferrals *int64 `plist:",omitempty" json:"max_user_deferrals,omitempty"`
	ProductVersion   string `plist:",omitempty" json:"product_version,omitempty"`
}

type RemoveApplication

type RemoveApplication struct {
	Identifier string `plist:",omitempty" json:"identifier,omitempty"`
}

type RemoveMedia

type RemoveMedia struct {
	ITunesStoreID *int64 `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"`
	MediaType     string `plist:",omitempty" json:"media_type,omitempty"`
	PersistentID  string `plist:",omitempty" json:"persistent_id,omitempty"`
}

type RemoveProfile

type RemoveProfile struct {
	Identifier string `json:"identifier,omitempty"`
}

type RemoveProvisioningProfile

type RemoveProvisioningProfile struct {
	UUID string `json:"uuid"`
}

type RequestMirroring

type RequestMirroring struct {
	DestinationName     string `plist:",omitempty" json:"destination_name,omitempty"`
	DestinationDeviceID string `plist:",omitempty" json:"destination_device_id,omitempty"`
	ScanTime            string `plist:",omitempty" json:"scan_time,omitempty"`
	Password            string `plist:",omitempty" json:"password,omitempty"`
}

type Restrictions

type Restrictions struct {
	ProfileRestrictions bool `json:"profile_restrictions"`
}

type RotateFileVaultKey

type RotateFileVaultKey struct {
	KeyType                    string          `plist:",omitempty" json:"key_type,omitempty"`
	FileVaultUnlock            FileVaultUnlock `plist:",omitempty" json:"filevault_unlock,omitempty"`
	NewCertificate             []byte          `plist:",omitempty" json:"new_certificate,omitempty"`
	ReplyEncryptionCertificate []byte          `plist:",omitempty" json:"reply_encryption_certificate,omitempty"`
}

type ScheduleOSUpdate

type ScheduleOSUpdate struct {
	Updates []OSUpdate `plist:",omitempty" json:"updates,omitempty"`
}

type ScheduleOSUpdateScan

type ScheduleOSUpdateScan struct {
	Force bool `plist:",omitempty" json:"force,omitempty"`
}

type SetAutoAdminPassword

type SetAutoAdminPassword struct {
	GUID         string `plist:",omitempty" json:"guid,omitempty"`
	PasswordHash []byte `plist:"passwordHash" json:"password_hash"`
}

type SetFirmwarePassword

type SetFirmwarePassword struct {
	CurrentPassword              string `plist:",omitempty" json:"current_password,omitempty"`
	NewPassword                  string `json:"new_password"`
	RequestRequiresNetworkTether bool   `plist:",omitempty" json:"request_requires_network_tether,omitempty"`
	AllowOroms                   bool   `plist:",omitempty" json:"allow_oroms,omitempty"`
}

type SetRecoveryLock added in v1.9.0

type SetRecoveryLock struct {
	CurrentPassword              string `plist:",omitempty" json:"current_password,omitempty"`
	NewPassword                  string `json:"new_password"`
	RequestRequiresNetworkTether bool   `plist:",omitempty" json:"request_requires_network_tether,omitempty"`
	AllowOroms                   bool   `plist:",omitempty" json:"allow_oroms,omitempty"`
}

type Setting

type Setting struct {
	Item                    string                 `json:"item"`
	Enabled                 *bool                  `plist:",omitempty" json:"enabled,omitempty"`
	DeviceName              *string                `plist:",omitempty" json:"device_name,omitempty"`
	HostName                *string                `plist:",omitempty" json:"hostname,omitempty"`
	Identifier              *string                `plist:",omitempty" json:"identifier"`
	TimeZone                *string                `plist:",omitempty" json:"time_zone,omitempty"`
	Attributes              map[string]string      `plist:",omitempty" json:"attributes,omitempty"`
	Image                   []byte                 `plist:",omitempty" json:"image,omitempty"`
	Where                   *int                   `plist:",omitempty" json:"where,omitempty"`
	MDMOptions              map[string]interface{} `plist:",omitempty" json:"mdm_options,omitempty"`
	PasscodeLockGracePeriod *int                   `plist:",omitempty" json:"passcode_lock_grace_period,omitempty"`
	MaximumResidentUsers    *int                   `plist:",omitempty" json:"maximum_resident_users,omitempty"`
	Configuration           map[string]interface{} `plist:",omitempty" json:"-"`
	ConfigurationData       []byte                 `plist:"-" json:"configuration"` // used to build the dictionary
}

type Settings

type Settings struct {
	Settings []Setting `plist:",omitempty" json:"settings,omitempty"`
}

type UnlockUserAccount

type UnlockUserAccount struct {
	UserName string `json:"username"`
}

type ValidateApplications

type ValidateApplications struct {
	Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}

type VerifyFirmwarePassword

type VerifyFirmwarePassword struct {
	Password string `json:"password"`
}

type VerifyRecoveryLock added in v1.9.0

type VerifyRecoveryLock struct {
	Password string `json:"password"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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