feat: add auth secret to HTTPRoute and remove hardcoded authorization transformation policy
This commit is contained in:
@@ -14,6 +14,10 @@ spec:
|
||||
policies:
|
||||
tls:
|
||||
sni: ha.hnrx.net
|
||||
auth:
|
||||
secretRef:
|
||||
name: homeassistant-mcp-secret
|
||||
namespace: agentgateway-system
|
||||
---
|
||||
apiVersion: secrets.phase.dev/v1alpha1
|
||||
kind: PhaseSecret
|
||||
@@ -34,6 +38,7 @@ spec:
|
||||
phaseAppEnv: production
|
||||
phaseAppEnvPath: /
|
||||
phaseHost: https://phase.hnrx.net
|
||||
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
@@ -62,20 +67,4 @@ spec:
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /mcp-homeassistant
|
||||
---
|
||||
apiVersion: gateway.kgateway.dev/v1alpha1
|
||||
kind: TrafficPolicy
|
||||
metadata:
|
||||
name: homeassistant-mcp-transformation
|
||||
namespace: agentgateway-system
|
||||
spec:
|
||||
targetRefs:
|
||||
- name: homeassistant-mcp
|
||||
group: gateway.networking.k8s.io
|
||||
kind: HTTPRoute
|
||||
transformation:
|
||||
request:
|
||||
set:
|
||||
- name: "Authorization"
|
||||
value: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2YzE1Njg2NjA3MjA0MjI5OTdlMjVmZTA0NmU5MjljNCIsImlhdCI6MTc3ODgzNzcwNCwiZXhwIjoyMDk0MTk3NzA0fQ.XOQuRv-1nEad_6GV-Nz-B-ZWzvo993E_NGkQ85V5DH4'
|
||||
value: /mcp-homeassistant
|
||||
Reference in New Issue
Block a user