Protect the research lifecycle with X-API-Key validation backed by persistent user and key records. Store only salted scrypt hashes, support expiry and revocation, and expose a local admin CLI for create/list/revoke workflows. Initialize only the authentication schema at startup, prevent SQL echo from exposing sensitive bound values, and keep health probes public. Add coverage for valid, missing, invalid, expired, and revoked keys. Document deployment and key administration, update the local CLI to send NSCT_API_KEY, and record the reset handoff state.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
# ============================================================
|
|
# NSCT — Environment Variables (copy to .env and fill in)
|
|
# ============================================================
|
|
|
|
# ---------- LLM ----------
|
|
# OpenAI-compatible endpoint for the primary LLM worker
|
|
NSCT_LLM_BASE_URL=http://localhost:8030/openai/v1
|
|
NSCT_LLM_MODEL=Qwen3.6-6-35B
|
|
NSCT_LLM_MAX_CONCURRENCY=3
|
|
|
|
# Optional API key for the LLM endpoint (provider-specific header)
|
|
NSCT_LLM_API_KEY=
|
|
|
|
# ---------- Vision (image analysis) ----------
|
|
NSCT_VISION_BASE_URL=http://localhost:8030/openai/visual/v1
|
|
NSCT_VISION_MODEL=Qwen2-VL-3B
|
|
NSCT_VISION_API_KEY=
|
|
|
|
# ---------- Audio (speech / transcription) ----------
|
|
NSCT_AUDIO_BASE_URL=http://localhost:8030/hermes-audio
|
|
NSCT_AUDIO_MODEL=default
|
|
NSCT_AUDIO_API_KEY=
|
|
|
|
# ---------- PostgreSQL ----------
|
|
NSCT_DB_URL=postgresql+asyncpg://nsct:nsct_secret@localhost:5432/nsct
|
|
|
|
# User-facing API keys are persisted in NSCT_DB_URL and administered with
|
|
# `nsct-api-key create|list|revoke`. These are distinct from provider keys.
|
|
# Do not put a user key in this file.
|
|
# NSCT_API_KEY= # optional: key used by the local `nsct` client
|
|
POSTGRES_USER=nsct
|
|
POSTGRES_PASSWORD=nsct_secret
|
|
POSTGRES_DB=nsct
|
|
|
|
# ---------- SearXNG (optional search backend) ----------
|
|
NSCT_SEARXNG_BASE_URL=http://localhost:8888/
|
|
|
|
# ---------- General ----------
|
|
NSCT_DEBUG=false
|