TecFancy/dsh-auth-gate2

dsh-auth-gate

Application-layer authentication plugin for the dsh web surface

AI Analysis

核心用途是为 DSH Web 界面提供安全访问控制。适合有多人共用、公网部署或需要对 Web 访问进行 Token/密码鉴权的安全管理任务。

Package
dsh-auth-gate
Version
0.5.0
License
MIT
Last updated
Aug 17, 2026

Install

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

see Configuration below — the mount itself needs no manual patch row)

Configuration

The bundle mount (id dsh-auth-gate, inserted by dsh plugin add) uses the default config: mode: "token" backed by the DSH_AUTH_TOKEN environment variable. To change it, override the config in $DSH_HOME/cordis.patch.yml (or the profile's cordis.patch.yml — a ready-to-use override template ships in deploy/cordis.patch.yml). The override targets the mounted row by id (no insert — adding one would double-mount the plugin):

- id: dsh-auth-gate
  config:
    mode: "password" # "password" (recommended) or "token"
    cookieSecure: true # keep true when you use https
OptionDefaultWhat it does
mode"token""password" = username/password login; "token" = one shared secret
sessionTtl604800How long a login lasts (seconds) before you must sign in again
cookieNamedsh_authName of the session cookie (rarely needs changing)
tokenRef"DSH_AUTH_TOKEN"Token mode only: which environment variable holds the shared secret
cookieSecuretrueSet to false only if you are testing over plain http
usersFile""Password mode: where your user list lives. Defaults to $DSH_HOME/auth/users.yaml