Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

INT-8568: fix user endpoint os version #154

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
394 changes: 394 additions & 0 deletions src/steps/devices/__snapshots__/computerEntityConverter.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,394 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`#createComputerEntity should convert data 1`] = `
Object {
"_class": Array [
"Host",
"Device",
],
"_key": "ABC123DEF456",
"_rawData": Array [
Object {
"name": "default",
"rawData": Object {
"building": "",
"department": "",
"id": 1,
"mac_address": "12:34:67:8A:9B:1C",
"managed": true,
"model": "MacBookPro13,3",
"name": "John’s MacBook",
"report_date_epoch": 1560787256384,
"report_date_utc": "2019-06-17T16:00:56.384+0000",
"serial_number": "ABC123DEF456",
"udid": "DF7C48EF-D17E-4A5E-B192-8C758870F624",
"username": "john",
},
},
Object {
"name": "detail",
"rawData": Object {
"certificates": Array [
Object {
"common_name": "com.apple.kerberos.kdc",
"expires_epoch": "",
"expires_utc": "",
"identity": true,
"name": "",
},
Object {
"common_name": "Apple Worldwide Developer Relations Certification Authority",
"expires_epoch": 1675806527000,
"expires_utc": "2023-02-07T21:48:47.000+0000",
"identity": false,
"name": "",
},
],
"configuration_profiles": Array [
Object {
"id": -2,
"is_removable": false,
"name": "",
"uuid": "",
},
Object {
"id": -1,
"is_removable": false,
"name": "",
"uuid": "",
},
],
"extension_attributes": Array [
Object {
"id": 1,
"name": "123",
"value": Array [
"foo123",
"bar123",
],
},
Object {
"id": 2,
"name": "456",
"value": Array [
"foo456",
"bar456",
],
},
Object {
"id": 3,
"name": "Deployment status",
"value": Array [
"active",
],
},
],
"general": Object {
"alt_mac_address": "12:34:56:78:90:12",
"alt_network_adapter_type": "Ethernet",
"asset_tag": "",
"barcode_1": "",
"barcode_2": "",
"distribution_point": "",
"id": 1,
"initial_entry_date": "2020-06-03",
"initial_entry_date_epoch": 1591217314697,
"initial_entry_date_utc": "2020-06-03T20:48:34.697+0000",
"ip_address": "12.34.567.890",
"itunes_store_account_is_active": true,
"jamf_version": "10.23.0-t1595614145",
"last_cloud_backup_date_epoch": 0,
"last_cloud_backup_date_utc": "",
"last_contact_time": "2020-08-09 13:24:00",
"last_contact_time_epoch": 1596979440636,
"last_contact_time_utc": "2020-08-09T13:24:00.636+0000",
"last_enrolled_date_epoch": 1591217314697,
"last_enrolled_date_utc": "2020-06-03T20:48:34.697+0000",
"last_reported_ip": "192.168.1.139",
"mac_address": "12:34:67:8A:9B:1C",
"management_status": Object {
"enrolled_via_dep": false,
"user_approved_enrollment": false,
"user_approved_mdm": false,
},
"mdm_capable": true,
"mdm_capable_users": Object {
"mdm_capable_user": "john.doe",
},
"mdm_profile_expiration_epoch": 1748983791000,
"mdm_profile_expiration_utc": "2025-06-03T20:49:51.000+0000",
"name": "John's MacBook",
"netboot_server": "",
"network_adapter_type": "IEEE80211",
"platform": "Mac",
"remote_management": Object {
"managed": true,
"management_password_sha256": "abc123",
"management_username": "macOS",
},
"report_date": "2020-08-03 12:24:29",
"report_date_epoch": 1596457469968,
"report_date_utc": "2020-08-03T12:24:29.968+0000",
"serial_number": "ABC123DEF456",
"site": Object {
"id": 1,
"name": "Test site",
},
"supervised": false,
"sus": "",
"udid": "DF7C48EF-D17E-4A5E-B192-8C758870F624",
},
"groups_accounts": Object {
"computer_group_memberships": Array [
"All Managed Clients",
],
"local_accounts": Array [
Object {
"administrator": true,
"filevault_enabled": true,
"home": "/Users/john",
"home_size": "-1MB",
"home_size_mb": -1,
"name": "john.doe",
"realname": "John",
"uid": "501",
},
Object {
"administrator": true,
"filevault_enabled": true,
"home": "/Users/macOS",
"home_size": "-1MB",
"home_size_mb": -1,
"name": "macOS",
"realname": "macOS",
"uid": "502",
},
],
"user_inventories": Object {
"disable_automatic_login": true,
"user": Object {
"password_history_depth": "",
"password_max_age": "",
"password_min_complex_characters": "",
"password_min_length": "4",
"password_require_alphanumeric": "false",
"username": "macOS",
},
},
},
"hardware": Object {
"active_directory_status": "Not Bound",
"available_ram_slots": 0,
"battery_capacity": 93,
"ble_capable": true,
"boot_rom": "204.0.0.0.0",
"bus_speed": 0,
"bus_speed_mhz": 0,
"cache_size": 8192,
"cache_size_kb": 8192,
"disk_encryption_configuration": "",
"filevault2_users": Array [
"macOS",
"john.doe",
],
"gatekeeper_status": "App Store and identified developers",
"institutional_recovery_key": "Not Present",
"make": "Apple",
"mapped_printers": Array [
Object {
"location": "",
"name": "Brother ABC",
"type": "Brother ABC",
"uri": "dnssd://Brother%20ABC._pdl-datastream._tcp.local./?bidi",
},
],
"master_password_set": false,
"model": "15-inch Retina MacBook Pro with TouchID (Mid 2017)",
"model_identifier": "MacBookPro14,3",
"nic_speed": "n/a",
"number_cores": 4,
"number_processors": 1,
"optical_drive": "",
"os_build": "19D76",
"os_name": "Mac OS X",
"os_version": "10.15",
"processor_architecture": "x86_64",
"processor_speed": 3100,
"processor_speed_mhz": 3100,
"processor_type": "Quad-Core Intel Core i7",
"service_pack": "",
"sip_status": "Enabled",
"smc_version": "2.45f1",
"storage": Array [
Object {
"connection_type": "NO",
"disk": "disk0",
"drive_capacity_mb": 1000555,
"model": "APPLE SSD SM1024L",
"partitions": Array [
Object {
"available_mb": 207295,
"boot_drive_available_mb": 207295,
"filevault2_percent": 100,
"filevault2_status": "Encrypted",
"filevault_percent": 100,
"filevault_status": "Encrypted",
"lvUUID": "",
"lvgUUID": "",
"name": "Macintosh HD (Boot Partition)",
"partition_capacity_mb": 1000240,
"percentage_full": 5,
"pvUUID": "",
"size": 1000240,
"type": "boot",
},
Object {
"available_mb": 207295,
"filevault2_percent": 100,
"filevault2_status": "Encrypted",
"filevault_percent": 100,
"filevault_status": "Encrypted",
"name": "Data",
"partition_capacity_mb": 1000240,
"percentage_full": 79,
"size": 1000240,
"type": "other",
},
],
"revision": "CXS5EA0Q",
"serial_number": "123ABC",
"size": 1000555,
"smart_status": "Verified",
},
],
"total_ram": 16384,
"total_ram_mb": 16384,
"xprotect_version": "2127",
},
"iphones": Array [],
"location": Object {
"building": "",
"department": "",
"email_address": "[email protected]",
"phone": "111",
"phone_number": "111",
"position": "CISO",
"real_name": "John Doe",
"realname": "John Doe",
"room": "",
"username": "john.doe",
},
"peripherals": Array [],
"purchasing": Object {
"applecare_id": "",
"attachments": Array [],
"is_leased": false,
"is_purchased": true,
"lease_expires": "",
"lease_expires_epoch": 0,
"lease_expires_utc": "",
"life_expectancy": 0,
"os_applecare_id": "",
"os_maintenance_expires": "",
"po_date": "",
"po_date_epoch": 0,
"po_date_utc": "",
"po_number": "",
"purchase_price": "",
"purchasing_account": "",
"purchasing_contact": "",
"vendor": "",
"warranty_expires": "",
"warranty_expires_epoch": 0,
"warranty_expires_utc": "",
},
"security": Object {
"activation_lock": false,
"external_boot_level": "not supported",
"firewall_enabled": false,
"secure_boot_level": "not supported",
},
"software": Object {
"applications": Array [
Object {
"bundle_id": "com.github.atom",
"name": "Atom.app",
"path": "/Applications/Atom.app",
"version": "1.43.0",
},
],
"available_software_updates": Array [],
"available_updates": Object {},
"cached_by_casper": Array [],
"fonts": Array [],
"installed_by_casper": Array [],
"installed_by_installer_swu": Array [
"com.apple.pkg.Core",
],
"licensed_software": Array [],
"plugins": Array [],
"running_services": Array [
"com.apple.accessoryd",
],
"unix_executables": Array [],
},
},
},
],
"_type": "user_endpoint",
"altMacAddress": "12:34:56:78:90:12",
"altNetworkAdapterType": "Ethernet",
"assetTag": "",
"barcode1": "",
"barcode2": "",
"building": "",
"category": "endpoint",
"createdOn": 1591217314697,
"department": "",
"deviceId": "DF7C48EF-D17E-4A5E-B192-8C758870F624",
"deviceType": "laptop",
"displayName": "John’s MacBook",
"distributionPoint": "",
"email": "[email protected]",
"encrypted": true,
"enrolledOn": 1591217314697,
"extensionAttribute.Deployment status": Array [
"active",
],
"firewallEnabled": false,
"gatekeeperEnabled": true,
"gatekeeperStatus": "App Store and identified developers",
"hostname": null,
"id": "1",
"ipAddress": "12.34.567.890",
"itunesStoreAccountIsActive": true,
"jamfVersion": "10.23.0-t1595614145",
"lastCloudBackupDateEpoch": 0,
"lastCloudBackupDateUtc": "",
"lastReportedIp": "192.168.1.139",
"lastReportedOn": 1560787256384,
"lastSeenOn": 1596979440636,
"macAddress": "12:34:67:8a:9b:1c",
"make": "Apple",
"managed": true,
"mdmCapable": true,
"mdmProfileExpirationEpoch": 1748983791000,
"mdmProfileExpirationUtc": "2025-06-03T20:49:51.000+0000",
"model": "MacBookPro13,3",
"name": "John's MacBook",
"netbootServer": "",
"networkAdapterType": "IEEE80211",
"osBuild": "19D76",
"osName": "macOS",
"osVersion": "10.15.0",
"platform": "darwin",
"realName": "John Doe",
"serial": "ABC123DEF456",
"serialNumber": "ABC123DEF456",
"supervised": false,
"sus": "",
"systemIntegrityProtectionEnabled": true,
"udid": "DF7C48EF-D17E-4A5E-B192-8C758870F624",
"username": "john",
}
`;
Loading