Files
4ventures-client-portal/scripts/smoke.sh
4Ventures 2df3fe6983 fix(security): harden auth, tenant scoping, and scrub secrets
Require session on APIs, scope KPIs/activos/simulate to the user tenant, strip real JWTs from .env.example, and add health/smoke/docs for 4Ventures ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 10:51:46 +02:00

15 lines
541 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BASE="${1:-https://app.4ventures.es}"
echo "== health =="
curl -sf "$BASE/api/health" | tee /tmp/4v-health.json
echo
node -e "const j=require('/tmp/4v-health.json'); if(!j.ok) process.exit(1)"
echo "== login =="
code=$(curl -s -o /dev/null -w "%{http_code}" "$BASE/login")
test "$code" = "200"
echo "== chat unauthorized =="
code=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$BASE/api/chat" -H 'Content-Type: application/json' -d '{"message":"hola"}')
test "$code" = "401"
echo "Smoke OK · $BASE"