harden updatecenter public route methods
This commit is contained in:
@@ -1013,6 +1013,22 @@ public sealed class FleetManifestLintTests
|
||||
match.Should().NotContain("Method(`POST`)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UpdateCenterPublicIngress_KeepsDeliveryOnlyGetHeadMethodAllowlist()
|
||||
{
|
||||
var publicIngress = AppDocuments("fc-updater")
|
||||
.Single(document => document.Kind == "IngressRoute" && document.Name == "updatecenter-web-public");
|
||||
var route = publicIngress.MappingSequence("spec", "routes").Should().ContainSingle().Subject;
|
||||
var match = ManifestNodeExtensions.Scalar(route, "match");
|
||||
|
||||
match.Should().Contain("Host(`update.flowercore.io`)");
|
||||
match.Should().Contain("Host(`updates.flowercore.io`)");
|
||||
match.Should().Contain("Method(`GET`)");
|
||||
match.Should().Contain("Method(`HEAD`)");
|
||||
match.Should().NotContain("Method(`POST`)");
|
||||
match.Should().NotContain("Method(`OPTIONS`)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DnsAndMediaIngressRoutes_MatchLiveInternalHosts()
|
||||
{
|
||||
|
||||
@@ -9,8 +9,6 @@ package bluejayinfra.public_readwrite_allowlist
|
||||
public_readwrite_hosts := {
|
||||
"updatecenter.iamworkin.lan",
|
||||
"updates.iamworkin.lan",
|
||||
"update.flowercore.io",
|
||||
"updates.flowercore.io",
|
||||
}
|
||||
|
||||
required_methods := {"GET", "HEAD", "POST", "OPTIONS"}
|
||||
|
||||
Reference in New Issue
Block a user