lzyuan549/dsh-plugin-auth0

dsh-plugin-auth

DSH Web UI 的企业级用户名/密码身份验证网关。无需修改核心代码,访问任何页面或 API 前必须先登录。

AI 分析

核心用途是为 DSH Web 界面提供安全的用户名密码登录验证网关。适合有多用户访问控制、企业级安全部署需求的团队或个人。

包名
dsh-plugin-auth
版本
0.1.3
最近更新
2026年8月22日

安装

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

Configuration ($DSH_HOME/auth/config.json, optional)

All keys are optional; out-of-range or wrong-typed values silently fall back to the secure default, so a malformed file can never weaken the gate past sane bounds.

KeyDefaultMeaning
sessionAbsoluteTtlMs43200000 (12h)Hard session lifetime cap.
sessionIdleTtlMs7200000 (2h)Sliding idle window.
sweepIntervalMs300000 (5m)Background expired-session sweep cadence.
lockoutThreshold5Consecutive failures (per username+IP) before lockout.
lockoutBaseMs30000First lockout duration.
lockoutMaxMs900000 (15m)Exponential-backoff cap.
lockoutWindowMs900000 (15m)Idle time after which the failure counter resets.
minPasswordLength12Minimum password length (floor 8).
securefalsetrue behind TLS: sets Secure + __Host- cookie, forces Path=/.
sameSite"Strict"Cookie SameSite (Strict or Lax).
cookiePath"/"Cookie Path.
trustedOrigins[]Extra Origin values accepted on state-changing POSTs.
scrypt{N:16384,r:8,p:1,keylen:64,maxmem:64MiB}Password hashing cost.

Behind a TLS reverse proxy, set "secure": true so the session cookie gets Secure and the __Host- prefix. On plain loopback HTTP the cookie cannot be Secure (browsers would drop it).