Istio - Security Lab not working right

On part 12 of the Istio Security Lab the AuthorizationPolicy is not working as expected. The policy should only allow communication from the demo-app namespace, but the curl container in the default namespace is also able to get a response from nginx. In the demos it seemed like this should be working so I’m not sure what is missing.

root@controlplane:/# kubectl exec -n demo-app curl-pddmr -c curl -- curl -s 10.103.121.111
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
root@controlplane:/# kubectl exec curl-r7z6m -c curl -- curl -s 10.103.121.111
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

Hi @bkonicek ,

Thank you for your feedback.
I tested this but was not able to reproduce the error you mentioned.

If you are still facing this issue, could you please tell me the steps you used to reproduce this on my end?

Thanks

It worked this time. Not really sure what happened since the first time I did the lab I created the AuthorizationPolicy and the lab verified everything was set correctly. I redid it exactly the same as before and this time it properly blocked requests from the default namespace.