Commit 76c60fd Thomas Eckert
authored
1 parent c2a0d4f commit 76c60fd Copy full SHA for 76c60fd
File tree 2 files changed +30
-5
lines changed
2 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -1093,12 +1093,12 @@ func TestListenersFromSnapshot(t *testing.T) {
1093
1093
Bundles : []* pbpeering.PeeringTrustBundle {
1094
1094
{
1095
1095
TrustDomain : "foo.bar.gov" ,
1096
- PeerName : "dc1 " ,
1096
+ PeerName : "dc2 " ,
1097
1097
Partition : "default" ,
1098
1098
RootPEMs : []string {
1099
1099
roots .Roots [0 ].RootCert ,
1100
1100
},
1101
- ExportedPartition : "dc1 " ,
1101
+ ExportedPartition : "default " ,
1102
1102
CreateIndex : 0 ,
1103
1103
ModifyIndex : 0 ,
1104
1104
},
@@ -1109,8 +1109,11 @@ func TestListenersFromSnapshot(t *testing.T) {
1109
1109
CorrelationID : "service-intentions:web" ,
1110
1110
Result : structs.SimplifiedIntentions {
1111
1111
{
1112
- SourceName : "*" ,
1113
- DestinationName : "web" ,
1112
+ SourceName : "source" ,
1113
+ SourcePeer : "dc2" ,
1114
+ DestinationName : "web" ,
1115
+ DestinationPartition : "default" ,
1116
+ Action : structs .IntentionActionAllow ,
1114
1117
},
1115
1118
},
1116
1119
},
Original file line number Diff line number Diff line change 171
171
"name": "envoy.filters.network.rbac",
172
172
"typedConfig": {
173
173
"@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC",
174
- "rules": {},
174
+ "rules": {
175
+ "policies": {
176
+ "consul-intentions-layer4": {
177
+ "permissions": [
178
+ {
179
+ "any": true
180
+ }
181
+ ],
182
+ "principals": [
183
+ {
184
+ "authenticated": {
185
+ "principalName": {
186
+ "safeRegex": {
187
+ "googleRe2": {},
188
+ "regex": "^spiffe://foo.bar.gov/ns/default/dc/[^/]+/svc/source$"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ ]
194
+ }
195
+ }
196
+ },
175
197
"statPrefix": "connect_authz"
176
198
}
177
199
},
You can’t perform that action at this time.
0 commit comments