-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test checks whether different HTTP methods are properly handled by proxy and dropped if they don't match policy. Signed-off-by: Maciej Kwiek <[email protected]>
- Loading branch information
Showing
3 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
# client2 is allowed to contact the echo Pod | ||
# on port 8080 via POST method. HTTP introspection is enabled for client2. | ||
# The toFQDNs section relies on DNS introspection being performed by | ||
# the client-egress-only-dns policy. | ||
apiVersion: "cilium.io/v2" | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
namespace: cilium-test | ||
name: client-egress-l7-http-method | ||
spec: | ||
description: "Allow POST <echo>:8080/(public|private) from client2" | ||
endpointSelector: | ||
matchLabels: | ||
other: client | ||
egress: | ||
# Allow POST /public requests towards echo pods. | ||
- toEndpoints: | ||
- matchLabels: | ||
kind: echo | ||
toPorts: | ||
- ports: | ||
- port: "8080" | ||
protocol: TCP | ||
rules: | ||
http: | ||
- method: "POST" | ||
path: "/public$" | ||
- method: "POST" | ||
path: "/private$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters