feat: JWT auth validation with Authentik OIDC
Build and Push / Test (push) Failing after 3m1s
Build and Push / Build and push image (push) Skipped

- Add jwt_validator module with JWKS caching (TTL + refresh-on-miss)
- Implement RS256 algorithm pinning + claim validation
- Replace apikey with Bearer token validation in http_server
- Add capability-based access control (memory:read/write/*)
- Backward compatible: MEM_AUTH_MODE=jwt|apikey (default: apikey)
- 16 tests passing (7 unit + 9 integration)
- Docs: JWT_AUTH.md with deployment guide

Config via env vars:
- MEM_AUTH_MODE=jwt
- AUTHENTIK_ISSUER=https://authentik.riotpiao.com/application/o/poimen-memory/
- AUTHENTIK_AUDIENCE=poimen-memory
- JWT_CACHE_TTL_SECS=3600 (optional)

Gw passes Authorization: Bearer <token> header
Memory validates + checks permissions claim
This commit is contained in:
Story Crater Bot
2026-08-27 12:29:23 -07:00
parent 71ecf482e7
commit a0832751bc
9 changed files with 997 additions and 45 deletions
+1
View File
@@ -4,6 +4,7 @@ pub mod ingest_worker;
pub mod query_worker;
pub mod rate_limiter;
pub mod idempotency;
pub mod jwt_validator;
pub use endpoints::{IngestQueue, IngestRequest, JobStatus};
pub use ingest_worker::IngestWorker;