No description
- Shell 100%
| helpers | ||
| tests | ||
| .env.example | ||
| README.md | ||
| run-all.sh | ||
Sawgrass Test Suite
Black-box tests for the Sawgrass Security Dashboard. Target environment: the air-gapped sandbox with a Raspberry Pi 5 (Kali Linux) as the tester, the Sawgrass appliance, and a designated client machine. Run from the Pi (or any node with bash/curl/python3).
Topology
[ Pi 5 - Kali (tester) ] ---> [ Sawgrass appliance ] <--- [ Designated client ]
Setup
cp .env.example .env # set APPLIANCE_URL / credentials for the sandbox
./run-all.sh # or run any test individually
Requirements: bash, curl, python3 (jq optional; parsing is python3-based).
Test catalog
| Test | Verifies |
|---|---|
| tests/auth/01-login.sh | bad creds -> 401; valid creds -> 200 + JWT; /api/auth/me works |
| tests/auth/02-auth-required.sh | every API endpoint 401s without a token |
| tests/auth/03-touch.sh | /api/auth/touch rotates the token (sliding idle window) |
| tests/users/01-user-lifecycle.sh | admin: create -> list -> reset-password -> delete |
| tests/groups/01-group-lifecycle.sh | admin: create -> assign member -> toggle VPN -> verify via my-groups -> delete |
| tests/policy/01-verdict-delta.sh | probe a blocked port; Verdict Logs drop-counter increments |
| tests/manual/01-idle-logout.md | the 15-min idle timeout checklist (accelerated mode) |
Idle-timeout testing (accelerated)
In a browser on the client machine: DevTools console -> localStorage.setItem('sawgrass_idle_minutes','0.5') (30s), hard refresh, log in, follow the checklist. Remove the key when done.
Safety
- Sandbox/air-gapped only. Tests create and delete their own temp users/groups; no destructive or persistent changes.
- The verdict test sends one TCP probe at a blocked port on purpose; nothing else fires.