Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toggles for internal jwt bypass and for setting up the cluster rb… #325

Merged
merged 2 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion helm/mds/templates/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{{- if $api.enabled }}
{{- if hasKey $api "pathPrefix" }}
{{- if (ne $name "mds-web-sockets") }}
---
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
Expand Down Expand Up @@ -33,6 +32,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.jwt.bypassInternal }}
# This sets up outbound mTLS for intra-namespace requests
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
Expand Down Expand Up @@ -104,4 +104,18 @@ spec:
request.auth.audiences: {{ . | quote }}
request.auth.claims[iss]: {{ $.Values.jwt.issuer }}
{{- end }}
{{- if .Values.jwt.firstInstall }}
---
# THIS MUST BE IN PLACE FOR JWT TO FUNCTION CORRECTLY
apiVersion: "rbac.istio.io/v1alpha1"
kind: ClusterRbacConfig
metadata:
name: default
spec:
mode: 'ON_WITH_INCLUSION'
inclusion:
namespaces:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/mds/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ tls:
jwt:
issuer:
enabled: false
bypassInternal: false
firstInstall: false
audiences: []
postgresql:
internal: true
Expand Down