2using System.Collections.Frozen;
3using System.Collections.Generic;
4using System.Globalization;
5using System.IO.Abstractions;
6using System.Threading.Tasks;
9using Cyberboss.AspNetCore.AsyncInitializer;
11using Elastic.CommonSchema.Serilog;
13using HotChocolate.AspNetCore;
14using HotChocolate.Subscriptions;
15using HotChocolate.Types;
17using Microsoft.AspNetCore.Authentication;
18using Microsoft.AspNetCore.Authentication.Cookies;
19using Microsoft.AspNetCore.Authentication.JwtBearer;
20using Microsoft.AspNetCore.Authentication.OpenIdConnect;
21using Microsoft.AspNetCore.Authorization;
22using Microsoft.AspNetCore.Builder;
23using Microsoft.AspNetCore.Cors.Infrastructure;
24using Microsoft.AspNetCore.Hosting;
25using Microsoft.AspNetCore.Http;
26using Microsoft.AspNetCore.Http.Connections;
27using Microsoft.AspNetCore.HttpOverrides;
28using Microsoft.AspNetCore.Identity;
29using Microsoft.AspNetCore.Mvc.Infrastructure;
30using Microsoft.AspNetCore.SignalR;
31using Microsoft.Extensions.Configuration;
32using Microsoft.Extensions.DependencyInjection;
33using Microsoft.Extensions.Hosting;
34using Microsoft.Extensions.Logging;
35using Microsoft.Extensions.Options;
36using Microsoft.IdentityModel.Protocols.OpenIdConnect;
44using Serilog.Formatting.Display;
45using Serilog.Sinks.Elasticsearch;
89#pragma warning disable CA1506
95 readonly IWebHostEnvironment hostingEnvironment;
109 var fileSystem =
new FileSystem();
112 assemblyInformationProvider,
123 static void AddWatchdog<TSystemWatchdogFactory>(IServiceCollection services,
IPostSetupServices postSetupServices)
126 if (postSetupServices.GeneralConfiguration.UseBasicWatchdog)
137 static string GetOidcScheme(
string schemeKey)
138 => AuthenticationContextFactory.OpenIDConnectAuthenticationSchemePrefix + schemeKey;
146 IConfiguration configuration,
147 IWebHostEnvironment hostingEnvironment)
148 : base(configuration)
150 this.hostingEnvironment = hostingEnvironment ??
throw new ArgumentNullException(nameof(hostingEnvironment));
161 public void ConfigureServices(
162 IServiceCollection services,
166 IFileSystem fileSystem)
168 ConfigureServices(services, assemblyInformationProvider, ioManager);
170 ArgumentNullException.ThrowIfNull(postSetupServices);
180 services.AddOptions();
183 services.Configure<HostOptions>(
186 static LogEventLevel? ConvertSeriLogLevel(LogLevel logLevel) =>
189 LogLevel.Critical => LogEventLevel.Fatal,
190 LogLevel.Debug => LogEventLevel.Debug,
191 LogLevel.Error => LogEventLevel.Error,
192 LogLevel.Information => LogEventLevel.Information,
193 LogLevel.Trace => LogEventLevel.Verbose,
194 LogLevel.Warning => LogEventLevel.Warning,
195 LogLevel.None =>
null,
196 _ =>
throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture,
"Invalid log level {0}", logLevel)),
201 services.SetupLogging(
204 if (microsoftEventLevel.HasValue)
206 config.MinimumLevel.Override(
"Microsoft", microsoftEventLevel.Value);
207 config.MinimumLevel.Override(
"System.Net.Http.HttpClient", microsoftEventLevel.Value);
217 assemblyInformationProvider,
222 var formatter =
new MessageTemplateTextFormatter(
225 +
"): [{Level:u3}] {SourceContext:l}: {Message} ({EventId:x8}){NewLine}{Exception}",
228 logPath = ioManager.
ConcatPath(logPath,
"tgs-.log");
229 var rollingFileConfig = sinkConfig.File(
232 logEventLevel ?? LogEventLevel.Verbose,
234 flushToDiskInterval: TimeSpan.FromSeconds(2),
235 rollingInterval: RollingInterval.Day,
236 rollOnFileSizeLimit: true);
238 elasticsearchConfiguration.Enable
239 ?
new ElasticsearchSinkOptions(elasticsearchConfiguration.Host ??
throw new InvalidOperationException($
"Missing {ElasticsearchConfiguration.Section}:{nameof(elasticsearchConfiguration.Host)}!"))
243 ModifyConnectionSettings = connectionConfigration => (!String.IsNullOrWhiteSpace(elasticsearchConfiguration.Username) && !String.IsNullOrWhiteSpace(elasticsearchConfiguration.Password))
244 ? connectionConfigration
245 .BasicAuthentication(
246 elasticsearchConfiguration.Username,
247 elasticsearchConfiguration.Password)
248 .ServerCertificateValidationCallback((o, certificate, chain, errors) =>
true)
250 CustomFormatter = new EcsTextFormatter(),
251 AutoRegisterTemplate = true,
252 AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv7,
253 IndexFormat =
"tgs-logs",
263 var jsonVersionConverterList =
new List<JsonConverter>
268 void ConfigureNewtonsoftJsonSerializerSettingsForApi(JsonSerializerSettings settings)
270 settings.NullValueHandling = NullValueHandling.Ignore;
271 settings.CheckAdditionalContent =
true;
272 settings.MissingMemberHandling = MissingMemberHandling.Error;
273 settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
274 settings.Converters = jsonVersionConverterList;
280 options.ReturnHttpNotAcceptable =
true;
281 options.RespectBrowserAcceptHeader =
true;
283 .AddNewtonsoftJson(options =>
285 options.AllowInputFormatterExceptionMessages =
true;
286 ConfigureNewtonsoftJsonSerializerSettingsForApi(options.SerializerSettings);
294 .AddNewtonsoftJsonProtocol(options =>
296 ConfigureNewtonsoftJsonSerializerSettingsForApi(options.PayloadSerializerSettings);
304 var assemblyDocumentationPath = GetDocumentationFilePath(GetType().Assembly.Location);
305 var apiDocumentationPath = GetDocumentationFilePath(typeof(
ApiHeaders).Assembly.Location);
307 services.AddSwaggerGenNewtonsoftSupport();
316 .ConfigureHttpClientDefaults(
317 builder => builder.ConfigureHttpClient(
318 client => client.DefaultRequestHeaders.UserAgent.Add(
324 services.AddSingleton<IMetricFactory>(_ => Metrics.DefaultFactory);
325 services.AddSingleton<ICollectorRegistry>(_ => Metrics.DefaultRegistry);
328 services.AddMetricServer(options => options.Port = prometheusPort.Value);
330 services.UseHttpClientMetrics();
332 var healthChecksBuilder = services
334 .ForwardToPrometheus();
340 .ModifyOptions(options =>
342 options.EnsureAllNodesCanBeResolved =
true;
343 options.EnableFlagEnums =
true;
346 .ModifyCostOptions(options =>
348 options.EnforceCostLimits =
false;
351 .AddMutationConventions()
352 .AddInMemorySubscriptions(
353 new SubscriptionOptions
355 TopicBufferCapacity = 1024,
357 .AddGlobalObjectIdentification()
358 .AddQueryFieldToMutationPayloads()
359 .ModifyOptions(options =>
361 options.EnableDefer =
true;
363 .ModifyPagingOptions(pagingOptions =>
365 pagingOptions.IncludeTotalCount =
true;
366 pagingOptions.RequirePagingBoundaries =
false;
375 .AddType<StandaloneNode>()
377 .AddType<GraphQL.Types.UserName>()
378 .AddType<UnsignedIntType>()
379 .BindRuntimeType<Version, SemverType>()
381 .AddQueryType<Query>()
383 .AddSubscriptionType<Subscription>();
385 void AddTypedContext<TContext>()
390 services.AddDbContextPool<TContext>((serviceProvider, builder) =>
392 if (hostingEnvironment.IsDevelopment())
393 builder.EnableSensitiveDataLogging();
395 var databaseConfigOptions = serviceProvider.GetRequiredService<IOptions<DatabaseConfiguration>>();
396 var databaseConfig = databaseConfigOptions.Value ??
throw new InvalidOperationException(
"DatabaseConfiguration missing!");
397 configureAction(builder, databaseConfig);
399 services.AddScoped<
IDatabaseContext>(x => x.GetRequiredService<TContext>());
402 .AddDbContextCheck<TContext>();
411 AddTypedContext<MySqlDatabaseContext>();
414 AddTypedContext<SqlServerDatabaseContext>();
417 AddTypedContext<SqliteDatabaseContext>();
420 AddTypedContext<PostgresSqlDatabaseContext>();
423 throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture,
"Invalid {0}: {1}!", nameof(
DatabaseType), dbType));
436 services.AddSingleton<IPasswordHasher<Models.User>, PasswordHasher<Models.User>>();
441 AddWatchdog<WindowsWatchdogFactory>(services, postSetupServices);
455 AddWatchdog<PosixWatchdogFactory>(services, postSetupServices);
466 services.AddSingleton(x =>
new Lazy<IProcessExecutor>(() => x.GetRequiredService<
IProcessExecutor>(),
true));
474 var openDreamRepositoryDirectory = ioManager.
ConcatPath(
475 ioManager.GetPathInLocalDirectory(assemblyInformationProvider),
476 "OpenDreamRepository");
477 services.AddSingleton(
479 .GetRequiredService<IRepositoryManagerFactory>()
480 .CreateRepositoryManager(
482 openDreamRepositoryDirectory),
485 services.AddSingleton(
486 serviceProvider =>
new Dictionary<EngineType, IEngineInstaller>
491 .ToFrozenDictionary());
517 services.AddChatProviderFactory();
519 services.AddSingleton<IServerUpdater, ServerUpdater>();
520 services.AddSingleton<IServerUpdateInitiator, ServerUpdateInitiator>();
535 services.AddSingleton<IServerPortProvider, ServerPortProivder>();
537 services.AddSingleton(fileSystem);
538 services.AddHostedService<CommandPipeManager>();
539 services.AddHostedService<VersionReportingService>();
541 services.AddFileDownloader();
542 services.AddGitHub();
573 public void Configure(
574 IApplicationBuilder applicationBuilder,
575 IServerControl serverControl,
577 IServerPortProvider serverPortProvider,
579 IOptions<ControlPanelConfiguration> controlPanelConfigurationOptions,
580 IOptions<GeneralConfiguration> generalConfigurationOptions,
581 IOptions<DatabaseConfiguration> databaseConfigurationOptions,
582 IOptions<SecurityConfiguration> securityConfigurationOptions,
583 IOptions<SwarmConfiguration> swarmConfigurationOptions,
584 IOptions<InternalConfiguration> internalConfigurationOptions,
585 ILogger<Application> logger)
587 ArgumentNullException.ThrowIfNull(applicationBuilder);
588 ArgumentNullException.ThrowIfNull(serverControl);
590 this.tokenFactory = tokenFactory ??
throw new ArgumentNullException(nameof(tokenFactory));
592 ArgumentNullException.ThrowIfNull(serverPortProvider);
593 ArgumentNullException.ThrowIfNull(assemblyInformationProvider);
595 var controlPanelConfiguration = controlPanelConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(controlPanelConfigurationOptions));
596 var generalConfiguration = generalConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(generalConfigurationOptions));
597 var databaseConfiguration = databaseConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(databaseConfigurationOptions));
598 var swarmConfiguration = swarmConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(swarmConfigurationOptions));
599 var internalConfiguration = internalConfigurationOptions?.Value ??
throw new ArgumentNullException(nameof(internalConfigurationOptions));
601 ArgumentNullException.ThrowIfNull(logger);
603 logger.LogDebug(
"Database provider: {provider}", databaseConfiguration.DatabaseType);
604 logger.LogDebug(
"Content Root: {contentRoot}", hostingEnvironment.ContentRootPath);
605 logger.LogTrace(
"Web Root: {webRoot}", hostingEnvironment.WebRootPath);
609 applicationBuilder.UseAdditionalRequestLoggingContext(swarmConfiguration);
612 applicationBuilder.UseServerErrorHandling();
615 var forwardedHeaderOptions =
new ForwardedHeadersOptions
617 ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost,
620 forwardedHeaderOptions.KnownNetworks.Clear();
621 forwardedHeaderOptions.KnownNetworks.Add(
623 global::System.Net.IPAddress.Any,
626 applicationBuilder.UseForwardedHeaders(forwardedHeaderOptions);
629 applicationBuilder.UseHttpMetrics();
632 applicationBuilder.UseServerBranding(assemblyInformationProvider);
635 applicationBuilder.UseDisabledNginxProxyBuffering();
638 applicationBuilder.UseCancelledRequestSuppression();
642 (instanceManager, cancellationToken) => instanceManager.
Ready.WaitAsync(cancellationToken));
644 if (generalConfiguration.HostApiDocumentation)
646 var siteDocPath = Routes.ApiRoot + $
"doc/{SwaggerConfiguration.DocumentName}.json";
647 if (!String.IsNullOrWhiteSpace(controlPanelConfiguration.PublicPath))
648 siteDocPath = controlPanelConfiguration.PublicPath.TrimEnd(
'/') + siteDocPath;
650 applicationBuilder.UseSwagger(options =>
652 options.RouteTemplate = Routes.ApiRoot +
"doc/{documentName}.{json|yaml}";
654 applicationBuilder.UseSwaggerUI(options =>
657 options.SwaggerEndpoint(siteDocPath,
"TGS API");
659 logger.LogTrace(
"Swagger API generation enabled");
663 if (controlPanelConfiguration.Enable)
665 logger.LogInformation(
"Web control panel enabled.");
666 applicationBuilder.UseFileServer(
new FileServerOptions
669 EnableDefaultFiles =
true,
670 EnableDirectoryBrowsing =
false,
671 RedirectToAppendTrailingSlash =
false,
676 logger.LogDebug(
"Web control panel was not included in TGS build!");
678 logger.LogTrace(
"Web control panel disabled!");
682 applicationBuilder.UseRouting();
685 Action<CorsPolicyBuilder>? corsBuilder =
null;
686 if (controlPanelConfiguration.AllowAnyOrigin)
688 logger.LogTrace(
"Access-Control-Allow-Origin: *");
689 corsBuilder = builder => builder.SetIsOriginAllowed(_ =>
true);
691 else if (controlPanelConfiguration.AllowedOrigins?.Count > 0)
693 logger.LogTrace(
"Access-Control-Allow-Origin: {allowedOrigins}", String.Join(
',', controlPanelConfiguration.AllowedOrigins));
694 corsBuilder = builder => builder.WithOrigins([.. controlPanelConfiguration.AllowedOrigins]);
697 var originalBuilder = corsBuilder;
698 corsBuilder = builder =>
704 .SetPreflightMaxAge(TimeSpan.FromDays(1));
705 originalBuilder?.Invoke(builder);
707 applicationBuilder.UseCors(corsBuilder);
710 applicationBuilder.UseApiCompatibility();
713 applicationBuilder.UseAuthentication();
716 applicationBuilder.UseAuthorization();
719 applicationBuilder.UseDbConflictHandling();
722 applicationBuilder.UseEndpoints(endpoints =>
729 options.Transports = HttpTransportType.ServerSentEvents;
730 options.CloseOnAuthenticationExpiration =
true;
732 .RequireAuthorization()
733 .RequireCors(corsBuilder);
736 endpoints.MapControllers();
738 if (internalConfiguration.EnableGraphQL)
740 logger.LogWarning(
"Enabling GraphQL. This API is experimental and breaking changes may occur at any time!");
741 var gqlOptions =
new GraphQLServerOptions
743 EnableBatching =
true,
746 gqlOptions.Tool.Enable = generalConfiguration.HostApiDocumentation;
750 .WithOptions(gqlOptions);
753 if (generalConfiguration.PrometheusPort.HasValue)
754 if (generalConfiguration.PrometheusPort == generalConfiguration.ApiPort)
756 endpoints.MapMetrics();
757 logger.LogDebug(
"Prometheus being hosted alongside server");
760 logger.LogDebug(
"Prometheus being hosted on port {prometheusPort}", generalConfiguration.PrometheusPort);
762 logger.LogTrace(
"Prometheus disabled");
764 endpoints.MapHealthChecks(
"/health");
766 var oidcConfig = securityConfigurationOptions.Value.OpenIDConnect;
767 if (oidcConfig ==
null)
770 foreach (var kvp
in oidcConfig)
772 $
"/oidc/{kvp.Key}/signin",
773 context => context.ChallengeAsync(
774 GetOidcScheme(kvp.Key),
775 new AuthenticationProperties
777 RedirectUri = $
"/oidc/{kvp.Key}/landing",
785 if (controlPanelConfiguration.Enable)
788 logger.LogDebug(
"Starting hosting on port {httpApiPort}...", serverPortProvider.HttpApiPort);
792 protected override void ConfigureHostedService(IServiceCollection services)
800 void ConfigureAuthenticationPipeline(IServiceCollection services,
SecurityConfiguration securityConfiguration)
802 services.AddHttpContextAccessor();
816 services.AddScoped(provider => (provider
817 .GetRequiredService<IHttpContextAccessor>()
818 .HttpContext ??
throw new InvalidOperationException($
"Unable to resolve {nameof(IAuthenticationContext)} due to no HttpContext being available!"))
820 .GetRequiredService<AuthenticationContextFactory>()
821 .CurrentAuthenticationContext);
824 var authBuilder = services
825 .AddAuthentication(options =>
827 options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
829 .AddJwtBearer(jwtBearerOptions =>
833 jwtBearerOptions.TokenValidationParameters = tokenFactory?.
ValidationParameters ??
throw new InvalidOperationException(
"tokenFactory not initialized!");
834 jwtBearerOptions.MapInboundClaims =
false;
835 jwtBearerOptions.Events =
new JwtBearerEvents
837 OnMessageReceived = context =>
839 if (String.IsNullOrWhiteSpace(context.Token))
841 var accessToken = context.Request.Query[
"access_token"];
842 var path = context.HttpContext.Request.Path;
844 if (!String.IsNullOrWhiteSpace(accessToken) &&
845 path.StartsWithSegments(
Routes.
HubsRoot, StringComparison.OrdinalIgnoreCase))
847 context.Token = accessToken;
851 return Task.CompletedTask;
853 OnTokenValidated = context => context
865 services.AddAuthorization(options =>
870 .RequireAuthenticatedUser()
877 if (oidcConfig ==
null || oidcConfig.Count == 0)
880 authBuilder.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme);
882 foreach (var kvp
in oidcConfig)
884 var configName = kvp.Key;
887 GetOidcScheme(configName),
890 var config = kvp.Value;
892 options.Authority = config.Authority?.ToString();
893 options.ClientId = config.ClientId;
894 options.ClientSecret = config.ClientSecret;
896 options.Events =
new OpenIdConnectEvents
898 OnRemoteFailure = context =>
900 context.HandleResponse();
901 context.HttpContext.Response.Redirect($
"{config.ReturnPath}?error={HttpUtility.UrlEncode(context.Failure?.Message ?? $"{options.Events.OnRemoteFailure} was called without an {nameof(
Exception)}!
")}&state=oidc.{HttpUtility.UrlEncode(configName)}");
902 return Task.CompletedTask;
904 OnTicketReceived = context =>
906 var services = context
909 var tokenFactory = services
911 var authenticationContext = services
913 context.HandleResponse();
914 context.HttpContext.Response.Redirect($
"{config.ReturnPath}?code={HttpUtility.UrlEncode(tokenFactory.CreateToken(authenticationContext.User, true))}&state=oidc.{HttpUtility.UrlEncode(configName)}");
915 return Task.CompletedTask;
919 Task CompleteAuth(RemoteAuthenticationContext<OpenIdConnectOptions> context)
934 options.GetClaimsFromUserInfoEndpoint =
true;
935 options.ClaimActions.MapUniqueJsonKey(config.GroupIdClaim, config.GroupIdClaim);
936 options.TokenValidationParameters =
new Microsoft.IdentityModel.Tokens.TokenValidationParameters
938 NameClaimType = config.UsernameClaim,
939 RoleClaimType =
"roles",
942 options.Scope.Add(OpenIdConnectScope.Profile);
943 options.Events.OnUserInformationReceived = CompleteAuth;
946 options.Events.OnTokenValidated = CompleteAuth;
948 options.Scope.Add(OpenIdConnectScope.OpenId);
949 options.Scope.Add(OpenIdConnectScope.OfflineAccess);
951 options.RequireHttpsMetadata =
false;
952 options.SaveTokens =
true;
953 options.ResponseType = OpenIdConnectResponseType.Code;
954 options.MapInboundClaims =
false;
956 options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
958 var basePath = $
"/oidc/{configName}/";
959 options.CallbackPath =
new PathString(basePath +
"signin-callback");
960 options.SignedOutCallbackPath =
new PathString(basePath +
"signout-callback");
961 options.RemoteSignOutPath =
new PathString(basePath +
"signout");
Routes to a server actions.
const string GraphQL
The GraphQL route.
const string HubsRoot
The root route of all hubs.
const string JobsHub
The root route of all hubs.
Base implementation of IEngineInstaller for EngineType.Byond.
Implementation of IEngineInstaller that forwards calls to different IEngineInstaller based on their a...
Implementation of IEngineInstaller for EngineType.OpenDream.
IEngineInstaller for Posix systems.
IEngineInstaller for windows systems.
Implementation of OpenDreamInstaller for Windows systems.
No-op implementation of IEventConsumer.
Constants used for communication with the DMAPI.
static readonly Version InteropVersion
The DMAPI InteropVersion being used.
Configuration options for the web control panel.
DatabaseType DatabaseType
The Configuration.DatabaseType to create.
File logging configuration options.
LogLevel MicrosoftLogLevel
The minimum Microsoft.Extensions.Logging.LogLevel to display in logs for Microsoft library sources.
string GetFullLogDirectory(IIOManager ioManager, IAssemblyInformationProvider assemblyInformationProvider, IPlatformIdentifier platformIdentifier)
Gets the evaluated log Directory.
LogLevel LogLevel
The minimum Microsoft.Extensions.Logging.LogLevel to display in logs.
bool Disable
If file logging is disabled.
General configuration options.
static readonly Version CurrentConfigVersion
The current ConfigVersion.
bool HostApiDocumentation
If the swagger documentation and UI should be made avaiable.
uint RestartTimeoutMinutes
The timeout minutes for restarting the server.
ushort? PrometheusPort
The port Prometheus metrics are published on, if any.
ushort ApiPort
The port the TGS API listens on.
Unstable configuration options used internally by TGS.
bool UsingSystemD
If the server is running under SystemD.
Configuration options pertaining to user security.
IDictionary< string, OidcConfiguration >? OpenIDConnect
OIDC provider settings keyed by scheme name.
bool OidcStrictMode
If OIDC strict mode should be enabled. This mode enforces the existence of at least one OpenIDConnect...
Configuration options for the game sessions.
Configuration for the server swarm system.
Configuration options for telemetry.
Configuration for the automatic update system.
Base Controller for API functions.
const ushort MaximumPageSize
Maximum size of Paginated<TModel> results.
const ushort DefaultPageSize
Default size of Paginated<TModel> results.
Controller for the web control panel.
const string ControlPanelRoute
Route to the ControlPanelController.
IActionResultExecutor<TResult> for LimitedStreamResults.
Backend abstract implementation of IDatabaseContext.
IErrorFilter for transforming ErrorMessageResponse-like Exception.
Fixes the names used for the default flags types in API rights.
Root type for GraphQL mutations.
IGateway for the SwarmNode this query is executing on.
IIOManager that resolves paths to Environment.CurrentDirectory.
IFilesystemLinkFactory for POSIX systems.
IPostWriteHandler for POSIX systems.
IFilesystemLinkFactory for windows systems.
IPostWriteHandler for Windows systems.
Handles mapping groups for the JobsHub.
A SignalR Hub for pushing job updates.
Attribute for bringing in the master versions list from MSBuild that aren't embedded into assemblies ...
string RawWebpanelVersion
The Version string of the control panel version built.
static MasterVersionsAttribute Instance
Return the Assembly's instance of the MasterVersionsAttribute.
A IClaimsTransformation that maps Claims using an IAuthenticationContext.
An IHubFilter that denies method calls and connections if the IAuthenticationContext is not valid for...
IAuthorizationHandler for RightsConditional<TRights>s and UserSessionValidRequirements.
ISystemIdentityFactory for posix systems.
Helper for using the AuthorizeAttribute with the Api.Rights system.
const string PolicyName
Policy used to apply global requirement of UserEnabledRole.
const string UserEnabledRole
Role used to indicate access to the server is allowed.
ISystemIdentityFactory for windows systems. Uses long running tasks due to potential networked domain...
Implementation of IServerFactory.
DI root for configuring a SetupWizard.
Helps keep servers connected to the same database in sync by coordinating updates.
Implements the SystemD notify service protocol.
Implementation of the file transfer service.
Helpers for manipulating the Serilog.Context.LogContext.
static string Template
Common template used for adding our custom log context to serilog.
Implements various filters for Swashbuckle.
const string DocumentationSiteRouteExtension
The path to the hosted documentation site.
static void Configure(SwaggerGenOptions swaggerGenOptions, string assemblyDocumentationPath, string apiDocumentationPath)
Configure the swagger settings.
JsonConverter and IYamlTypeConverter for serializing global::System.Versions in semver format.
SignalR client methods for receiving JobResponses.
IAuthority for administrative server operations.
Invokes TAuthority s from GraphQL endpoints.
IAuthority for authenticating with the server.
IAuthority for managing PermissionSets.
Invokes TAuthority methods and generates IActionResult responses.
IAuthority for managing Users.
IAuthority for managing UserGroups.
For creating IChatManagers.
Factory for creating IRemoteDeploymentManagers.
For downloading and installing game engines for a given system.
Factory for creating IInstances.
Task Ready
Task that completes when the IInstanceManager finishes initializing.
Handler for BridgeParameters.
Factory for creating IGitRemoteFeatures.
For low level interactions with a LibGit2Sharp.IRepository.
Factory for creating LibGit2Sharp.IRepositorys.
Factory for creating IRepositoryManagers.
Factory for ITopicClients.
Factory for scoping usage of IDatabaseContexts. Meant for use by Components.
For initially setting up a database.
For creating filesystem symbolic links.
Interface for using filesystems.
string ConcatPath(params string[] paths)
Combines an array of strings into a path.
string GetDirectoryName(string path)
Gets the directory portion of a given path .
string GetFileNameWithoutExtension(string path)
Gets the file name portion of a path with.
IIOManager CreateResolverForSubdirectory(string subdirectoryPath)
Create a new IIOManager that resolves paths to the specified subdirectoryPath .
Handles changing file modes/permissions after writing.
For accessing the disk in a synchronous manner.
Manages the runtime of Jobs.
The service that manages everything to do with jobs.
Allows manually triggering jobs hub updates.
For creating and accessing authentication contexts.
Interface for accessing the current request's ClaimsPrincipal.
Contains various cryptographic functions.
For caching ISystemIdentitys.
Receives notifications about permissions updates.
Handles invalidating user sessions.
Factory for ISystemIdentitys.
For creating TokenResponses.
TokenValidationParameters ValidationParameters
The TokenValidationParameters for the ITokenFactory.
Handles validating authentication tokens.
Contains IOAuthValidators.
Set of objects needed to configure an Core.Application.
GeneralConfiguration GeneralConfiguration
The Configuration.GeneralConfiguration.
ElasticsearchConfiguration ElasticsearchConfiguration
The Configuration.ElasticsearchConfiguration.
FileLoggingConfiguration FileLoggingConfiguration
The Configuration.FileLoggingConfiguration.
DatabaseConfiguration DatabaseConfiguration
The Configuration.DatabaseConfiguration.
SecurityConfiguration SecurityConfiguration
The Configuration.SecurityConfiguration.
InternalConfiguration InternalConfiguration
The Configuration.InternalConfiguration.
IPlatformIdentifier PlatformIdentifier
The IPlatformIdentifier.
Swarm service operations for the Controllers.SwarmController.
Start and stop controllers for a swarm service.
Used for swarm operations. Functions may be no-op based on configuration.
Service for managing the dotnet-dump installation.
On Windows, DreamDaemon will show an unskippable prompt when using /world/proc/OpenPort()....
Abstraction for suspending and resuming processes.
Reads and writes to Streams associated with FileTicketResponses.
Service for temporarily storing files to be downloaded or uploaded.
Gets unassigned ports for use by TGS.
EngineType
The type of engine the codebase is using.
@ Configuration
ConfigurationRights.
DatabaseType
Type of database to user.