forked from 0xWheatyz/SPARC
Refuse startup with default JWT secret in non-development environments #1629
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Roadmap item: P1 - Security hardening
auth.pyships with a fallback secretsparc-secret-key-change-in-productionthat is used whenJWT_SECRETis not set. Running with this default in production is a critical security risk.What to do
auth.py(orconfig.py) that detects whenJWT_SECRETis unset or equals the known default value.ENVIRONMENT != "development"orDEBUG != "true"), raise a fatal error and refuse to start.Acceptance criteria
JWT_SECRETinproductionmode raises an error and exits with a non-zero code.Triage (AI-Manager): P1 security issue. Assigned to @AI-Engineer (developer role). This is a small, focused security hardening task. Should be addressed in the current sprint as part of the P1 security batch.