**账号密码登录与会话体系**
- 后端 handlers_auth.go:bcrypt 校验 + 进程内 session store (TTL 8h)
/api/v1/auth/{login,logout,me,change-password}
- access_control.go:principalFromRequest 优先识别 session cookie;
API KEY + session 双轨并存(dev 模式两个 KEY 都为空 → 跳过 loginRequired
保留旧开发体验,任一 KEY 设置后立即开启真实鉴权)
- handlers_mcp.go:所有受管接口复用 authMiddleware,过期 session 401
- handlers_connector.go:连接器读路径同样接入
- main.go:挂 /api/v1/auth/* + 新增 loginRequired() 中间件
- 启动时为 manager/connector/ingest 三个内置主体写 bcrypt('changeme')
首次登录后强制改密(前端 App.vue 弹修改密码对话框)
**前端登录 UI**
- LoginView.vue:账号+密码登录表单(默认密码 changeme)
- App.vue:登录守卫 + 顶栏用户菜单(修改密码 / 退出登录)
- api.js:所有 request 默认 credentials: include 携带 cookie
新增 authLogin/authLogout/authMe/changePassword + mcpCall (JSON-RPC over SSE)
**导入核对工作台 (manager-only)**
- ReviewView.vue + components/ReviewWorkbench.vue +
composables/useReviewWorkbench.js(多 tab:扫描 / 资料 / 核对 / 应用)
- import-review.html + entry-review.js 多入口(vite.config.js 加 rollup input)
- 对应 ssw-ontology-reviewer skill:本体差距自动扫描 + JSON 执行清单
→ 应用到 ontology
**依赖升级**
- go.mod:go 1.25.0 精确化 + golang.org/x/{crypto,net,sync,sys,text}
升级到 bcrypt 兼容版本
45 lines
1.7 KiB
AMPL
45 lines
1.7 KiB
AMPL
module shangshu-ontology
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/gin-gonic/gin v1.10.0
|
|
github.com/jackc/pgx/v5 v5.7.1
|
|
github.com/joho/godotenv v1.5.1
|
|
)
|
|
|
|
require (
|
|
github.com/bytedance/sonic v1.11.6 // indirect
|
|
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
|
github.com/cloudwego/base64x v0.1.4 // indirect
|
|
github.com/cloudwego/iasm v0.2.0 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
|
github.com/goccy/go-json v0.10.2 // indirect
|
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
|
github.com/kr/text v0.2.0 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
|
github.com/rogpeppe/go-internal v1.15.0 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
|
golang.org/x/arch v0.8.0 // indirect
|
|
golang.org/x/crypto v0.55.0 // indirect
|
|
golang.org/x/net v0.57.0 // indirect
|
|
golang.org/x/sync v0.22.0 // indirect
|
|
golang.org/x/sys v0.47.0 // indirect
|
|
golang.org/x/text v0.41.0 // indirect
|
|
google.golang.org/protobuf v1.34.1 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|