Files
GTI_GERENCIADOR_FISCAL/requirements.txt
T
GustavoandClaude Opus 5.5 9139a1f6f3 feat: single sign-on from the panel into GTI Fiscal
The sidebar "Fiscal" entry now goes to /sso/fiscal. For a logged-in,
active employee the panel issues a JWT signed with Ed25519 (the private
key exists only here; GTI Fiscal only holds the public key): iss/aud
fixed, sub = funcionario:<ID> (LOGIN is editable), 60 s lifetime, unique
jti that GTI Fiscal records to reject replays. No password, hash or panel
cookie leaves the panel.

The assertion is delivered in an auto-submitted POST, never in the URL,
so it stays out of proxy logs, browser history and Referer. That page
carries its own CSP allowing form-action only to the configured callback
origin; the security-headers middleware now keeps a route-defined CSP.

Without a session the employee goes through the normal login and comes
back; plain HTTP is redirected to the public HTTPS address; `next` only
accepts a relative path; the .env bootstrap account (no stable ID) is
refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 08:35:35 -03:00

23 lines
1.0 KiB
Plaintext

# Versões mínimas fixadas por segurança (ver auditoria de 2026-08-15):
# - fastapi 0.115.6 traz starlette >=0.40.0, que corrige um DoS por
# consumo de memória não limitado ao parsear multipart/form-data
# (GHSA-f96h-pmfr-66vw / equivalente ao CVE-2024-47874) — POST /login
# é uma rota pré-autenticação, então esse endpoint é alcançável por
# qualquer visitante, autenticado ou não.
# - python-multipart 0.0.9 tinha várias vulnerabilidades de DoS (boundary
# malformado, headers de parte sem limite, preambulo/epílogo sem
# limite) corrigidas em versões posteriores — pinado na última estável.
# - jinja2 3.1.6 corrige escapes do sandbox (baixo risco aqui, já que o
# painel não renderiza template vindo de entrada do usuário, mas sem
# custo de compatibilidade manter em dia).
fastapi==0.115.6
uvicorn[standard]==0.30.6
jinja2==3.1.6
python-multipart==0.0.20
PyMySQL==1.1.1
python-dotenv==1.0.1
httpx==0.27.2
# SSO para o GTI Fiscal (app/sso.py): asserção JWT assinada com Ed25519.
PyJWT==2.14.0
cryptography==50.0.1