Skip to content

Does not pewrform when using tcp-echo to test the l4 authorizationPolicy #653

@LiZhenCheng9527

Description

@LiZhenCheng9527

What happened:
When using tcp-echo to test the l4 authorizationPolicy, it does not perform the relevant actions.

I added the following configuration:

kubectl apply -f - <<EOF
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
 name: allow-by-tcp-echo 
 namespace: default
spec:
 selector:
   matchLabels:
     app: tcp-echo
 action: ALLOW
 rules:
 - from:
   - source:
       ipBlocks:
       - 10.244.0.118

I got:

kubectl exec sleep-bc9998558-w4nf4 -- sh -c 'echo "port 9000" | nc tcp-echo 9000' | grep "hello" && echo 'connection succeeded' || echo 'connection rejected'
hello port 9000
connection succeeded

No logs for auth deny.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kmesh version: 0.4.0-release
  • Others: 5.15.0-102-generic

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions