Skip to content

Commit 660adb3

Browse files
Merge branch 'main' into feat/lfxv2-249-committee-model-writer-auditor
2 parents a2e5e4b + c26c332 commit 660adb3

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

charts/lfx-platform/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: v2
55
name: lfx-platform
66
description: LFX Platform v2 Helm chart
77
type: application
8-
version: 0.2.6
8+
version: 0.2.7
99
icon: https://github.com/linuxfoundation/lfx-v2-helm/raw/main/img/lfx-logo-color.svg
1010
dependencies:
1111
- name: traefik

charts/lfx-platform/templates/heimdall/middleware.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
# Copyright The Linux Foundation and each contributor to LFX.
22
# SPDX-License-Identifier: MIT
3-
---
43
{{ if and .Values.heimdall.enabled (or
54
.Values.gateway.enabled .Values.lfx.parentGateway.enabled) -}}
5+
---
6+
# Heimdall middleware with body forwarding capability
7+
# This is the default middleware that should be used in most cases, particularly
8+
# when parentRef requiring authentication is in the request body.
9+
# Note: For routes handling very large payloads (like file uploads), consider using
10+
# the lighter-weight middleware below to reduce overhead.
11+
apiVersion: traefik.io/v1alpha1
12+
kind: Middleware
13+
metadata:
14+
name: heimdall-forward-body
15+
namespace: {{ .Release.Namespace }}
16+
spec:
17+
forwardAuth:
18+
address: "http://{{ include "heimdall.fullname" .Subcharts.heimdall }}.{{ .Release.Namespace }}:{{ .Values.heimdall.service.main.port }}"
19+
authResponseHeaders:
20+
- Authorization
21+
forwardBody: true
22+
---
23+
# Alternative Heimdall middleware without body forwarding
24+
# Use this middleware only for routes where body inspection isn't required for authentication
25+
# and when dealing with large payloads where forwarding the entire body would be inefficient.
626
apiVersion: traefik.io/v1alpha1
727
kind: Middleware
828
metadata:

charts/lfx-platform/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ heimdall:
192192
type: allow
193193
- id: deny_all
194194
type: deny
195+
- id: json_content_type
196+
type: cel
197+
config:
198+
expressions:
199+
- expression: |
200+
Request.Header("Content-Type") == "application/json"
201+
message: "Content-Type must be application/json"
195202
- id: openfga_check
196203
type: remote
197204
config:

0 commit comments

Comments
 (0)