ssw
|
f9c2324c47
|
refactor: 将 ipass-core 内核外置为 deps/ipass 子模块,本仓库仅保留 SSO
- 新增 git submodule deps/ipass(指向 ipass/ipass,pin 9c46e27),内核与通用能力插件统一收归子模块
- 删除仓库内 crates/ipass-core、vendor/ngx-rust、crates/plugin-domain
- source/rust/Cargo.toml 改为 members=[plugin-sso, gateway] + exclude=[../../deps/ipass],ngx/nginx-sys/ipass-core 改为 ../../deps/ipass/... 的 path 依赖
- gateway 移除 plugin-domain 装配:PLUGINS=[SsoPlugin, CorePlugin],去除 ipass_proxy 指令 / domain 开关 / set_flag_domain
- plugin-sso 新增 compat.rs 兼容层,重建被主线内核移除的 4 个 http 辅助函数(body_object/json_body/send_ct/redirect),scim/cas/portal/reset.rs 改走 crate::compat
- 删除 tests/domain-e2e.sh,run-local-e2e.sh 的域名测试调用一并移除(e2e 由 7 套降为 6 套)
- 更新 README/CLAUDE/docs 反映子模块结构;构建已验证:cargo build --release 通过,产出 libsso_gateway.dylib
|
2026-09-21 15:17:35 +08:00 |
|
ssw
|
4713071cd0
|
refactor(gateway): 装配重排 —— [Sso, Core, Domain] + JSON 信封兜底 + CoreExt
- PLUGINS = [SsoPlugin, CorePlugin, DomainPlugin]:重叠身份端点由 sso 优先
接管(CAPTCHA/锁定/审计/身份字段),Core 补 LLM 三端点(grant/models/limits)
- 实现 CoreExt::reclaim_on_delete:删账号连带回收名下域名
- dispatch 未命中改 JSON 信封 404(对齐上游,原建议项落地)
- loc_switch 补 Proxy/Apix 变体(Proxy 同指 domain 开关;Llm/Apix 恒 false)
|
2026-09-13 18:52:50 +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 |
|