Commit d0bfa65f by gitlawr Committed by Alena Prokharchyk

Restrict RBAC rules for accessing Istio service proxy

Formerly, it is accessible by authenticated users. Now, it is accessible by cluster owners and authorized users/groups.
parent dd05aa02
...@@ -10,17 +10,20 @@ rules: ...@@ -10,17 +10,20 @@ rules:
verbs: ["get", "watch", "list"] verbs: ["get", "watch", "list"]
--- ---
{{- if .Values.global.members }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
name: read-istio-service name: read-istio-service
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
subjects: subjects:
- kind: Group {{- range $member := .Values.global.members }}
name: system:authenticated - kind: {{ $member.kind }}
name: {{ $member.name }}
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
{{- end }}
roleRef: roleRef:
kind: Role kind: Role
name: istio-service-reader name: istio-service-reader
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
\ No newline at end of file {{- end }}
\ No newline at end of file
...@@ -139,6 +139,12 @@ istiocoredns: ...@@ -139,6 +139,12 @@ istiocoredns:
# Common settings used among istio subcharts. # Common settings used among istio subcharts.
global: global:
# Specify members that can access istio service proxy
# members:
# - kind: User
# name: u-abcba
# - kind: Group
# name: github_org://1234567
# Specify rancher domain and clusterId of external tracing config # Specify rancher domain and clusterId of external tracing config
# https://github.com/istio/istio.io/issues/4146#issuecomment-493543032 # https://github.com/istio/istio.io/issues/4146#issuecomment-493543032
rancher: rancher:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment