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:
Gary Sharp
2016-09-28 20:16:25 +10:00
parent 489a5df7cc
commit 27c21175d7
210 changed files with 9822 additions and 6675 deletions
@@ -36,7 +36,7 @@ namespace Disco.Data.Configuration.Modules
/// </summary>
public bool SearchWildcardSuffixOnly
{
get { return Get(false); }
get { return Get(true); }
set { Set(value); }
}
}
@@ -1,5 +1,5 @@
using Disco.Data.Repository;
using Disco.Models.BI.Job;
using Disco.Models.Services.Job;
using System;
using System.Collections.Generic;
@@ -59,13 +59,13 @@ namespace Disco.Data.Configuration.Modules
public LocationModes LocationMode
{
get { return Get<LocationModes>(LocationModes.Unrestricted); }
get { return Get(LocationModes.Unrestricted); }
set { Set(value); }
}
public List<string> LocationList
{
get { return Get<List<string>>(new List<string>()); }
get { return Get(new List<string>()); }
set { Set(value); }
}
}
@@ -284,12 +284,12 @@ namespace Disco.Data.Configuration
return
(short)(BitConverter.ToInt16(deploymentIdBytes, 0) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2) ^
BitConverter.ToInt16(deploymentIdBytes, 2));
BitConverter.ToInt16(deploymentIdBytes, 4) ^
BitConverter.ToInt16(deploymentIdBytes, 6) ^
BitConverter.ToInt16(deploymentIdBytes, 8) ^
BitConverter.ToInt16(deploymentIdBytes, 10) ^
BitConverter.ToInt16(deploymentIdBytes, 12) ^
BitConverter.ToInt16(deploymentIdBytes, 14));
}
}
public UpdateResponseV2 UpdateLastCheckResponse
+8
View File
@@ -15,6 +15,7 @@
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<AssemblyVersion>2.2.16272.1003</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -150,6 +151,10 @@
<Compile Include="Migrations\201407260624238_DBv16.Designer.cs">
<DependentUpon>201407260624238_DBv16.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201609260741183_DBv17.cs" />
<Compile Include="Migrations\201609260741183_DBv17.Designer.cs">
<DependentUpon>201609260741183_DBv17.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Migrations\DiscoDataMigrator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -213,6 +218,9 @@
<EmbeddedResource Include="Migrations\201407260624238_DBv16.resx">
<DependentUpon>201407260624238_DBv16.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201609260741183_DBv17.resx">
<DependentUpon>201609260741183_DBv17.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
+27
View File
@@ -0,0 +1,27 @@
// <auto-generated />
namespace Disco.Data.Migrations
{
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
public sealed partial class DBv17 : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(DBv17));
string IMigrationMetadata.Id
{
get { return "201609260741183_DBv17"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
@@ -0,0 +1,27 @@
namespace Disco.Data.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class DBv17 : DbMigration
{
public override void Up()
{
RenameColumn("dbo.DeviceProfiles", "CertificateProviderId", "CertificateProviders");
AlterColumn("dbo.DeviceProfiles", "CertificateProviders", c => c.String(maxLength: 200));
AddColumn("dbo.DeviceProfiles", "CertificateAuthorityProviders", c => c.String(maxLength: 200));
AddColumn("dbo.DeviceProfiles", "WirelessProfileProviders", c => c.String(maxLength: 200));
// Migration support for eduSTAR.net plugin
Sql("UPDATE [DeviceProfiles] SET [CertificateAuthorityProviders]='EduSTARnetCertificateAuthorityProvider', [WirelessProfileProviders]='EduSTARnetWirelessProfileProvider' WHERE [CertificateProviders]='EduSTARnetCertificateProvider'");
}
public override void Down()
{
AddColumn("dbo.DeviceProfiles", "CertificateProviderId", c => c.String(maxLength: 64));
DropColumn("dbo.DeviceProfiles", "WirelessProfileProviders");
DropColumn("dbo.DeviceProfiles", "CertificateAuthorityProviders");
DropColumn("dbo.DeviceProfiles", "CertificateProviders");
}
}
}
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.2.16272.1003")]
[assembly: AssemblyFileVersion("2.2.16272.1003")]
-6
View File
@@ -273,12 +273,6 @@ namespace Disco.Data.Repository
case "OrganisationalUnit":
dp.OrganisationalUnit = configurationItem.Value;
break;
case "AllocateWirelessCertificate":
if (bool.Parse(configurationItem.Value))
dp.CertificateProviderId = "";
else
dp.CertificateProviderId = null;
break;
default:
continue; // Unknown Configuration Item - Leave in DB & Ignore
}