Harden internet deployment: fail-closed auth behind proxies, SSRF and debug limits #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "security/internet-deploy-hardening"
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?
Summary
SCOUT_TRUST_PROXYorSCOUT_PUBLIC_ORIGINset), or whenSCOUT_AUTH=onis explicit. This prevents unintended internet exposure of an unauthenticated instance.X-Forwarded-For,Forwarded,X-Real-IP, orCF-Connecting-IPheaders, so a proxy added later cannot publish it unprotected.[redacted: encrypted secret].SCOUT_BROWSER_TOKEN(Browserless v2), preventing scripts on rendered pages from hijacking the browser.SCOUT_ALLOWED_HOSTSaccepts extra hostnames while auth is off (e.g.scout.lanover DNS rebinding); IP addresses andlocalhostare always accepted.Testing
npm run buildfollowed bySCOUT_AUTH=off npm startworks without credentials on 127.0.0.1.SCOUT_HOST=0.0.0.0(or publicly bound) withoutSCOUT_PASSWORD_HASH/SCOUT_API_TOKENSor explicitSCOUT_AUTH=off.SCOUT_TRUST_PROXY=loopbackandSCOUT_PUBLIC_ORIGIN=https://…behind a locally-hosted TLS proxy; verify client IP and HTTPS detection work correctly./api/debug/query(e.g.SELECT * FROM listings LIMIT 999999999) and verify it returns a 400 error after ~5 seconds instead of blocking.http://127.0.0.1:*or WebSocket endpoints from browser dev tools.npm run test:composewithSCOUT_SECRETandSCOUT_BROWSER_TOKENset in.env; verify the Browserless health check passes and Scout starts.X-Forwarded-For: 1.2.3.4(e.g. viacurl -H) and confirm it receives 403.