Files
tdc-rs/Cargo.toml
T
adminandClaude Code c95b9d6e10 fix(auth): 闸门解耦 + 拒绝体自洽 + 白名单尾斜杠对齐 Spring
- require_internal_or_user 改成独立 match 臂,不再是 require_menu_permission 的别名
  (上游两者语义不同;别名会让 Task 12 收紧菜单检查时连坐收紧数据面闸门)
- reject() 改成显式传 HTTP 状态,body 的 code 由状态推出 ⇒ 结构上不可能错配
- ant_match 只去前导斜杠,尾斜杠保持显著(对齐 Spring AntPathMatcher)
- 补路由级中间件测试:白名单/内部令牌/协议闸门只作用内部通道/会话通道/SPA 深链/401 形状
- 补三个断言型测试:闸门独立性、拒绝体 code==状态、尾斜杠语义

Co-Authored-By: Claude Code <[email protected]>
2026-10-24 19:24:37 +08:00

47 lines
1.5 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "tdc-connector"
version = "0.1.0"
edition = "2021"
description = "TDC (数据接入连接器) MVP — Rust + 静态 HTML + PGlite 本地优先实现"
[[bin]]
name = "tdc-connector"
path = "src/main.rs"
[dependencies]
# Web 框架 / 运行时
axum = "0.8"
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.6", features = ["fs", "cors", "trace"] }
# 序列化
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# TDS 跨方 HTTP 契约客户端(红线:TDC 与 TDS 只走 HTTP,不编译期耦合)
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
# 连接器身份(软 PKI:ed25519 密钥对,对应 scard 安全平面思路的本地版)
ed25519-dalek = { version = "2", features = ["rand_core"] }
rand = "0.8"
hex = "0.4"
# 内嵌 PostgreSQL(进程内原生编译,非 WASM):承载全部 tdc_* 业务数据
# 包名 pglite-rs,import 为 pglite。无需扩展时不用 build.rs/export_dynamic。
pglite-rs = "0.2"
# 真实 UTC 时间戳(last_heartbeat / 同步日志用,避免手写日历换算)
chrono = { version = "0.4", default-features = false, features = ["clock"] }
[dev-dependencies]
# 路由级中间件测试(Task 5 fix round 1):`tower::ServiceExt::oneshot` 打请求
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
[profile.release]
opt-level = 2
lto = "thin"
strip = "symbols" # 发布包剥离符号表,体积减半以上
panic = "abort" # 不生成 unwind 表,进一步缩小
codegen-units = 16