SummerSec/dsh-web-auth

Replaces DSH's unauthenticated web carrier with one that authenticates every HTTP, SSE and WebSocket request before it reaches application routes.

The stock DSH web host serves the GUI, plugin bundles, /api, SSE and WebSocket upgrades without a login boundary, which matters the moment the port is bound to 0.0.0.0 or put behind a reverse proxy. This plugin sits at the transport layer and gates HTTP routes and upgrade paths alike with a server-side session cookie; the default always mode requires login even on 127.0.0.1, and the non-loopback mode skips auth only when bound to loopback. Passwords are stored as scrypt hashes in a scrypt$N$r$p$salt$key format with plaintext environment values allowed only temporarily, sessions are 32-byte random tokens in an in-memory store with a sliding TTL, and cookies are HttpOnly with SameSite=Strict and optional Secure. It adds a per-IP login attempt limiter with Retry-After, a built-in /auth/login page with light and dark variants that accepts a form or JSON body, origin checks and open-redirect sanitisation on login and logout, and CSP plus frame denial on auth responses.

Infrastructure & Deployment ★ 2
View on GitHub ↗

Install

dsh plugin --profile web add @summersec/dsh-web-auth

The npm line; @summersec/dsh-web-auth@0.2.0 resolves its registry repository to this repo. The README's other install line is for a local path, which is not usable as a public instruction.

Compatibility

Needs Node.js 22 or newer and a DSH web profile with the @deepseek-ai/cordis peer. It works by disabling @deepseek-ai/dsh-host-webserver and inserting webserver-auth with the same ctx.webServer contract, so other plugins keep registering routes unchanged.

Details

Alternatives

lt9/dsh-simple-auth · zexadev/dsh-tether · kelai141/dsh-host-web-compat

More plugins in Infrastructure & Deployment

Browse more in Infrastructure & Deployment

Guides for Infrastructure & Deployment plugins