dsh-auth-gate
Application-layer authentication plugin for the dsh web surface
AI 分析
核心用途是为 DSH Web 界面提供安全访问控制。适合有多人共用、公网部署或需要对 Web 访问进行 Token/密码鉴权的安全管理任务。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TecFancy/dsh-auth-gateドキュメント
README 全文を読む ↗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
| Option | Default | What it does |
|---|---|---|
mode | "token" | "password" = username/password login; "token" = one shared secret |
sessionTtl | 604800 | How long a login lasts (seconds) before you must sign in again |
cookieName | dsh_auth | Name of the session cookie (rarely needs changing) |
tokenRef | "DSH_AUTH_TOKEN" | Token mode only: which environment variable holds the shared secret |
cookieSecure | true | Set 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 |