Feature: Collect additional hardware audit information

When devices enrol the client collects processor, memory, disk and network information which is persisted in the database
This commit is contained in:
Gary Sharp
2020-11-29 16:43:44 +11:00
parent 28e5901929
commit f1d27732c7
9 changed files with 409 additions and 82 deletions
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace Disco.Models.ClientServices.EnrolmentInformation
{
@@ -12,7 +11,6 @@ namespace Disco.Models.ClientServices.EnrolmentInformation
public string InterfaceType { get; set; }
public string SerialNumber { get; set; }
public string FirmwareRevision { get; set; }
public DateTime InstallDate { get; set; }
public ulong Size { get; set; }
public List<DiskDrivePartition> Partitions { get; set; }
@@ -1,16 +1,15 @@
using System.Collections.Generic;
namespace Disco.Models.ClientServices.EnrolmentInformation
namespace Disco.Models.ClientServices.EnrolmentInformation
{
public class DiskDrivePartition
{
public bool DeviceID { get; set; }
public string DeviceID { get; set; }
public bool Bootable { get; set; }
public bool BootPartition { get; set; }
public bool PrimaryParition { get; set; }
public ulong Size { get; set; }
public ulong StartingOffset { get; set; }
public string Type { get; set; }
public List<DiskLogical> LogicalDisks { get; set; }
public DiskLogical LogicalDisk { get; set; }
}
}
@@ -1,23 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.ClientServices.EnrolmentInformation
namespace Disco.Models.ClientServices.EnrolmentInformation
{
public class DiskLogical
{
public string DeviceID { get; set; }
public string Description { get; set; }
public int DriveType { get; set; }
public int MediaType { get; set; }
public string DriveType { get; set; }
public string MediaType { get; set; }
public string FileSystem { get; set; }
public ulong Size { get; set; }
public ulong FreeSpace { get; set; }
public string VolumeName { get; set; }
public string VolumeSerialNumber { get; set; }
}
}
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.ClientServices.EnrolmentInformation
namespace Disco.Models.ClientServices.EnrolmentInformation
{
public class PhysicalMemory
{
@@ -14,10 +8,9 @@ namespace Disco.Models.ClientServices.EnrolmentInformation
public string PartNumber { get; set; }
public ulong Capacity { get; set; }
public int ClockSpeed { get; set; }
public int Voltage { get; set; }
public string Location { get; set; }
public uint ConfiguredClockSpeed { get; set; }
public uint Speed { get; set; }
public string DeviceLocator { get; set; }
}
}
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.ClientServices.EnrolmentInformation
namespace Disco.Models.ClientServices.EnrolmentInformation
{
public class Processor
{
@@ -13,9 +7,9 @@ namespace Disco.Models.ClientServices.EnrolmentInformation
public string Name { get; set; }
public string Description { get; set; }
public string Architecture { get; set; }
public short Family { get; set; }
public int MaxClockSpeed { get; set; }
public int NumberOfCores { get; set; }
public int NumberOfLogicalProcessors { get; set; }
public ushort Family { get; set; }
public uint MaxClockSpeed { get; set; }
public uint NumberOfCores { get; set; }
public uint NumberOfLogicalProcessors { get; set; }
}
}
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
@@ -16,6 +12,10 @@ namespace Disco.Models.Repository
public const string HardwareKeyACAdapter = "ACAdapter";
public const string HardwareKeyBattery = "Battery";
public const string HardwareKeyKeyboard = "Keyboard";
public const string HardwareKeyNetworkAdapters = "NetworkAdapters";
public const string HardwareKeyProcessors = "Processors";
public const string HardwareKeyPhysicalMemory = "PhysicalMemory";
public const string HardwareKeyDiskDrives = "DiskDrives";
[Column(Order = 0), Key]
public string DeviceSerialNumber { get; set; }