SummerSec/dsh-web-auth0

@summersec/dsh-web-auth

Transport-level authentication gate for the DeepSeek Harness Web GUI

包名
@summersec/dsh-web-auth
版本
0.1.2
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SummerSec/dsh-web-auth

Advanced configuration

The bundle:

  1. Sets the stock webserver row to disabled: true.
  2. Inserts webserver-auth with name @summersec/dsh-web-auth.

DSH patches replace config as a whole. To override advanced fields, restate the full webserver-auth block in the profile patch (e.g. profile cordis.patch.yml):

- id: webserver-auth
  name: '@summersec/dsh-web-auth'
  inject: [webStartup]
  config:
    host: !!js ctx.webStartup.host ?? '127.0.0.1'
    port: !!js ctx.webStartup.port ?? 3080
    authMode: always
    username: admin
    passwordHash: !!js process.env.WEB_AUTH_PASSWORD_HASH
    sessionTtlMinutes: 720
    maxAttempts: 5
    attemptWindowSeconds: 300
    secureCookie: auto
    trustProxy: false

Config reference

FieldType / valuesDefaultNotes
host127.0.0.1 | 0.0.0.0127.0.0.1Listen address (from web startup)
port0655353080Listen port; 0 for ephemeral
authModealways | non-loopbackalwaysSee Authentication modes
usernamestringadminSingle shared account
passwordstringPlaintext; avoid in production
passwordHashscrypt$...Required format from the CLI
sessionTtlMinutes143200720 (12h)Sliding window on each authenticated request
maxAttempts110005Failed logins per IP per window
attemptWindowSeconds186400300Attempt window length
secureCookieauto | always | neverautoWhen to set the Secure flag
trustProxybooleanfalseTrust X-Forwarded-* only behind a locked-down proxy

secureCookie and trustProxy

ScenarioSuggested settings
Local HTTP on loopbacksecureCookie: auto, trustProxy: false
Direct TLS on the Node processsecureCookie: auto (sets Secure when the socket is encrypted)
HTTPS terminated at nginx / Caddy / CloudflaresecureCookie: auto or always, trustProxy: true, and only the proxy may reach DSH’s port

If trustProxy is true while the port is reachable by untrusted clients, attackers can spoof X-Forwarded-For / X-Forwarded-Proto and weaken IP limits or cookie security. Lock network access first.