Certificate/wireless plugins; major refactoring
Migrate much of BI to Services. Added Wireless Profile Provider plugin feature. Added Certificate Authority Provider plugin feature. Modified Certificate Provider plugin feature. Database migration v17, for Device Profiles. Enrolment Client Updated to support CA Certificates, Wireless Profiles and Hardware Info. New Client Enrolment Protocol to support new features. Plugin Manifest Generator added to main solution. Improved AD search performance.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using Disco.Models.ClientServices.EnrolmentInformation;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
@@ -12,21 +10,20 @@ namespace Disco.Models.ClientServices
|
||||
get { return "Enrol"; }
|
||||
}
|
||||
|
||||
public string DeviceSerialNumber { get; set; }
|
||||
public string DeviceUUID { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
|
||||
public string DeviceDNSDomainName { get; set; }
|
||||
public string DeviceComputerName { get; set; }
|
||||
public bool DeviceIsPartOfDomain { get; set; }
|
||||
|
||||
public string DeviceManufacturer { get; set; }
|
||||
public string DeviceModel { get; set; }
|
||||
public string DeviceModelType { get; set; }
|
||||
public string DNSDomainName { get; set; }
|
||||
public string ComputerName { get; set; }
|
||||
public bool IsPartOfDomain { get; set; }
|
||||
|
||||
public string DeviceLanMacAddress { get; set; }
|
||||
|
||||
public string DeviceWlanMacAddress { get; set; }
|
||||
public string RunningUserName { get; set; }
|
||||
public string RunningUserDomain { get; set; }
|
||||
public bool RunningInteractively { get; internal set; }
|
||||
|
||||
public List<string> DeviceCertificates { get; set; }
|
||||
public DeviceHardware Hardware { get; set; }
|
||||
|
||||
public List<Certificate> Certificates { get; set; }
|
||||
|
||||
public List<WirelessProfile> WirelessProfiles { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Disco.Models.ClientServices.EnrolmentInformation;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
@@ -9,22 +6,22 @@ namespace Disco.Models.ClientServices
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
|
||||
public string DeviceDomainName { get; set; }
|
||||
public string DeviceComputerName { get; set; }
|
||||
|
||||
public string DeviceAssignedUserDomain { get; set; }
|
||||
public string DeviceAssignedUserName { get; set; }
|
||||
public string DeviceAssignedUserSID { get; set; }
|
||||
public string DeviceAssignedUserUsername { get; set; }
|
||||
public string DomainName { get; set; }
|
||||
public string ComputerName { get; set; }
|
||||
|
||||
public bool DeviceAssignedUserIsLocalAdmin { get; set; }
|
||||
public string AssignedUserDomain { get; set; }
|
||||
public string AssignedUserUsername { get; set; }
|
||||
public string AssignedUserSID { get; set; }
|
||||
public string AssignedUserDescription { get; set; }
|
||||
|
||||
public string OfflineDomainJoin { get; set; }
|
||||
|
||||
public string DeviceCertificate { get; set; }
|
||||
public List<string> DeviceCertificateRemoveExisting { get; set; }
|
||||
public bool AssignedUserIsLocalAdmin { get; set; }
|
||||
|
||||
public string OfflineDomainJoinManifest { get; set; }
|
||||
|
||||
public CertificateStore Certificates { get; set; }
|
||||
|
||||
public WirelessProfileStore WirelessProfiles { get; set; }
|
||||
|
||||
// Actions
|
||||
public bool AllowBootstrapperUninstall { get; set; }
|
||||
public bool RequireReboot { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class Certificate
|
||||
{
|
||||
public string Store { get; set; }
|
||||
public string SubjectName { get; set; }
|
||||
public string Thumbprint { get; set; }
|
||||
public string FriendlyName { get; set; }
|
||||
public string DnsName { get; set; }
|
||||
public int Version { get; set; }
|
||||
public string SignatureAlgorithm { get; set; }
|
||||
public string Issuer { get; set; }
|
||||
public DateTime NotAfter { get; set; }
|
||||
public DateTime NotBefore { get; set; }
|
||||
public bool HasPrivateKey { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class CertificateStore
|
||||
{
|
||||
public List<byte[]> TrustedRootCertificates { get; set; }
|
||||
public List<string> TrustedRootRemoveThumbprints { get; set; }
|
||||
|
||||
public List<byte[]> IntermediateCertificates { get; set; }
|
||||
public List<string> IntermediateRemoveThumbprints { get; set; }
|
||||
|
||||
public List<byte[]> PersonalCertificates { get; set; }
|
||||
public List<string> PersonalRemoveThumbprints { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class DeviceHardware
|
||||
{
|
||||
public string SerialNumber { get; set; }
|
||||
public string UUID { get; set; }
|
||||
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string ModelType { get; set; }
|
||||
|
||||
public List<Processor> Processors { get; set; }
|
||||
public List<PhysicalMemory> PhysicalMemory { get; set; }
|
||||
public List<DiskDrive> DiskDrives { get; set; }
|
||||
public List<NetworkAdapter> NetworkAdapters { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class DiskDrive
|
||||
{
|
||||
public string DeviceID { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string MediaType { get; set; }
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class DiskDrivePartition
|
||||
{
|
||||
public bool 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 List<DiskLogical> LogicalDisks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
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 FileSystem { get; set; }
|
||||
public ulong Size { get; set; }
|
||||
public ulong FreeSpace { get; set; }
|
||||
public string VolumeName { get; set; }
|
||||
public string VolumeSerialNumber { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class NetworkAdapter
|
||||
{
|
||||
public string DeviceID { get; set; }
|
||||
public Guid ConnectionIdentifier { get; set; }
|
||||
public bool IsWlanAdapter { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string ProductName { get; set; }
|
||||
public string AdapterType { get; set; }
|
||||
|
||||
public string MACAddress { get; set; }
|
||||
public ulong Speed { get; set; }
|
||||
public string NetConnectionID { get; set; }
|
||||
public string NetConnectionStatus { get; set; }
|
||||
public string WlanStatus { get; set; }
|
||||
public bool NetEnabled { get; set; }
|
||||
public bool IPEnabled { get; set; }
|
||||
|
||||
public List<string> IPAddresses { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class PhysicalMemory
|
||||
{
|
||||
public string Tag { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
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; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class Processor
|
||||
{
|
||||
public string DeviceID { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class WirelessProfile
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The name of the wireless profile, typically the SSID
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The guid of the associated interface.
|
||||
/// </summary>
|
||||
public Guid? InterfaceGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the profile is deployed via Group Policy and therefore read-only
|
||||
/// </summary>
|
||||
public bool? IsGroupPolicy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the profile should be overwritten even if it already exists
|
||||
/// </summary>
|
||||
public bool? ForceDeployment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The wireless profile XML definition
|
||||
/// </summary>
|
||||
public string ProfileXml { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class WirelessProfileStore
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// A list of wireless profiles to add to the client device.
|
||||
/// </summary>
|
||||
public List<WirelessProfile> Profiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of transformations to be applied to existing XML wireless profiles found on the client device.
|
||||
/// </summary>
|
||||
public List<WirelessProfileTransformation> Transformations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of wireless profile names to be removed from the client device.
|
||||
/// </summary>
|
||||
public List<string> RemoveNames { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace Disco.Models.ClientServices.EnrolmentInformation
|
||||
{
|
||||
public class WirelessProfileTransformation
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The name of the wireless profile related to this transformation, typically the SSID
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The regular expression to evaluate against the wireless profile XML
|
||||
/// </summary>
|
||||
public string RegularExpression { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The replacement string used when evaluating the regular expression
|
||||
/// </summary>
|
||||
public string RegularExpressionReplacement { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Disco.Models.ClientServices
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ({1})", DisplayName, Username);
|
||||
return $"{DisplayName} ({Username})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user