- 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
68 lines
1.7 KiB
TOML
68 lines
1.7 KiB
TOML
[package]
|
|
name = "poimen-memory"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
|
|
[workspace]
|
|
members = [
|
|
".",
|
|
"crates/mem-core",
|
|
"crates/mem-chunk",
|
|
"crates/mem-llm",
|
|
"crates/mem-ingest",
|
|
"crates/mem-store",
|
|
"crates/mem-cli",
|
|
]
|
|
resolver = "2"
|
|
|
|
[workspace.dependencies]
|
|
tokio = { version = "1.35", features = ["full"] }
|
|
futures = "0.3"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
serde_yaml = "0.9"
|
|
anyhow = "1.0"
|
|
thiserror = "1.0"
|
|
sha2 = "0.10"
|
|
clap = { version = "4.4", features = ["derive"] }
|
|
reqwest = { version = "0.11", features = ["json"] }
|
|
tracing = "0.1"
|
|
tracing-subscriber = "0.3"
|
|
toml = "0.8"
|
|
hex = "0.4"
|
|
time = { version = "0.3", features = ["serde", "formatting", "parsing", "macros"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
tokenizers = "0.13"
|
|
once_cell = "1.19"
|
|
actix-web = "4.4"
|
|
actix-rt = "2.9"
|
|
uuid = { version = "1.6", features = ["v4", "serde"] }
|
|
sqlx = { version = "0.7", features = ["postgres", "runtime-tokio-rustls", "chrono", "uuid", "json"] }
|
|
pgvector = { version = "0.2", features = ["sqlx"] }
|
|
base64 = "0.21"
|
|
jsonwebtoken = "9.2"
|
|
|
|
[dev-dependencies]
|
|
toml = { workspace = true }
|
|
mem-core = { path = "crates/mem-core" }
|
|
mem-chunk = { path = "crates/mem-chunk" }
|
|
mem-ingest = { path = "crates/mem-ingest" }
|
|
mem-llm = { path = "crates/mem-llm" }
|
|
mem-store = { path = "crates/mem-store" }
|
|
mem-cli = { path = "crates/mem-cli" }
|
|
anyhow = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
time = { workspace = true }
|
|
tokio = { workspace = true }
|
|
futures = { workspace = true }
|
|
actix-web = { workspace = true }
|
|
actix-rt = { workspace = true }
|
|
wiremock = "0.6"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = true
|
|
codegen-units = 1
|