Skip to content
Snippets Groups Projects
Commit 0019953f authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-10463-migrate-to-direct-response' into 'master'

Gonrg 10463 migrate to direct response

See merge request !838
parents ecd81f9a 3ce70b4f
Branches
Tags
1 merge request!838Gonrg 10463 migrate to direct response
Pipeline #293751 failed
# FIXME: remove it when migrate to istio 1.6 and use directResponse instead
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: {{ printf "%s-allow-policy" .Values.conf.appName | quote }}
namespace: {{ .Release.Namespace | quote }}
spec:
selector:
matchLabels:
app: {{ .Values.conf.appName | quote }}
action: ALLOW
rules:
- to:
- operation:
paths:
- /api/indexer/v2/*
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: {{ printf "%s-deny-policy" .Values.conf.appName | quote }}
namespace: {{ .Release.Namespace | quote }}
spec:
selector:
matchLabels:
app: {{ .Values.conf.appName | quote }}
action: DENY
rules:
- from:
- source:
notNamespaces: [ {{ .Release.Namespace | quote }} ]
to:
- operation:
paths:
- /api/indexer/v2/_dps/*
......@@ -15,14 +15,13 @@ spec:
gateways:
- service-gateway
http:
# FIXME: use it when migrate to istio 1.6
# - match:
# - uri:
# prefix: "/api/indexer/v2/_dps"
# directResponse:
# status: 403
# body:
# string: "Forbidden"
- match:
- uri:
prefix: "/api/indexer/v2/_dps"
directResponse:
status: 403
body:
string: "Forbidden"
- match:
- uri:
prefix: "/api/indexer/v2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment