Last active
April 2, 2021 10:10
-
-
Save nrjpoddar/daa0e74f59695fed891affacd40c17ab to your computer and use it in GitHub Desktop.
Test AuthZ policies applied with bookinfo-gateway.yaml applied
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
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-1 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: ingressgateway | |
action: DENY | |
rules: | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8080" ] | |
--- | |
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-2 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: ingressgateway | |
action: DENY | |
rules: | |
- from: | |
- source: | |
namespaces: ["dev"] | |
--- | |
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-3 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: wrong-ingressgateway | |
action: DENY | |
rules: | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "80" ] | |
--- | |
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-4 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: ingressgateway | |
action: DENY | |
rules: | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8443" ] | |
--- | |
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-5 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: ingressgateway | |
action: DENY | |
rules: | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8080" ] | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8443" ] | |
--- | |
apiVersion: "security.istio.io/v1beta1" | |
kind: "AuthorizationPolicy" | |
metadata: | |
name: block-admin-access-6 | |
namespace: istio-system | |
spec: | |
selector: | |
matchLabels: | |
istio: ingressgateway | |
action: DENY | |
rules: | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8443" ] | |
- to: | |
- operation: | |
paths: ["/admin"] | |
ports: [ "8080" ] | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment