Backport of Golden File Tests for TermGW w/ Cluster Peering into release/1.15.x (#19191)

backport of commit 1fffd233b3

Co-authored-by: Thomas Eckert <teckert@hashicorp.com>
pull/19397/head
hc-github-team-consul-core 1 year ago committed by GitHub
parent d0fea44be0
commit d6ce6135c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -934,12 +934,12 @@ func TestListenersFromSnapshot(t *testing.T) {
Bundles: []*pbpeering.PeeringTrustBundle{
{
TrustDomain: "foo.bar.gov",
PeerName: "dc1",
PeerName: "dc2",
Partition: "default",
RootPEMs: []string{
roots.Roots[0].RootCert,
},
ExportedPartition: "dc1",
ExportedPartition: "default",
CreateIndex: 0,
ModifyIndex: 0,
},
@ -950,8 +950,11 @@ func TestListenersFromSnapshot(t *testing.T) {
CorrelationID: "service-intentions:web",
Result: structs.Intentions{
{
SourceName: "*",
DestinationName: "web",
SourceName: "source",
SourcePeer: "dc2",
DestinationName: "web",
DestinationPartition: "default",
Action: structs.IntentionActionAllow,
},
},
},

@ -171,7 +171,29 @@
"name": "envoy.filters.network.rbac",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC",
"rules": {},
"rules": {
"policies": {
"consul-intentions-layer4": {
"permissions": [
{
"any": true
}
],
"principals": [
{
"authenticated": {
"principalName": {
"safeRegex": {
"googleRe2": {},
"regex": "^spiffe://foo.bar.gov/ns/default/dc/[^/]+/svc/source$"
}
}
}
}
]
}
}
},
"statPrefix": "connect_authz"
}
},

Loading…
Cancel
Save