Skip to content
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
2 changes: 1 addition & 1 deletion parcellab/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: A Helm chart library for parcelLab charts
type: library
version: 1.3.6
version: 1.3.7
maintainers:
- name: parcelLab
email: engineering@parcellab.com
17 changes: 16 additions & 1 deletion parcellab/common/templates/_securitypolicies.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
{{- $globalJwtProviderName := $security.jwtProviderName -}}
{{- $globalJwksURI := $security.jwksURI -}}
{{- $globalAnnotations := default (dict) $security.annotations -}}
{{- $globalPassThroughAuthHeader := $security.passThroughAuthHeader -}}
{{- $globalRefreshToken := $security.refreshToken -}}

{{ range $policyIndex, $policy := $policies }}
{{- $policyName := required (printf "envoy.security.policies[%d].name is required" $policyIndex) $policy.name -}}
Expand All @@ -42,6 +44,18 @@
{{- $jwksURI := coalesce $policy.jwksURI $globalJwksURI (printf "%s/protocol/openid-connect/certs" $issuer) -}}
{{- $backendRefs := coalesce $policy.backendRefs $security.backendRefs -}}
{{- $annotations := merge (default (dict) $policy.annotations) $globalAnnotations -}}
{{- $passThroughAuthHeader := true -}}
{{- if and (hasKey $policy "passThroughAuthHeader") (ne $policy.passThroughAuthHeader nil) -}}
{{- $passThroughAuthHeader = $policy.passThroughAuthHeader -}}
{{- else if and (hasKey $security "passThroughAuthHeader") (ne $globalPassThroughAuthHeader nil) -}}
{{- $passThroughAuthHeader = $globalPassThroughAuthHeader -}}
{{- end -}}
{{- $refreshToken := true -}}
{{- if and (hasKey $policy "refreshToken") (ne $policy.refreshToken nil) -}}
{{- $refreshToken = $policy.refreshToken -}}
{{- else if and (hasKey $security "refreshToken") (ne $globalRefreshToken nil) -}}
{{- $refreshToken = $globalRefreshToken -}}
{{- end -}}
{{- $targetRef := $policy.targetRef -}}
{{- $targetRefs := $policy.targetRefs -}}
{{- $rawSelectors := list -}}
Expand Down Expand Up @@ -104,7 +118,8 @@ spec:
{{- end }}
cookieDomain: {{ $cookieDomain | quote }}
forwardAccessToken: true
passThroughAuthHeader: true
passThroughAuthHeader: {{ $passThroughAuthHeader }}
refreshToken: {{ $refreshToken }}
Comment thread
jmpalomares marked this conversation as resolved.
jwt:
optional: false
providers:
Expand Down
2 changes: 1 addition & 1 deletion parcellab/microservice/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: microservice
description: Simple microservice
version: 0.5.6
version: 0.5.7
dependencies:
- name: common
version: "*"
Expand Down
2 changes: 2 additions & 0 deletions parcellab/microservice/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ envoy:
# redirectURL: "https://my-app.example.com/oauth2/callback"
# cookieDomain: "my-app.example.com"
# annotations: {} # optional: annotations applied to all SecurityPolicy resources
# passThroughAuthHeader: true # optional: default true. Set false to reject unauthenticated requests at the gateway instead of forwarding the incoming Authorization header to the backend.
# refreshToken: true # optional: default true. Keep the OIDC session alive via refresh tokens.
# scopes:
# - profile
# - email
Expand Down
2 changes: 1 addition & 1 deletion parcellab/monolith/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: monolith
description: Application that may define multiple services and cronjobs
version: 0.5.7
version: 0.5.8
dependencies:
- name: common
version: "*"
Expand Down
2 changes: 2 additions & 0 deletions parcellab/monolith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ envoy:
# redirectURL: "https://my-app.example.com/oauth2/callback"
# cookieDomain: "my-app.example.com"
# annotations: {} # optional: annotations applied to all SecurityPolicy resources
# passThroughAuthHeader: true # optional: default true. Set false to reject unauthenticated requests at the gateway instead of forwarding the incoming Authorization header to the backend.
# refreshToken: true # optional: default true. Keep the OIDC session alive via refresh tokens.
# scopes:
# - profile
# - email
Expand Down
Loading