feat(deployment): add secure Linux runtime (#17)
This commit is contained in:
+21
-2
@@ -666,15 +666,30 @@ public sealed class TestClientProcessIntegrationTests
|
||||
private static Dictionary<string, string> ServerEnvironment(
|
||||
string signingKey,
|
||||
DateTimeOffset now,
|
||||
string listenAddress)
|
||||
string listenAddress,
|
||||
string? readinessAddress)
|
||||
{
|
||||
string advertisedAddress = readinessAddress ?? listenAddress;
|
||||
string allowedHosts = string.Join(
|
||||
';',
|
||||
new[] { advertisedAddress, listenAddress, "127.0.0.1", "localhost" }
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase));
|
||||
Dictionary<string, string> values = new(StringComparer.Ordinal)
|
||||
{
|
||||
["ASPNETCORE_ENVIRONMENT"] = "Production",
|
||||
["ASPNETCORE_URLS"] = $"http://{listenAddress}:0",
|
||||
["AllowedHosts"] = allowedHosts,
|
||||
["Rendezvous__Deployment__PublicHttpBaseUrl"] = $"https://{advertisedAddress}/",
|
||||
["Rendezvous__Deployment__PublicUdpHost"] = advertisedAddress,
|
||||
["Rendezvous__Deployment__PublicUdpPort"] = "9050",
|
||||
["Rendezvous__Deployment__DrainDeadlineSeconds"] = "3",
|
||||
["Rendezvous__Deployment__MinimumDrainSeconds"] = "1",
|
||||
["Rendezvous__Deployment__SingleActiveInstance"] = "true",
|
||||
["Rendezvous__Deployment__AllowPrivatePublicEndpoints"] = "true",
|
||||
["Rendezvous__Udp__ListenAddress"] = listenAddress,
|
||||
["Rendezvous__Udp__Port"] = "0",
|
||||
["Rendezvous__Udp__PollIntervalMilliseconds"] = "1",
|
||||
["Rendezvous__AbuseProtection__TrustedProxyAddresses__0"] = "127.0.0.1",
|
||||
["Rendezvous__Provisioning__Issuer"] = "rendezvous-process-test",
|
||||
["Rendezvous__Provisioning__Audience"] = "rendezvous-process-test-client",
|
||||
["Rendezvous__Provisioning__ClockSkewSeconds"] = "5",
|
||||
@@ -1346,7 +1361,11 @@ public sealed class TestClientProcessIntegrationTests
|
||||
string signingKeyText = Convert.ToBase64String(signingKey);
|
||||
string publisherCredential = IssuePublisherCredential(signingKey, now);
|
||||
CryptographicOperations.ZeroMemory(signingKey);
|
||||
Dictionary<string, string> environment = ServerEnvironment(signingKeyText, now, listenAddress);
|
||||
Dictionary<string, string> environment = ServerEnvironment(
|
||||
signingKeyText,
|
||||
now,
|
||||
listenAddress,
|
||||
readinessAddress);
|
||||
ProcessCapture server = processNamespace is null
|
||||
? Start(serverAssembly, [], environment)
|
||||
: StartInNamespace(processNamespace, serverAssembly, [], environment);
|
||||
|
||||
Reference in New Issue
Block a user