Documentation ¶
Overview ¶
Package mdm is a library for managing MDM Command Payloads and responses.
Index ¶
- type AccountConfiguration
- type AdminAccount
- type ApplicationConfiguration
- type ApplyRedemptionCode
- type AtvQueryResponses
- type AvailableOSUpdatesResponse
- type AvailableOSUpdatesResponseItem
- type CertificateList
- type CertificateListItem
- type CheckinCommand
- type ClearPasscode
- type Command
- type CommandRequest
- type CommonQueryResponses
- type DEPEnrollmentRequest
- type DeleteUser
- type DeviceInformation
- type DeviceLock
- type EnableLostMode
- type EraseDevice
- type ErrorChain
- type ErrorChainItem
- type InstallApplication
- type InstallApplicationConfiguration
- type InstallApplicationOptions
- type InstallMedia
- type InstallProfile
- type InstallProvisioningProfile
- type InstalledApplicationList
- type InstalledApplicationListItem
- type InstalledApplicationListResponse
- type InviteToProgram
- type IosQueryResponses
- type MCAPNErrorDomain
- type MCCertificateErrorDomain
- type MCDefaultsErrorDomain
- type MCEmailErrorDomain
- type MCInstallationErrorDomain
- type MCKeychainErrorDomain
- type MCMDMErrorDomain
- type MCPasscodeErrorDomain
- type MCPayloadErrorDomain
- type MCProfileErrorDomain
- type MCRestrictionsErrorDomain
- type MCWebClipErrorDomain
- type MacosQueryResponses
- type ManagedApplicationAttributes
- type ManagedApplicationConfiguration
- type ManagedApplicationFeedback
- type ManagedApplicationList
- type NSPOSIXErrorDomain
- type OSUpdate
- type OSUpdateSettingsResponse
- type OSUpdateStatusResponse
- type OSUpdateStatusResponseItem
- type Payload
- type PayloadContentItem
- type ProfileList
- type ProfileListItem
- type ProvisioningProfileListItem
- type ProvisioningProfileListResponse
- type QueryResponses
- type RemoveApplication
- type RemoveMedia
- type RemoveProfile
- type RemoveProvisioningProfile
- type RequestMirroring
- type RequestMirroringResponse
- type Response
- type Restrictions
- type ScheduleOSUpdate
- type ScheduleOSUpdateScan
- type ScheduleOSUpdateScanResponse
- type SecurityInfo
- type Setting
- type Settings
- type UsersListItem
- type UsersListResponse
- type ValidateApplications
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountConfiguration ¶
type AccountConfiguration struct { SkipPrimarySetupAccountCreation bool `plist:",omitempty" json:"skip_primary_setup_account_creation,omitempty"` SetPrimarySetupAccountAsRegularUser bool `plist:",omitempty" json:"skip_primary_setup_account_as_regular_user,omitempty"` AutoSetupAdminAccounts []AdminAccount `plist:",omitempty" json:"auto_setup_admin_accounts,omitempty"` }
AccountConfiguration is an MDM command to create a primary user on OS X It allows skipping the UI to set up a user.
type AdminAccount ¶
type AdminAccount struct { ShortName string `plist:"shortName" json:"short_name"` FullName string `plist:"fullName,omitempty" json:"full_name,omitempty"` PasswordHash data `plist:"passwordHash" json:"password_hash"` Hidden bool `plist:"hidden,omitempty" json:"hidden,omitempty"` }
AdminAccount is the configuration for the Admin account created during Setup Assistant
type ApplyRedemptionCode ¶
type AtvQueryResponses ¶
type AtvQueryResponses struct { }
AtvQueryResponses contains AppleTV QueryResponses
type AvailableOSUpdatesResponse ¶
type AvailableOSUpdatesResponse []AvailableOSUpdatesResponseItem
type AvailableOSUpdatesResponseItem ¶
type AvailableOSUpdatesResponseItem struct { ProductKey string `json:"product_key"` HumanReadableName string `json:"human_readable_name"` ProductName string `json:"product_name"` Version string `json:"version"` Build string `json:"build"` DownloadSize int `json:"download_size"` InstallSize float64 `json:"install_size"` // Each entry represents an app identifier that is closed to install this update (macOS only). AppIdentifiersToClose []string `json:"app_identifiers_to_close"` IsCritical bool `json:"is_critical"` IsConfigurationDataUpdate bool `json:"is_configuration_data_update"` IsFirmwareUpdate bool `json:"is_firmware_update"` RestartRequired bool `json:"restart_required"` AllowsInstallLater bool `json:"allows_install_later"` }
type CertificateList ¶
type CertificateList []CertificateListItem
CertificateList is the CertificateList MDM Command Response
type CertificateListItem ¶
type CheckinCommand ¶
type CheckinCommand struct { // MessageType can be either Authenticate, // TokenUpdate or CheckOut MessageType string Topic string UDID string // contains filtered or unexported fields }
CheckinCommand represents an MDM checkin command struct
type ClearPasscode ¶
type ClearPasscode struct {
UnlockToken []byte `plist:",omitempty" json:"unlock_token,omitempty"`
}
type Command ¶
type Command struct { RequestType string `json:"request_type"` DeviceInformation InstallApplication AccountConfiguration ScheduleOSUpdateScan ScheduleOSUpdate InstallProfile RemoveProfile InstallProvisioningProfile RemoveProvisioningProfile InstalledApplicationList DeviceLock ClearPasscode EraseDevice RequestMirroring DeleteUser EnableLostMode ApplyRedemptionCode InstallMedia RemoveMedia Settings }
func (*Command) MarshalPlist ¶
type CommandRequest ¶
CommandRequest represents an MDM command request
func (*CommandRequest) UnmarshalJSON ¶
func (c *CommandRequest) UnmarshalJSON(d []byte) error
type CommonQueryResponses ¶
type CommonQueryResponses struct { UDID string `json:"udid"` Languages []string `json:"languages,omitempty"` // ATV 6+ Locales []string `json:"locales,omitempty"` // ATV 6+ DeviceID string `json:"device_id"` // ATV 6+ OrganizationInfo map[string]string `json:"organization_info,omitempty"` // IOS 7+ LastCloudBackupDate time.Time `json:"last_cloud_backup_date,omitempty"` // IOS 8+ AwaitingConfiguration bool `json:"awaiting_configuration"` // IOS 9+ // iTunes ITunesStoreAccountIsActive bool `json:"itunes_store_account_is_active"` // IOS 7+ OSX 10.9+ ITunesStoreAccountHash string `json:"itunes_store_account_hash"` // IOS 8+ OSX 10.10+ // Device DeviceName string `json:"device_name"` OSVersion string `json:"os_version"` BuildVersion string `json:"build_version"` ModelName string `json:"model_name"` Model string `json:"model"` ProductName string `json:"product_name"` SerialNumber string `json:"serial_number"` DeviceCapacity float32 `json:"device_capacity"` AvailableDeviceCapacity float32 `json:"available_device_capacity"` BatteryLevel float32 `json:"battery_level,omitempty"` // IOS 5+ CellularTechnology int `json:"cellular_technology,omitempty"` // IOS 4+ IsSupervised bool `json:"is_supervised"` // IOS 6+ IsDeviceLocatorServiceEnabled bool `json:"is_device_locator_service_enabled"` // IOS 7+ IsActivationLockEnabled bool `json:"is_activation_lock_enabled"` // IOS 7+ OSX 10.9+ IsDoNotDisturbInEffect bool `json:"is_dnd_in_effect"` // IOS 7+ EASDeviceIdentifier string `json:"eas_device_identifier"` // IOS 7 OSX 10.9 IsCloudBackupEnabled bool `json:"is_cloud_backup_enabled"` // IOS 7.1 // Network BluetoothMAC string `json:"bluetooth_mac"` WiFiMAC string `json:"wifi_mac"` EthernetMACs []string `json:"ethernet_macs"` // Surprisingly works in IOS }
CommonQueryResponses has a list of query responses common to all device types
type DEPEnrollmentRequest ¶
type DEPEnrollmentRequest struct { Language string `plist:"LANGUAGE"` Product string `plist:"PRODUCT"` Serial string `plist:"SERIAL"` UDID string `plist:"UDID"` Version string `plist:"VERSION"` IMEI string `plist:"IMEI,omitempty"` MEID string `plist:"MEID,omitempty"` }
DEPEnrollmentRequest is a request sent by the device to an MDM server during DEP Enrollment
type DeleteUser ¶
type DeviceInformation ¶
type DeviceInformation struct {
Queries []string `plist:",omitempty" json:"queries,omitempty"`
}
DeviceInformation is a DeviceInformation MDM Command
type DeviceLock ¶
type EnableLostMode ¶
type EraseDevice ¶
type EraseDevice struct {
PIN string `plist:",omitempty" json:"pin,omitempty"`
}
type ErrorChain ¶
type ErrorChain []ErrorChainItem
type ErrorChainItem ¶
type ErrorChainItem struct { ErrorCode int `json:"error_code,omitempty"` ErrorDomain string `json:"error_domain,omitempty"` LocalizedDescription string `json:"localized_description,omitempty"` USEnglishDescription string `json:"us_english_description,omitempty"` }
Represents a single error in the error chain response
type InstallApplication ¶
type InstallApplication struct { ITunesStoreID int `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"` Identifier string `plist:",omitempty" json:"identifier,omitempty"` ManifestURL string `plist:",omitempty" json:"manifest_url,omitempty"` ManagementFlags int `plist:",omitempty" json:"management_flags,omitempty"` NotManaged bool `plist:",omitempty" json:"not_managed,omitempty"` ChangeManagementState string `plist:",omitempty" json:"change_management_state,omitempty"` Options *InstallApplicationOptions `plist:",omitempty" json:"options,omitempty"` }
InstallApplication is an InstallApplication MDM Command
type InstallApplicationConfiguration ¶
type InstallApplicationConfiguration struct { }
type InstallMedia ¶
type InstallProfile ¶
type InstallProfile struct {
Payload []byte `plist:",omitempty" json:"payload,omitempty"`
}
InstallProfile is an InstallProfile MDM Command
type InstallProvisioningProfile ¶
type InstallProvisioningProfile struct {
ProvisioningProfile []byte `plist:",omitempty" json:"provisioning_profile,omitempty"`
}
type InstalledApplicationListItem ¶
type InstalledApplicationListItem struct { Identifier string `plist:",omitempty" json:"identifier,omitempty"` Version string `plist:",omitempty" json:"version,omitempty"` ShortVersion string `plist:",omitempty" json:"short_version,omitempty"` Name string `json:"name,omitempty"` BundleSize uint32 `plist:",omitempty" json:"bundle_size,omitempty"` DynamicSize uint32 `plist:",omitempty" json:"dynamic_size,omitempty"` IsValidated bool `plist:",omitempty" json:"is_validated,omitempty"` }
type InstalledApplicationListResponse ¶
type InstalledApplicationListResponse []InstalledApplicationListItem
type InviteToProgram ¶
type IosQueryResponses ¶
type IosQueryResponses struct { IMEI string `json:"imei"` MEID string `json:"meid"` ModemFirmwareVersion string `json:"modem_firmware_version"` IsMDMLostModeEnabled bool `json:"is_mdm_lost_mode_enabled,omitempty"` // IOS 9.3 MaximumResidentUsers int `json:"maximum_resident_users"` // IOS 9.3 // Network ICCID string `json:"iccid,omitempty"` // IOS CurrentCarrierNetwork string `json:"current_carrier_network,omitempty"` SIMCarrierNetwork string `json:"sim_carrier_network,omitempty"` SubscriberCarrierNetwork string `json:"subscriber_carrier_network,omitempty"` CarrierSettingsVersion string `json:"carrier_settings_version,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` VoiceRoamingEnabled bool `json:"voice_roaming_enabled,omitempty"` DataRoamingEnabled bool `json:"data_roaming_enabled,omitempty"` IsRoaming bool `json:"is_roaming,omitempty"` PersonalHotspotEnabled bool `json:"personal_hotspot_enabled,omitempty"` SubscriberMCC string `json:"subscriber_mcc,omitempty"` SubscriberMNC string `json:"subscriber_mnc,omitempty"` CurrentMCC string `json:"current_mcc,omitempty"` CurrentMNC string `json:"current_mnc,omitempty"` }
IosQueryResponses contains iOS QueryResponses
type MCAPNErrorDomain ¶
type MCAPNErrorDomain int
type MCCertificateErrorDomain ¶
type MCCertificateErrorDomain int
type MCDefaultsErrorDomain ¶
type MCDefaultsErrorDomain int
type MCEmailErrorDomain ¶
type MCEmailErrorDomain int
type MCInstallationErrorDomain ¶
type MCInstallationErrorDomain int
type MCKeychainErrorDomain ¶
type MCKeychainErrorDomain int
type MCMDMErrorDomain ¶
type MCMDMErrorDomain int
type MCPasscodeErrorDomain ¶
type MCPasscodeErrorDomain int
type MCPayloadErrorDomain ¶
type MCPayloadErrorDomain int
type MCProfileErrorDomain ¶
type MCProfileErrorDomain int
type MCRestrictionsErrorDomain ¶
type MCRestrictionsErrorDomain int
type MCWebClipErrorDomain ¶
type MCWebClipErrorDomain int
type MacosQueryResponses ¶
type MacosQueryResponses struct { OSUpdateSettings OSUpdateSettingsResponse // OSX 10.11+ LocalHostName string `json:"local_host_name,omitempty"` // OSX 10.11 HostName string `json:"host_name,omitempty"` // OSX 10.11 ActiveManagedUsers []string `json:"active_managed_users"` // OSX 10.11 }
MacosQueryResponses contains macOS queryResponses
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 ManagedApplicationList ¶
type ManagedApplicationList struct {
Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}
type NSPOSIXErrorDomain ¶
type NSPOSIXErrorDomain int
type OSUpdate ¶
type OSUpdate struct { ProductKey string `json:"product_key"` /* One of the following: Default: Download and/or install the software update, depending on the current device state. See the UpdateResults dictionary, below, to determine which InstallAction is scheduled. DownloadOnly: Download the software update without installing it. InstallASAP: Install an already downloaded software update. NotifyOnly: Download the software update and notify the user via the App Store (macOS only). InstallLater: Download the software update and install it at a later time (macOS only). */ InstallAction string `json:"install_action"` }
type OSUpdateSettingsResponse ¶
type OSUpdateSettingsResponse struct { AutoCheckEnabled bool `json:"auto_check_enabled"` AutomaticAppInstallationEnabled bool `json:"automatic_app_installation_enabled"` AutomaticOSInstallationEnabled bool `json:"automatic_os_installation_enabled"` AutomaticSecurityUpdatesEnabled bool `json:"automatic_security_updates_enabled"` BackgroundDownloadEnabled bool `json:"background_download_enabled"` CatalogURL string `json:"catalog_url"` IsDefaultCatalog bool `json:"is_default_catalog"` PerformPeriodicCheck bool `json:"perform_periodic_check"` PreviousScanDate time.Time `json:"previous_scan_date"` PreviousScanResult int `json:"previous_scan_result"` }
OSUpdateSettingsResponse contains information about macOS update settings.
type OSUpdateStatusResponse ¶
type OSUpdateStatusResponse []OSUpdateStatusResponseItem
type OSUpdateStatusResponseItem ¶
type OSUpdateStatusResponseItem struct { ProductKey string `json:"product_key"` IsDownloaded bool `json:"is_downloaded"` DownloadPercentComplete float64 `json:"download_percent_complete"` /* The status of this update. Possible values are: Idle: No action is being taken on this software update. Downloading: The software update is being downloaded. Installing: The software update is being installed. This status may not be returned if the device must reboot during installation. */ Status string `json:"status"` }
type Payload ¶
Payload is an MDM payload
func NewPayload ¶
func NewPayload(request *CommandRequest) (*Payload, error)
type PayloadContentItem ¶
type ProfileList ¶
type ProfileList []ProfileListItem
type ProfileListItem ¶
type ProfileListItem struct { HasRemovalPasscode bool `json:"has_removal_passcode"` IsEncrypted bool `json:"is_encrypted"` PayloadContent []PayloadContentItem `json:"payload_content,omitempty" plist:",omitempty"` PayloadDescription string `json:"payload_description"` PayloadDisplayName string `json:"payload_display_name"` PayloadIdentifier string `json:"payload_identifier"` PayloadOrganization string `json:"payload_organization"` PayloadRemovalDisallowed bool `json:"payload_removal_disallowed"` PayloadUUID string `json:"payload_uuid"` PayloadVersion int `json:"payload_version"` }
type ProvisioningProfileListResponse ¶
type ProvisioningProfileListResponse []ProvisioningProfileListItem
type QueryResponses ¶
type QueryResponses struct { CommonQueryResponses MacosQueryResponses IosQueryResponses AtvQueryResponses }
QueryResponses is a DeviceInformation MDM Command Response
type RemoveApplication ¶
type RemoveApplication struct {
Identifier string `json:"identifier,omitempty"`
}
type RemoveMedia ¶
type RemoveProfile ¶
type RemoveProfile struct {
Identifier string `plist:",omitempty" json:"identifier,omitempty"`
}
type RemoveProvisioningProfile ¶
type RemoveProvisioningProfile struct {
UUID string `plist:",omitempty" json:"uuid,omitempty"`
}
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 RequestMirroringResponse ¶
type RequestMirroringResponse struct {
MirroringResult string `json:"mirroring_result,omitempty"`
}
type Response ¶
type Response struct { UDID string UserID *string `json:"user_id,omitempty" plist:"UserID,omitempty"` Status string CommandUUID string RequestType string `json:"request_type,omitempty" plist:",omitempty"` ErrorChain []ErrorChainItem `json:"error_chain" plist:",omitempty"` QueryResponses QueryResponses `json:"query_responses,omitempty" plist:",omitempty"` SecurityInfo SecurityInfo `json:"security_info,omitempty" plist:",omitempty"` CertificateList CertificateList `json:"certificate_list,omitempty" plist:",omitempty"` InstalledApplicationList InstalledApplicationListResponse `json:"installed_application_list,omitempty" plist:",omitempty"` ScheduleOSUpdateScan ScheduleOSUpdateScanResponse `json:"schedule_os_update_scan"` OSUpdateStatus OSUpdateStatusResponse `json:"os_update_status,omitempty" plist:",omitempty"` AvailableOSUpdates AvailableOSUpdatesResponse `json:"available_os_updates,omitempty" plist:",omitempty"` ProfileList ProfileList `json:"profile_list,omitempty" plist:",omitempty"` }
Response is an MDM Command Response
type Restrictions ¶
type Restrictions struct {
ProfileRestrictions bool `plist:",omitempty" json:"restrictions,omitempty"`
}
type ScheduleOSUpdate ¶
type ScheduleOSUpdate struct {
Updates []OSUpdate `plist:",omitempty" json:"updates,omitempty"`
}
ScheduleOSUpdate runs update(s) immediately
type ScheduleOSUpdateScan ¶
type ScheduleOSUpdateScan struct {
Force bool `plist:",omitempty" json:"force,omitempty"`
}
ScheduleOSUpdateScan schedules a (background) OS SoftwareUpdate check
type ScheduleOSUpdateScanResponse ¶
type ScheduleOSUpdateScanResponse struct {
ScanInitiated bool `json:"scan_initiated"`
}
type SecurityInfo ¶
type SecurityInfo struct { FDEEnabled bool `json:"fde_enabled,omitempty"` // OSX FDEHasPersonalRecoveryKey bool `json:"fde_has_personal_recovery_key,omitempty"` FDEHasInstitutionalRecoveryKey bool `json:"fde_has_institutional_recovery_key,omitempty"` HardwareEncryptionCaps int `json:"hardware_encryption_caps,omitempty"` // iOS PasscodeCompliant bool `json:"passcode_compliant,omitempty"` PasscodeCompliantWithProfiles bool `json:"passcode_compliant_with_profiles,omitempty"` PasscodePresent bool `json:"passcode_present,omitempty"` }
SecurityInfo is the SecurityInfo MDM Command Response
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"` Attributes map[string]string `plist:",omitempty" json:"attributes,omitempty"` }
type Settings ¶
type Settings struct {
Settings []Setting `plist:",omitempty" json:"settings,omitempty"`
}
type UsersListItem ¶
type UsersListResponse ¶
type UsersListResponse []UsersListItem
type ValidateApplications ¶
type ValidateApplications struct {
Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"`
}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
package appmanifest provides utilities for managing app manifest files used by MDM InstallApplication commands.
|
package appmanifest provides utilities for managing app manifest files used by MDM InstallApplication commands. |
internal/checkinproto
Package checkinproto is a generated protocol buffer package.
|
Package checkinproto is a generated protocol buffer package. |
internal/connectproto
Package connectproto is a generated protocol buffer package.
|
Package connectproto is a generated protocol buffer package. |