feat(v3): migrate workspace to API, Tauri desktop, and v3 crates; remove legacy MCP stack
Some checks failed
Secrets v3 CI / 检查 (push) Has been cancelled
Some checks failed
Secrets v3 CI / 检查 (push) Has been cancelled
- Add apps/api, desktop Tauri shell, domain/application/crypto/device-auth/infrastructure-db - Replace desktop-daemon vault integration; drop secrets-core and secrets-mcp* - Ignore apps/desktop/dist and generated Tauri icons; document icon/dist steps in AGENTS.md - Apply rustfmt; fix clippy (collapsible_if, HTTP method as str)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# Secrets MCP Server 环境变量配置
|
||||
# Secrets v3 环境变量配置
|
||||
# 复制此文件为 .env 并填写真实值
|
||||
|
||||
# ─── 数据库 ───────────────────────────────────────────────────────────
|
||||
# Web 会话(tower-sessions)与业务数据共用此库;启动时会自动 migrate 会话表,无需额外环境变量。
|
||||
SECRETS_DATABASE_URL=postgres://postgres:PASSWORD@db.refining.ltd:5432/secrets-mcp
|
||||
# v3 API 与桌面端都复用这套数据库
|
||||
SECRETS_DATABASE_URL=postgres://postgres:PASSWORD@db.refining.ltd:5432/secrets-v3
|
||||
# 强烈建议生产使用 verify-full(至少 verify-ca)
|
||||
SECRETS_DATABASE_SSL_MODE=verify-full
|
||||
# 私有 CA 或自建链路时填写 CA 根证书路径;使用公共受信 CA 可留空
|
||||
@@ -12,29 +12,20 @@ SECRETS_DATABASE_SSL_MODE=verify-full
|
||||
SECRETS_ENV=production
|
||||
|
||||
# ─── 服务地址 ─────────────────────────────────────────────────────────
|
||||
# 内网监听地址(Cloudflare / Nginx 反代时填内网端口)
|
||||
SECRETS_MCP_BIND=127.0.0.1:9315
|
||||
|
||||
# 对外 HTTPS 地址(用于 OAuth 回调 URL 拼接)
|
||||
BASE_URL=https://secrets.example.com
|
||||
SECRETS_API_BIND=127.0.0.1:9415
|
||||
SECRETS_DAEMON_BIND=127.0.0.1:9515
|
||||
SECRETS_API_BASE=http://127.0.0.1:9415
|
||||
SECRETS_DAEMON_URL=http://127.0.0.1:9515/mcp
|
||||
|
||||
# ─── Google OAuth ─────────────────────────────────────────────────────
|
||||
# Google Cloud Console → APIs & Services → Credentials
|
||||
# 授权回调 URI 须与 BASE_URL 完全一致:${BASE_URL}/auth/google/callback(含 http/https、主机名、端口)
|
||||
# 运行 secrets-mcp 的机器须能访问 Google(oauth2.googleapis.com)。若本机用 Clash/Surge「系统代理」上网:
|
||||
# 构建时已启用 reqwest 的 system-proxy,进程会跟随系统代理;仍失败时可设 HTTPS_PROXY(见下方)。
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
# 桌面端优先从这个 installed client JSON 读取 Desktop OAuth 配置
|
||||
GOOGLE_OAUTH_CLIENT_FILE=./client_secret_738964258008-0svfo4g7ta347iedrf6r9see87a8u3hn.apps.googleusercontent.com.json
|
||||
# 若仍无法换 token(仅提供端口代理、无系统代理):可取消注释并改为本机代理地址
|
||||
# HTTPS_PROXY=http://127.0.0.1:7890
|
||||
# NO_PROXY=localhost,127.0.0.1
|
||||
|
||||
# ─── 微信登录(暂未开放,预留)───────────────────────────────────────
|
||||
# WECHAT_APP_CLIENT_ID=
|
||||
# WECHAT_APP_CLIENT_SECRET=
|
||||
|
||||
# ─── 日志(可选)──────────────────────────────────────────────────────
|
||||
# RUST_LOG=secrets_mcp=debug
|
||||
# RUST_LOG=secrets_api=debug,secrets_desktop_daemon=debug
|
||||
|
||||
# ─── 数据库连接池(可选)──────────────────────────────────────────────
|
||||
# 最大连接数,默认 10
|
||||
@@ -57,10 +48,4 @@ GOOGLE_CLIENT_SECRET=
|
||||
# 仅在反代环境下启用,否则客户端可伪造 IP 绕过限流
|
||||
# TRUST_PROXY=1
|
||||
|
||||
# ─── 本机 MCP gateway(secrets-mcp-local,可选)────────────────────────
|
||||
# 在开发者机器上运行,与上方服务端 .env 通常分开配置;用于本地 MCP onboarding、解锁缓存与 target_exec。
|
||||
# 直接配置远端 Web 基址。
|
||||
# SECRETS_REMOTE_BASE_URL=https://secrets.example.com
|
||||
# SECRETS_MCP_LOCAL_BIND=127.0.0.1:9316
|
||||
# SECRETS_LOCAL_UNLOCK_TTL_SECS=3600
|
||||
# SECRETS_LOCAL_EXEC_CONTEXT_TTL_SECS=3600
|
||||
# 桌面端会在 ~/.secrets-v3/desktop 下持久化 device token 与 device fingerprint
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
[Unit]
|
||||
Description=Secrets MCP Server
|
||||
Description=Secrets API Server
|
||||
After=network.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=secrets-mcp
|
||||
Group=secrets-mcp
|
||||
WorkingDirectory=/opt/secrets-mcp
|
||||
EnvironmentFile=/opt/secrets-mcp/.env
|
||||
ExecStart=/opt/secrets-mcp/secrets-mcp
|
||||
User=secrets
|
||||
Group=secrets
|
||||
WorkingDirectory=/opt/secrets
|
||||
EnvironmentFile=/opt/secrets/.env
|
||||
ExecStart=/opt/secrets/secrets-api
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=secrets-mcp
|
||||
SyslogIdentifier=secrets-api
|
||||
|
||||
# 安全加固
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/opt/secrets-mcp
|
||||
ReadWritePaths=/opt/secrets
|
||||
PrivateTmp=yes
|
||||
|
||||
[Install]
|
||||
|
||||
Reference in New Issue
Block a user