You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `quick_start.yaml` manifest defines the following resources:
33
34
34
-
* External Authorization Filter to direct authorization checks to the OPA-Envoy sidecar. See `kubectl -n istio-system get envoyfilter ext-authz` for details.
35
+
* AuthorizationPolicy to direct authorization checks to the OPA-Envoy sidecar. See `kubectl -n {$NAMESPACE} get authorizationpolicy ext-authz` for details.
36
+
37
+
* ServiceEntry to allow Istio to find the OPA-Envoy sidecars. See `kubectl -n {$NAMESPACE} get serviceentry opa-ext-authz-grpc-local` for details.
35
38
36
39
* Kubernetes namespace (`opa-istio`) for OPA-Envoy control plane components.
37
40
@@ -128,14 +131,32 @@ The `quick_start.yaml` manifest defines the following resources:
128
131
> API](https://www.openpolicyagent.org/docs/latest/bundles/). ConfigMaps are
129
132
> used in this tutorial for test purposes.
130
133
131
-
### 2. Enable automatic injection of the Istio Proxy and OPA-Envoy sidecars in the namespace where the app will be deployed, e.g., `default`
134
+
### 2. Configure the mesh to define the external authorizer
135
+
136
+
Edit the mesh configmap with `kubectl edit configmap -n istio-system istio` and define the external provider:
137
+
138
+
```yaml
139
+
data:
140
+
mesh: |-
141
+
# Add the following lines to define the ServiceEntry previously created as an external authorizer:
142
+
extensionProviders:
143
+
- name: opa-ext-authz-grpc
144
+
envoyExtAuthzGrpc:
145
+
service: opa-ext-authz-grpc.local
146
+
port: "9191"
147
+
```
148
+
149
+
See [the Istio Docs for AuthorizationPolicy](https://istio.io/latest/docs/tasks/security/authorization/authz-custom/#define-the-external-authorizer) for
150
+
more details.
151
+
152
+
### 3. Enable automatic injection of the Istio Proxy and OPA-Envoy sidecars in the namespace where the app will be deployed, e.g., `default`
### 4. Set the `SERVICE_HOST` environment variable in your shell to the public IP/port of the Istio Ingress gateway
169
+
### 5. Set the `SERVICE_HOST` environment variable in your shell to the public IP/port of the Istio Ingress gateway
149
170
150
171
Run this command in a new terminal window to start a Minikube tunnel that sends traffic to your Istio Ingress Gateway:
151
172
@@ -171,7 +192,7 @@ export SERVICE_HOST=$(kubectl -n istio-system get service istio-ingressgateway -
171
192
For other platforms see the [Istio documentation on determining ingress IP and ports.](https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports)
172
193
173
194
174
-
### 5. Exercise the OPA policy
195
+
### 6. Exercise the OPA policy
175
196
176
197
Check that **alice** can access `/productpage`**BUT NOT**`/api/v1/products`.
0 commit comments