ssw
|
4a780a4ce7
|
feat(sso): MaxKey 迁移 P1/P2 —— SCIM/CAS/LDAP/同步连接器/自助密码重置/归属地
- 新增 plugin-sso 模块(零新增 crate):scim.rs(SCIM 2.0)、cas.rs(CAS 1.0/2.0)、
ldap.rs(LDAP/AD,手写 BER/ASN.1 Simple Bind)、sync.rs(钉钉/企微/飞书手动触发同步)、
reset.rs(自助密码重置)、geo.rs(登录 IP 归属地)
- api.rs 兜底路由按 scim→cas→reset→sync 分发兄弟模块;h_login 集成 LDAP(未启用零行为变化)
- 修 http::redirect 空 body 触发 NGX_ERROR(CAS 302 无 Location 的根因)
- nginx.conf / nginx.test.conf 补 env SYNC_* / PASSWORD_RESET_*(worker 可见)
- 新增第 7 套 e2e tests/maxkey-p1p2-e2e.sh(21 项),harness 接入 [7/7];七套全绿 rc=0
- 修脚本 $var 紧跟全角字符被并入变量名的 shell 坑(tests + scripts)
- 文档同步:maxkey-migration-analysis(P1/P2 状态) / roadmap(v4) / CLAUDE.md / README.md
|
2026-09-14 18:51:37 +08:00 |
|
ssw
|
74e5678188
|
refactor(core): 内核原样同步上游 ipass-core ee05b27 (1.0.13)
按「上游内核为基准」收敛:ipass-core 14 文件与 refs/ipass 逐字节一致。
- 上游采纳我方建议已实现:User.extra flatten (A1) + users::update_extra、
split_value rposition (A2)、iter_prefix_ex (A3)
- 新增内核身份端点 api.rs/auth.rs (CorePlugin) + usage.rs
- audit.rs 迁出内核(仅 sso 使用 → plugin-sso 本地模块)
- Cargo.toml 元数据保留我方 crate 名(产物 libsso_gateway.dylib 为部署依赖)
|
2026-09-13 18:52:26 +08:00 |
|
ssw
|
a988cc3763
|
refactor: 网关拆分为 ipass-core 内核 + plugin-sso/plugin-domain 插件 + gateway
原 source/rust/src/ 单体 crate 拆为 Cargo workspace:
crates/ipass-core/ 内核:state(共享内存) / store(JSON 原子写) /
users(账号唯一写入口) / models(共性字段 + extra 透传) /
config(共性常量) / plugin(装配契约) / loc(开关) /
session / audit / http / util
crates/plugin-sso/ 身份插件:OAuth2 / OIDC / IAP / TOTP / RSA 等个性代码
crates/plugin-domain/ 域名插件:企业域名「子域名 → 后端」转发 + 申请/审核
gateway/ **唯一** cdylib,module 壳 + PLUGINS 装配数组
收窄原则:内核只留共性,个性代码下放插件。收窄后内核不再提供原单体的
bump_window / put_ukey / put_upstream / reload_shm 等,改由插件用 state 泛型
原语自行重建;OAuth 常量与前缀(如 OAUTH_SESSION_COOKIE=sso_sid、
IAP_TOKEN_AUDIENCE=sso-gateway)与历史取值严格一致。
插件一律 crate-type=["rlib"] 由 gateway 静态链入,产出单个
libsso_gateway.dylib —— 不各自出 .so(nginx 动态模块无稳定 ABI,
跨 .so 传 String 即双重 free)。
插件装配点集中在 gateway 5 处:use / PLUGINS 数组 / ModuleConfig 字段 /
Merge / loc_switch 分支,外加指令数组(长度 +1,新增 sso_domain 等开关)。
|
2026-09-13 10:23:34 +08:00 |
|