Commit Graph
2 Commits
Author SHA1 Message Date
Admin Bot 9d9395d938 feat: Phase 3.1 - SQS JWT validation against Authentik JWKS
CI / Vet, test, build (push) Successful in 2m4s
CI / Build and push image (push) Failing after 18s
Implements gateway-level JWT validation for SQS requests:
- Validates JWT signature against Authentik JWKS
- Verifies claims: iss, aud, exp, nbf (with 60s skew)
- Checks 'permissions' claim for sqs:read/sqs:write/wildcard
- Returns 403 with error details on validation failure
- JWKS caching with 15min TTL and auto-refresh on key rotation

Architecture:
- SQS: Gateway validates JWT (kmsvc code unverified)
- MinIO, Temporal: Native JWT support (pass-through)
- Memory, IAM: Service-owned JWT validation

Integration tests added:
- Reject requests without Authorization header (403)
- Accept requests with valid JWT from Authentik
- Pass through Authorization header unchanged for other services

Uses github.com/MicahParks/keyfunc/v2 for JWKS handling:
- Automatic refresh every 15 minutes
- On-demand refresh if kid not found
- Handles RS256 signatures
2026-08-27 11:40:35 -07:00
Admin Bot 1dc688aec2 test: real integration tests for X-Service adapter routing
CI / Vet, test, build (push) Canceled after 1m47s
CI / Build and push image (push) Canceled after 0s
Tests that verify actual service operations:
- SQS send-message routing
- S3 list-objects with JWT pass-through
- Memory query routing
- IAM with JWT
- Authorization header pass-through to services

Tests gracefully skip if services unreachable (expected behavior).
Tests get real JWT from Authentik if credentials provided.

Run: GATEWAY_URL=http://localhost:8080 ./scripts/test-integration.sh
Or:  GATEWAY_URL=https://api.riotpiao.com \
     AUTHENTIK_CLIENT_ID=xxx AUTHENTIK_CLIENT_SECRET=yyy \
     ./scripts/test-integration.sh
2026-08-27 11:31:17 -07:00