Documentation ¶
Index ¶
- Constants
- func BucketGet(tx *bolt.Tx, bucket, key string) []byte
- func BucketGetInt(tx *bolt.Tx, bucket, key string) int
- func BucketGetKeysWithPrefix(tx *bolt.Tx, bucket string, prefix string, stripPrefix bool) []string
- func BucketGetString(tx *bolt.Tx, bucket, key string) string
- func BucketPutOrDelete(tx *bolt.Tx, bucket, key string, value []byte) error
- func BucketPutOrDeleteInt(tx *bolt.Tx, bucket, key string, value int) error
- func BucketPutOrDeleteString(tx *bolt.Tx, bucket, key, value string) error
- func List(db *bolt.DB) (udids []string, err error)
- type AuthenticationRequest
- type ConnectRequest
- type ConnectResponse
- type ConnectResponseCommand
- type Device
- func (device *Device) InstallProfile(pb []byte) error
- func (device *Device) MDMClient() (*MDMClient, error)
- func (device *Device) RemoveProfile(profileID string) error
- func (device *Device) Save() error
- func (device *Device) SystemKeychain() *Keychain
- func (device *Device) SystemProfileStore() *ProfileStore
- func (device *Device) ValidateProfileInstall(p *cfgprofiles.Profile, fromMDM bool) error
- type DeviceInfo
- type DeviceInfoCommand
- type DeviceInfoResponse
- type ErrorChain
- type InstallProfile
- type InstallProfileCommand
- type InstallProfileResponse
- type Keychain
- type KeychainItem
- type MDMClient
- type ProfileListResponse
- type ProfileStore
- type TokenUpdateRequest
Constants ¶
const ( ClassCertificate ClassKey ClassIdentity )
const ( PayloadRequiresNetwork = 1 << iota PayloadRequiresIdentities )
const (
KeychainSystem = "System"
)
Variables ¶
This section is empty.
Functions ¶
func BucketGetInt ¶
BucketGetInt retrieves a value from a bucket or returns 0.
func BucketGetKeysWithPrefix ¶
BucketGetKeysWithPrefix retrieves a list of keys with a prefix in a bucket
func BucketGetString ¶
BucketGetString retrieves a value from a bucket or returns "".
func BucketPutOrDelete ¶
BucketPutOrDelete Puts a value to a BoltDB bucket. If the value is empty the key is Deleted.
func BucketPutOrDeleteInt ¶
BucketPutOrDeleteInt Puts a value to a BoltDB bucket. If the value is 0 the key is Deleted.
func BucketPutOrDeleteString ¶
BucketPutOrDeleteString Puts a value to a BoltDB bucket. If the value is empty the key is Deleted.
Types ¶
type AuthenticationRequest ¶
type AuthenticationRequest struct { BuildVersion string `plist:",omitempty"` DeviceName string IMEI string `plist:",omitempty"` MEID string `plist:",omitempty"` MessageType string Model string `plist:",omitempty"` ModelName string `plist:",omitempty"` OSVersion string `plist:",omitempty"` ProductName string `plist:",omitempty"` SerialNumber string `plist:",omitempty"` Topic string UDID string EnrollmentID string `plist:",omitempty"` // macOS 10.15 and iOS 13.0 and later }
AuthenticationRequest ...
type ConnectRequest ¶
type ConnectRequest struct { UDID string CommandUUID string `plist:",omitempty"` Status string ErrorChain []ErrorChain `plist:",omitempty"` RequestType string `plist:",omitempty"` }
type ConnectResponse ¶
type ConnectResponse struct { Command ConnectResponseCommand CommandUUID string }
type ConnectResponseCommand ¶
type ConnectResponseCommand struct {
RequestType string
}
type Device ¶
type Device struct { UDID string Serial string ComputerName string MDMIdentityKeychainUUID string MDMProfileIdentifier string // contains filtered or unexported fields }
Device represents a pseudo Apple device for MDM interactions
func (*Device) InstallProfile ¶
func (*Device) RemoveProfile ¶
func (*Device) SystemKeychain ¶
func (*Device) SystemProfileStore ¶
func (device *Device) SystemProfileStore() *ProfileStore
func (*Device) ValidateProfileInstall ¶
func (device *Device) ValidateProfileInstall(p *cfgprofiles.Profile, fromMDM bool) error
type DeviceInfo ¶
type DeviceInfo struct { Command DeviceInfoCommand CommandUUID string }
type DeviceInfoCommand ¶
type DeviceInfoCommand struct { ConnectResponseCommand Queries []string }
type DeviceInfoResponse ¶
type DeviceInfoResponse struct { ConnectRequest QueryResponses map[string]string }
type ErrorChain ¶
type InstallProfile ¶
type InstallProfile struct { Command InstallProfileCommand CommandUUID string }
type InstallProfileCommand ¶
type InstallProfileCommand struct { ConnectResponseCommand Payload []byte RequestRequiresNetworkTether bool `plist:",omitempty"` }
type InstallProfileResponse ¶
type InstallProfileResponse struct { ConnectRequest RequestType string }
type KeychainItem ¶
type KeychainItem struct { Keychain *Keychain UUID string Class int Item []byte // ClassIdentity IdentityCertificateUUID string IdentityKeyUUID string // ClassKey Key *rsa.PrivateKey // ClassCertificate Certificate *x509.Certificate }
func LoadKeychainItem ¶
func LoadKeychainItem(kc *Keychain, uuid string) (kci *KeychainItem, err error)
LoadKeychainItem loads a *KeychainItem from a keychain's BoltDB.
func NewKeychainItem ¶
func NewKeychainItem(kc *Keychain, class int) *KeychainItem
func (*KeychainItem) Delete ¶
func (kci *KeychainItem) Delete() error
func (*KeychainItem) Save ¶
func (kci *KeychainItem) Save() error
Save writes a keychain item to a keychain's BoltDB.
type MDMClient ¶
type MDMClient struct { Device *Device MDMPayload *cfgprofiles.MDMPayload IdentityCertificate *x509.Certificate IdentityPrivateKey *rsa.PrivateKey }
type ProfileListResponse ¶
type ProfileListResponse struct { ConnectRequest ProfileList []*profileListProfile }
type ProfileStore ¶
func NewProfileStore ¶
func NewProfileStore(id string, db *bolt.DB) *ProfileStore
func (*ProfileStore) ListUUIDs ¶
func (ps *ProfileStore) ListUUIDs() (uuids []string, err error)
func (*ProfileStore) Load ¶
func (ps *ProfileStore) Load(id string) (p *cfgprofiles.Profile, err error)
type TokenUpdateRequest ¶
type TokenUpdateRequest struct { AwaitingConfiguration bool `plist:",omitempty"` EnrollmentID string `plist:",omitempty"` // macOS 10.15 and iOS 13.0 and later EnrollmentUserID string `plist:",omitempty"` // macOS 10.15 and iOS 13.0 and later MessageType string NotOnConsole bool `plist:",omitempty"` PushMagic string Token []byte Topic string UDID string UnlockToken []byte `plist:",omitempty"` UserShortName string `plist:",omitempty"` UserID string `plist:",omitempty"` UserLongName string `plist:",omitempty"` }