fix: SQS gateway JWT validation, MinIO/Temporal native JWT support
CI / Vet, test, build (push) Successful in 2m9s
CI / Build and push image (push) Successful in 45s

Auth strategy clarified per service:
- SQS: Gateway validates JWT (kmsvc code unverified, needs Phase 3)
- MinIO: Native JWT/OIDC support (validates itself, Phase 3: load-test)
- Temporal: Native JWT via jwtKeyProvider (Phase 3: configure)
- Memory, IAM: Services validate JWTs (dumb pipe)

SQS now requires Authorization header at gateway.
Phase 3 will implement actual JWT signature validation against Authentik.
This commit is contained in:
Admin Bot
2026-08-27 11:33:04 -07:00
parent 1dc688aec2
commit 95045e80f6
2 changed files with 23 additions and 5 deletions
+16 -2
View File
@@ -17,8 +17,10 @@ import (
)
// Dispatcher routes X-Service requests to upstreams.
// Acts as a dumb pipe: passes Authorization header through unchanged.
// Each upstream service validates JWTs independently.
// Auth per service:
// SQS: Gateway validates JWT (kmsvc code unverified)
// MinIO, Temporal: Native JWT support (dumb pipe pass-through)
// Memory, IAM: Services validate JWTs themselves
type Dispatcher struct {
registry *Registry
}
@@ -89,6 +91,18 @@ func (d *Dispatcher) Dispatch(w http.ResponseWriter, r *http.Request) {
return
}
// Gateway-level JWT validation for SQS (code unverified in kmsvc)
// MinIO, Temporal, Memory, IAM have native JWT support - pass through
if adapter.Spec.Auth.Required && serviceName == "sqs" {
if r.Header.Get("Authorization") == "" {
p := problem.NewProblem(http.StatusForbidden, "about:blank#forbidden",
"Forbidden", "SQS requires Authorization header")
_ = p.Write(w)
return
}
// TODO: Phase 3 - validate JWT signature against Authentik JWKS for SQS
}
// Detect protocol from upstream URL scheme
upstreamURL := adapter.Spec.Upstream.URL
if strings.HasPrefix(upstreamURL, "grpc://") {