public PlatformLogsController(PlatformResourcesContext context, UserManager <IdentityUser> userManager, IAmazonCloudWatch cloudwatchClient, IAmazonCloudWatchEvents cloudwatcheventsClient, IAmazonCloudWatchLogs cloudwatchLogsClient) { this._context = context; this.CloudwatchClient = cloudwatchClient; this.CloudwatchEventsClient = cloudwatcheventsClient; this.CloudwatchLogsClient = cloudwatchLogsClient; this._userManager = userManager; }
public ServerTemplatesController(PlatformResourcesContext context, IAmazonEC2 ec2Client, IBackgroundTaskQueue Queue, IApplicationLifetime appLifetime, ILogger <ChallengeServersController> logger) { this._context = context; this.EC2Client = ec2Client; Backgroundqueue = Queue; _appLifetime = appLifetime; _logger = logger; }
public ScopedUpdatingService(ILogger <ScopedUpdatingService> logger, PlatformResourcesContext context, IAmazonEC2 EC2Client, IAmazonCloudWatch cloudwatchClient, IAmazonCloudWatchEvents cloudwatcheventsClient, IAmazonCloudWatchLogs cloudwatchlogsClient) { _logger = logger; this.context = context; ec2Client = EC2Client; cwClient = cloudwatchClient; cweClient = cloudwatcheventsClient; cwlClient = cloudwatchlogsClient; }
public HomeController(PlatformResourcesContext context, IAmazonCloudWatch CWClient, IAmazonSimpleNotificationService SNSClient, IServiceProvider services, IBackgroundTaskQueue Queue, IApplicationLifetime appLifetime, ILogger <HomeController> logger) { _context = context; this.CWClient = CWClient; this.SNSClient = SNSClient; Services = services; Backgroundqueue = Queue; _appLifetime = appLifetime; _logger = logger; }
public static void InitializePlatformResources(PlatformResourcesContext context) { context.Database.EnsureCreated(); if (!context.Templates.Any()) { var defaultTemplates = new Template[] { new Template { Name = "Microsoft Windows Server 2019 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("26/1/2019"), OperatingSystem = "Microsoft Windows Server 2019 Base", AWSAMIReference = "ami-0077b703cac9baa12", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Amazon Linux 2 LTS Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Amazon Linux 2 LTS", AWSAMIReference = "ami-0b84d2c53ad5250c2", SpecificMinimumSize = true, MinimumStorage = 8 }, new Template { Name = "Amazon Linux 2018.3 Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Amazon Linux 2018.3", AWSAMIReference = "ami-05b3bcf7f311194b3", SpecificMinimumSize = true, MinimumStorage = 8 }, new Template { Name = "Red Hat Enterprise Linux Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Red Hat Enterprise Linux 7.5", AWSAMIReference = "ami-76144b0a", SpecificMinimumSize = true, MinimumStorage = 10 }, new Template { Name = "SUSE Linux Enterprise Server Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "SUSE Linux Enterprise Server 15", AWSAMIReference = "ami-0920c364049458e86", SpecificMinimumSize = true, MinimumStorage = 10 }, new Template { Name = "Ubuntu Server 18.04 LTS Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Ubuntu Server 18.04 LTS", AWSAMIReference = "ami-0c5199d385b432989", SpecificMinimumSize = true, MinimumStorage = 8 }, new Template { Name = "Ubuntu Server 14.04 LTS Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Ubuntu Server 14.04 LTS", AWSAMIReference = "ami-039950f07c4a0d878", SpecificMinimumSize = true, MinimumStorage = 8 }, new Template { Name = "Microsoft Windows Server 2016 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2016 Base", AWSAMIReference = "ami-04385f3f533c85af7", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Microsoft Windows Server 2012 R2 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2012 R2 Base", AWSAMIReference = "ami-059b411d0e166914e", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Microsoft Windows Server 2012 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2012 Base", AWSAMIReference = "ami-0caa1a0b06b16e0c0", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Microsoft Windows Server 2008 R2 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2008 R2 Base", AWSAMIReference = "ami-0428d47da132d9763", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Microsoft Windows Server 2008 SP2 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2008 SP2 Base", AWSAMIReference = "ami-07bae34c7bd0d31d0", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Ubuntu Server 16.04 LTS Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Ubuntu Server 16.04 LTS", AWSAMIReference = "ami-0eb1f21bbd66347fe", SpecificMinimumSize = true, MinimumStorage = 8 }, new Template { Name = "Microsoft Windows Server 2003 R2 Base Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Microsoft Windows Server 2003 R2 Base", AWSAMIReference = "ami-0407dbd3ff0dca87c", SpecificMinimumSize = true, MinimumStorage = 30 }, new Template { Name = "Kali Linux Template", Type = TemplateType.Default, DateCreated = DateTime.Parse("1/1/2019"), OperatingSystem = "Kali Linux 2018.3", AWSAMIReference = "ami-0db99f1dca7fe5ee2", SpecificMinimumSize = true, MinimumStorage = 25, AWSSnapshotReference = "snap-0bd354666ed0d1609" }, new Template { Name = "Splunk Enterprise Template", Type = TemplateType.Custom, DateCreated = DateTime.Parse("5/1/2019"), OperatingSystem = "Amazon Linux 2 LTS", AWSAMIReference = "ami-04c4105e8f4bf70eb", SpecificMinimumSize = true, MinimumStorage = 15, TemplateDescription = "Default Amazon 2 LTS Template with Splunk Enterprise 7 Pre-loaded \nUser Name: eCTFAdmin \nPassword:eCTFP@ss", AWSSnapshotReference = "snap-0aaaa31ee20e240ea" } }; foreach (Template t in defaultTemplates) { context.Templates.Add(t); } context.SaveChanges(); } }
public ChallengeNetworkController(PlatformResourcesContext context, IAmazonEC2 ec2Client) { this._context = context; this.EC2Client = ec2Client; }