rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:imchenmin/dsh-auth-lock
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Host-side password authentication for DeepSeek Harness Web deployments. It applies one authentication policy to the DSH API, SSE, WebSockets, and server routes registered by third-party plugins.
dsh-auth-lock is a dual-face DSH plugin: the Host entry owns password verification, Cookie sessions, and WebServer policy; the browser entry owns first-run setup, login, password changes, automatic locking, and responsive presentation.
[!IMPORTANT] This plugin requires the DSH WebServer Cordis waterfalls
webserver/requestandwebserver/upgrade. On an older DSH build, Auth Lock stays inactive and registers no authentication policy, while DSH continues to start normally. The page and Host log explicitly state that no authentication is active and show the uninstall commanddsh plugin --profile web remove dsh-auth-lock.
scrypt password derivation with N=32768, r=8, p=1, and a random 128-bit salt.timingSafeEqual; plaintext passwords are never stored.Secure is automatic on TLS sockets.Origin checks and a 16 KiB request-body limit.Browser / Mobile / Third-party route
│
▼
webserver/request / upgrade
│
dsh-auth-lock policy
│ │
unauthenticated authenticated
401/302 │
▼
DSH / plugin route handler
Auth Lock depends only on the generic DSH WebServer policy extension point. It does not import or configure another UI, mobile, remote-control, or pairing plugin. HTTP, SSE, and upgrade routes independently registered on the same WebServer receive the same authentication policy automatically.
^22.19.0 || >=24.0.0env(safe-area-inset-*)DeepSeek Harness is evolving rapidly and may introduce compatibility-breaking extension-point changes. Pin a Git commit or use an explicit release for long-lived deployments.
dsh plugin --profile web add github:imchenmin/dsh-auth-lock
Pin a commit for production or long-lived deployments:
dsh plugin --profile web add github:imchenmin/dsh-auth-lock#COMMIT_SHA
The repository contains prebuilt lib/ files, so GitHub installation does not run prepare and does not require pnpm allowBuilds configuration.
After the package is published to npm:
dsh plugin --profile web add dsh-auth-lock
dsh plugin --profile web add /absolute/path/to/dsh-auth-lock
npm pack
dsh plugin --profile web add ./dsh-auth-lock-0.1.0.tgz
dsh --profile web --dump-config
dsh web
Confirm that the composition contains:
- id: auth-lock
name: dsh-auth-lock
If the page reports an incompatible DSH version, continue using DSH without Auth Lock protection and uninstall the plugin:
dsh plugin --profile web remove dsh-auth-lock
Restart dsh web. Do not interpret the incompatible state as active password protection.
On a compatible build, restart dsh web, open http://127.0.0.1:<port> on the computer running DSH, and complete first-run setup locally. Use phone, tunnel, or reverse-proxy addresses only after setup succeeds.
Open Settings → Access Lock and enter:
The Host creates a new salt and verifier, revokes all old sessions, and issues a fresh cookie to the current browser.
The verifier is irreversible, so the original password cannot be recovered. Reset Auth Lock on the computer running DSH.
Stop dsh web, then run:
dsh plugin --profile web exec dsh-auth-lock-reset -- --yes
Restart DSH:
dsh web
The next visit starts first-run password setup again.
For a custom state path:
dsh plugin --profile web exec dsh-auth-lock-reset -- \
--path /absolute/path/auth-lock.json \
--yes
The command deletes only the Auth Lock state file. It does not remove the DSH Profile, sessions, credentials, projects, or other plugin data. It refuses to run without --yes.
The bundle inserts this Cordis row:
- id: auth-lock
name: dsh-auth-lock
config:
language: zh
Override it in the Profile cordis.patch.yml:
- id: auth-lock
config:
# Auth Lock UI language: zh (default) or en
language: en
# Custom Host state file
path: /absolute/path/auth-lock.json
# Force Secure cookies when TLS terminates at a reverse proxy
secureCookie: true
language supports exactly zh and en; the default is zh (Chinese). The value above is the first-run default. After creating the password, choose 中文 or English directly in Settings → Access Lock and save. Auth Lock persists the choice in its state file and reloads the browser so the login screen, lock guidance, quick-lock label, navigation label, and Settings section all switch together.
The default state file is:
$DSH_HOME/auth-lock.json
Without DSH_HOME, the default is:
~/.dsh/auth-lock.json
First-run setup accepts loopback requests only. A deployment that cannot use a Host-local browser may temporarily enable remote setup for one bootstrap run:
DSH_AUTH_LOCK_ALLOW_REMOTE_SETUP=1 dsh web
Stop that process immediately after setup and restart without the variable. Do not leave remote setup enabled in a long-running deployment.
| Method | Path | Purpose |
|---|---|---|
GET |
/auth-lock/status |
Read compatibility, setup, login, and idle-timeout status |
POST |
/auth-lock/setup |
Create the first password |
POST |
/auth-lock/login |
Log in with the password |
POST |
/auth-lock/logout |
Revoke the current session |
POST |
/auth-lock/password |
Change the password after verifying the current password |
POST |
/auth-lock/settings |
Change the idle timeout |
All state-changing requests require a same-origin Origin header. JSON API responses use Cache-Control: no-store.
The following resources remain public so an unauthenticated browser can render the login UI:
//assets/*/plugins/<plugin-id>/client.js/plugins/<plugin-id>/client.js.map/auth-lock/* authentication routesOther unauthenticated HTML pages redirect to the root login page with a safe same-origin return path. API requests receive 401 and HTTP upgrades receive 401. Dynamic plugin endpoints such as /plugins/events are not public.
Auth Lock protects DSH data and server-side operations, but it does not conceal public JavaScript and CSS resources. Deployments that require static-resource confidentiality need an authenticated HTTPS reverse proxy in front of DSH.
The state file stores only:
{
"version": 1,
"salt": "...",
"verifier": "...",
"idleMinutes": 10
}
The parent directory is created with mode 0700; the file is created with mode 0600 and replaced through a randomly named temporary file.
Login sessions exist only in the current DSH process:
dsh web logs out every device;secureCookie: true when TLS terminates at a reverse proxy.scrypt and failure limiting apply, use a longer password on untrusted networks.See SECURITY.md for vulnerability reporting. Do not publish exploitable details in a public Issue.
dsh plugin --profile web remove dsh-auth-lock
Optionally remove the state file after uninstalling:
rm "${DSH_HOME:-$HOME/.dsh}/auth-lock.json"
git clone https://github.com/imchenmin/dsh-auth-lock.git
cd dsh-auth-lock
npm test
npm run check
Inspect the release payload before publishing:
npm pack --dry-run
The project ships prebuilt native ESM Host and Client bundles and has no runtime dependencies.
Issues and pull requests are welcome. See CONTRIBUTING.md for development and test requirements.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。