Documentation
¶
Index ¶
- Variables
- type Access
- type ComAppleSystemevents
- type KTCCServiceAccessibility
- type KTCCServiceAddressBook
- type KTCCServiceAppleEvents
- type KTCCServiceCalendar
- type KTCCServiceFileProviderPresence
- type KTCCServicePhotos
- type KTCCServicePostEvent
- type KTCCServiceSystemPolicyAllFiles
- type KTCCServiceSystemPolicyDesktopFolder
- type KTCCServiceSystemPolicyDocumentsFolder
- type KTCCServiceSystemPolicyDownloadsFolder
- type MDMEntry
- type MDMOverrides
- type SQResponse
- type ServiceDetail
- type TCCEntry
- type Users
Constants ¶
This section is empty.
Variables ¶
var AuthReasonArray = map[int]string{
0: "Inherited/Unknown",
1: "Error",
2: "User Consent",
3: "User Set",
4: "System Set",
5: "Service Policy",
6: "MDM Policy",
7: "Override Policy",
8: "Missing usage string",
9: "Prompt Timeout",
10: "Preflight Unknown",
11: "Entitled",
12: "App Type Policy",
}
AuthReasonArray is a map of auth reasons to friendly names
var AuthValueArray = map[int]string{
0: "Denied",
1: "Unknown",
2: "Allowed",
3: "Limited",
}
AuthValueArray is a map of auth values to friendly names
var ServiceArray = map[string]string{
"kTCCServiceAddressBook": "Contacts",
"kTCCServiceAppleEvents": "Apple Events",
"kTCCServiceBluetoothAlways": "Bluetooth",
"kTCCServiceCalendar": "Calendar",
"kTCCServiceCamera": "Camera",
"kTCCServiceContactsFull": "Full contacts information",
"kTCCServiceContactsLimited": "Basic contacts information",
"kTCCServiceFileProviderDomain": "Files managed by Apple Events",
"kTCCServiceFileProviderPresence": "See when files managed by the client are in use",
"kTCCServiceLocation": "Current location",
"kTCCServiceMediaLibrary": "Apple Music, music and video activity, and media library",
"kTCCServiceMicrophone": "Microphone",
"kTCCServiceMotion": "Motion & Fitness Activity",
"kTCCServicePhotos": "Read Photos",
"kTCCServicePhotosAdd": "Add to Photos",
"kTCCServicePrototype3Rights": "Authorization Test Service Proto3Right",
"kTCCServicePrototype4Rights": "Authorization Test Service Proto4Right",
"kTCCServiceReminders": "Reminders",
"kTCCServiceScreenCapture": "Capture screen contents",
"kTCCServiceSiri": "Use Siri",
"kTCCServiceSpeechRecognition": "Speech Recognition",
"kTCCServiceSystemPolicyDesktopFolder": "Desktop folder",
"kTCCServiceSystemPolicyDeveloperFiles": "Files in Software Development",
"kTCCServiceSystemPolicyDocumentsFolder": "Files in Documents folder",
"kTCCServiceSystemPolicyDownloadsFolder": "Files in Downloads folder",
"kTCCServiceSystemPolicyNetworkVolumes": "Files on a network volume",
"kTCCServiceSystemPolicyRemovableVolumes": "Files on a removable volume",
"kTCCServiceSystemPolicySysAdminFiles": "Administer the computer",
"kTCCServiceWillow": "Home data",
"kTCCServiceSystemPolicyAllFiles": "Full Disk Access",
"kTCCServiceAccessibility": "Control the computer",
"kTCCServicePostEvent": "Send keystrokes",
"kTCCServiceListenEvent": "Monitor input from the keyboard",
"kTCCServiceDeveloperTool": "Run insecure software locally",
"kTCCServiceLiverpool": "Location services",
"kTCCServiceUbiquity": "iCloud",
"kTCCServiceShareKit": "Share features",
"kTCCServiceLinkedIn": "Share via LinkedIn",
"kTCCServiceTwitter": "Share via Twitter",
"kTCCServiceFacebook": "Share via Facebook",
"kTCCServiceSinaWeibo": "Share via Sina Weibo",
"kTCCServiceTencentWeibo": "Share via Tencent Weibo",
}
ServiceArray is a map of service names to friendly names
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct {
KTCCServiceAppleEvents KTCCServiceAppleEvents `plist:"kTCCServiceAppleEvents, omitempty"`
KTCCServiceAccessibility KTCCServiceAccessibility `plist:"kTCCServiceAccessibility, omitempty"`
KTCCServiceAddressBook KTCCServiceAddressBook `plist:"kTCCServiceAddressBook, omitempty"`
KTCCServiceCalendar KTCCServiceCalendar `plist:"kTCCServiceCalendar, omitempty"`
KTCCServiceFileProviderPresence KTCCServiceFileProviderPresence `plist:"kTCCServiceFileProviderPresence, omitempty"`
KTCCServicePhotos KTCCServicePhotos `plist:"kTCCServicePhotos, omitempty"`
KTCCServicePostEvent KTCCServicePostEvent `plist:"kTCCServicePostEvent, omitempty"`
KTCCServiceSystemPolicyAllFiles KTCCServiceSystemPolicyAllFiles `plist:"kTCCServiceSystemPolicyAllFiles, omitempty"`
KTCCServiceSystemPolicyDesktopFolder KTCCServiceSystemPolicyDesktopFolder `plist:"kTCCServiceSystemPolicyDesktopFolder, omitempty"`
KTCCServiceSystemPolicyDocumentsFolder KTCCServiceSystemPolicyDocumentsFolder `plist:"kTCCServiceSystemPolicyDocumentsFolder, omitempty"`
KTCCServiceSystemPolicyDownloadsFolder KTCCServiceSystemPolicyDownloadsFolder `plist:"kTCCServiceSystemPolicyDownloadsFolder, omitempty"`
}
type ComAppleSystemevents ¶
type ComAppleSystemevents struct {
AEReceiverCodeRequirement string `plist:"AEReceiverCodeRequirement, omitempty"`
AEReceiverCodeRequirementData interface{} `plist:"AEReceiverCodeRequirementData, omitempty"`
AEReceiverIdentifier string `plist:"AEReceiverIdentifier, omitempty"`
AEReceiverIdentifierType string `plist:"AEReceiverIdentifierType, omitempty"`
Allowed bool `plist:"Allowed, omitempty"`
CodeRequirement string `plist:"CodeRequirement, omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData, omitempty"`
Identifier string `plist:"Identifier, omitempty"`
IdentifierType string `plist:"IdentifierType, omitempty"`
StaticCode bool `plist:"StaticCode, omitempty"`
}
type KTCCServiceAccessibility ¶
type KTCCServiceAccessibility struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Comment string `plist:"Comment,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceAddressBook ¶
type KTCCServiceAddressBook struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceAppleEvents ¶
type KTCCServiceAppleEvents struct {
ComAppleSystemevents ComAppleSystemevents `plist:"com.apple.systemevents"`
}
type KTCCServiceCalendar ¶
type KTCCServiceCalendar struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceFileProviderPresence ¶
type KTCCServiceFileProviderPresence struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServicePhotos ¶
type KTCCServicePhotos struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServicePostEvent ¶
type KTCCServicePostEvent struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceSystemPolicyAllFiles ¶
type KTCCServiceSystemPolicyAllFiles struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Comment string `plist:"Comment,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceSystemPolicyDesktopFolder ¶
type KTCCServiceSystemPolicyDesktopFolder struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceSystemPolicyDocumentsFolder ¶
type KTCCServiceSystemPolicyDocumentsFolder struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type KTCCServiceSystemPolicyDownloadsFolder ¶
type KTCCServiceSystemPolicyDownloadsFolder struct {
Allowed bool `plist:"Allowed,omitempty"`
CodeRequirement string `plist:"CodeRequirement,omitempty"`
CodeRequirementData interface{} `plist:"CodeRequirementData,omitempty"`
Comment string `plist:"Comment,omitempty"`
Identifier string `plist:"Identifier,omitempty"`
IdentifierType string `plist:"IdentifierType,omitempty"`
StaticCode bool `plist:"StaticCode,omitempty"`
}
type MDMEntry ¶
type MDMEntry struct {
Source string
MDMServer string
CodeRequirement string
Identifier string
IdentifierType string
ServiceFriendlyName string
Services []ServiceDetail
StaticCode string
}
MDMEntry is a struct for the response from the MDMOverrides.plist
func ProcessMDMOverrides ¶
ProcessMDMOverrides processes the MDMOverrides.plist
type MDMOverrides ¶
MDMOverrides is a map of MDM overrides
func CheckMDMOverrides ¶
func CheckMDMOverrides() (MDMOverrides, error)
CheckMDMOverrides checks for MDM overrides
type SQResponse ¶
type SQResponse struct {
Client string `json:"client"`
ClientType int `json:"client_type"`
Service string `json:"service"`
AuthValue int `json:"auth_value"`
AuthReason int `json:"auth_reason"`
LastMod int64 `json:"last_modified"`
Csreq string `json:"csreq"`
AuthVersion string `json:"auth_version"`
}
SQR is a struct for the response from the TCC database
func SystemQuery ¶
func SystemQuery() ([]SQResponse, error)
SystemQuery returns a list of information from the system TCC database
func UserQuery ¶
func UserQuery(userDB string) ([]SQResponse, error)
UserQuery returns a list of information from the user's TCC database
type ServiceDetail ¶
ServiceDetail is a struct for formatting the response from the MDMOverrides.plist
type TCCEntry ¶
type TCCEntry struct {
Source string
Username string
Client string
ClientID string
ServiceName string
ServiceFriendlyName string
AuthValue string
AuthReason string
Timestamp int64
FormattedTime string
CodeSignReq string
}
TCCEntry is a struct that represents a row in the TCC.db database
func ProcessRow ¶
func ProcessRow(source string, sqr SQResponse) *TCCEntry
ProcessRow takes a row from the TCC.db database and returns a TCCEntry struct formatting the input as needed.