File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ services:
2424 image : envoyproxy/envoy:v1.35-latest
2525 ports :
2626 - 9211
27+ - 9212
2728 - 9901
2829 command :
2930 - /bin/sh
@@ -37,7 +38,7 @@ services:
3738 socket_address:
3839 address: 0.0.0.0
3940 port_value: 9901
40-
41+
4142 static_resources:
4243 listeners:
4344 - name: local-envoy
@@ -96,6 +97,39 @@ services:
9697 grpc: {}
9798 route:
9899 cluster: local-rpc-service
100+ - name: permission-denied-listener
101+ address:
102+ socket_address:
103+ address: 0.0.0.0
104+ port_value: 9212
105+ filter_chains:
106+ - filters:
107+ - name: envoy.filters.network.http_connection_manager
108+ typed_config:
109+ "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
110+ stat_prefix: permission_denied
111+ access_log:
112+ - name: envoy.access_loggers.stdout
113+ typed_config:
114+ "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
115+ http_filters:
116+ - name: envoy.filters.http.router
117+ typed_config:
118+ "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
119+ route_config:
120+ name: permission_denied_route
121+ virtual_hosts:
122+ - name: permission-denied
123+ domains:
124+ - "*"
125+ routes:
126+ - match:
127+ prefix: "/"
128+ grpc: {}
129+ direct_response:
130+ status: 403
131+ body:
132+ inline_string: "PERMISSION_DENIED"
99133 clusters:
100134 - name: local-sync-service
101135 type: LOGICAL_DNS
Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ Feature: flagd provider disconnect and reconnect functionality
5050 And a error event handler
5151 Then the error event handler should have been executed within 3000ms
5252
53+ @rpc @in-process @file @forbidden
54+ # This test ensures that a forbidden response from flagd results in a fatal client state
55+ Scenario : Provider forbidden
56+ Given a forbidden flagd provider
57+ And a error event handler
58+ Then the error event handler should have been executed within 5000ms
59+ And the client is in fatal state
60+
5361 @targetURI @rpc
5462 Scenario : Connection via TargetUri rpc
5563 Given an option "targetUri" of type "String" with value "envoy://localhost:<port>/rpc.service"
You can’t perform that action at this time.
0 commit comments