Merge pull request #2169 from tgstation/FixesAndShit [TGSDeploy]

v6.15.1: Fixes and shit
This commit is contained in:
Jordan Dominion
2025-03-17 22:06:46 -04:00
committed by GitHub
8 changed files with 45 additions and 7 deletions
+3 -1
View File
@@ -329,7 +329,7 @@ Create an `appsettings.Production.yml` file next to `appsettings.yml`. This will
#### OAuth Configuration
- `Security:OAuth:<Provider Name>`: Sets the OAuth client ID and secret for a given `<Provider Name>`. The currently supported providers are `GitHub`, `Discord`, `InvisionCommunity` and `TGForums`. Setting these fields to `null` disables logins AND gateway auth with the provider, but does not stop users from associating their accounts using the API. Sample Entry:
- `Security:OAuth:<Provider Name>`: Sets the OAuth client ID and secret for a given `<Provider Name>`. The currently supported providers are `GitHub`, `Discord`, and `InvisionCommunity`. Setting these fields to `null` disables logins AND gateway auth with the provider, but does not stop users from associating their accounts using the API. Sample Entry:
```yml
Security:
OAuth:
@@ -369,6 +369,8 @@ Security:
- `Security:OidcStrictMode`: Boolean flag that, when `true`, disables password and OAuth logins, password changes, individual permission set assignment, and enables user registration using OpenID Connect providers. The claim name `tgstation-server-group-id` is used to dictate what TGS group users are registered to.
_Note: When using OIDC with a reverse proxy, TGS must receive `X-Forwarded` headers to properly identify the redirect URI to use. i.e. `X-Forwarded-Host` and `X-Forwarded-Proto`._
### Database Configuration
If using a MariaDB/MySQL server, our client library [recommends you set 'utf8mb4' as your default charset](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1-recommended-server-charset) disregard at your own risk.
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- Integration tests will ensure they match across the board -->
<Import Project="WebpanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>6.15.0</TgsCoreVersion>
<TgsCoreVersion>6.15.1</TgsCoreVersion>
<TgsConfigVersion>5.6.0</TgsConfigVersion>
<TgsRestVersion>10.13.0</TgsRestVersion>
<TgsGraphQLVersion>0.6.0</TgsGraphQLVersion>
+1 -1
View File
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- This is in it's own file to help incremental building, changing it causes a complete rebuild of the web panel -->
<TgsWebpanelVersion>6.9.0</TgsWebpanelVersion>
<TgsWebpanelVersion>6.9.3</TgsWebpanelVersion>
</PropertyGroup>
</Project>
@@ -21,11 +21,11 @@
<!-- Usage: Command line argument support -->
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<!-- Usage: Identifies when we are running in the context of the Windows SCM -->
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.3" />
<!-- Usage: Windows event log logging plugin -->
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="9.0.3" />
<!-- Usage: Console logging plugin -->
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.3" />
<!-- Usage: Updated transitive dependency of Core.System.ServiceProcess -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<!-- Usage: Updated transitive dependency of Core.System.ServiceProcess -->
@@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Connections;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.SignalR;
@@ -617,6 +618,12 @@ namespace Tgstation.Server.Host.Core
// Wrap exceptions in a 500 (ErrorMessage) response
applicationBuilder.UseServerErrorHandling();
// header forwarding important for OIDC
applicationBuilder.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost,
});
// metrics capture
applicationBuilder.UseHttpMetrics();
@@ -110,7 +110,7 @@
<!-- Usage: git interop -->
<PackageReference Include="LibGit2Sharp" Version="0.31.0" />
<!-- Usage: OpenID Connect support -->
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.14" />
<!-- Usage: Support ""legacy"" Newotonsoft.Json in HTTP pipeline. The rest of our codebase uses Newtonsoft. -->
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.14" />
<!-- Usage: Using target JSON serializer for API -->
@@ -130,7 +130,7 @@
<!-- Usage: Database connectivity health check -->
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.14" />
<!-- Usage: OIDC support prerequisite. See https://stackoverflow.com/a/78650835/3976486 -->
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.6.0" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.6.1" />
<!-- Usage: POSIX support for syscalls, signals, and symlinks -->
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<!-- Usage: Cron string parsing -->
@@ -41,6 +41,7 @@ namespace Tgstation.Server.ReleaseNotes
Author = author
};
})
.Distinct(new ChangelistEqualityComparer())
.ToList();
}
@@ -0,0 +1,28 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
namespace Tgstation.Server.ReleaseNotes
{
internal class ChangelistEqualityComparer : IEqualityComparer<Change>
{
public bool Equals(Change x, Change y)
{
if (x == y)
return true;
if (x == null)
return false;
if (y == null)
return false;
return JsonSerializer.Serialize(x) == JsonSerializer.Serialize(y);
}
public int GetHashCode([DisallowNull] Change obj)
{
return JsonSerializer.Serialize(obj).GetHashCode();
}
}
}