定位:身份层(IdP + IAP),不含动态域名转发 / LLM 上游代理 / 用量计费。 代码(source/rust,nginx 动态模块 + Rust,单进程零外部依赖) - IdP:authorization_code(含 PKCE)/ refresh_token / client_credentials / password 四种 grant,含 discovery / introspect / userinfo / jwks 占位 - IAP:access 阶段门禁,注入 X-Auth-* 到后端,客户端伪造同名头被覆盖 - MaxKey 互通:/oauth/v20/* 与 /oauth2.0/* 别名 + context-path 归一化 + 扁平字段 - 管理接口:账号(含角色/部门/用户组)与 OAuth 接入方注册表,热写穿共享内存 - 模块改名 ngx_http_sso_module,指令 sso_state / sso_data_dir / sso_api / sso_iap, Cookie sso_sid(终端用户)与 sso_admin_session(管理员)两套身份两套会话 配置(source/conf) - nginx.conf 生产模板(TLS、IAP 子域、含 auth_sub 的日志格式) - nginx.test.conf 本机验证配置(明文 18095-18099) - tls/README.md 证书约定与公钥比对校验 前端(source/www/admin.html) - 三 tab:账号管理 / 接入方 / 接入指南;去掉审核队列、域名、LLM 上游、用量统计 测试与脚本 - tests/ 三套端到端:协议基线 14 项 · MaxKey 互通与接入 24 项 · 管理接口 31 项,全绿 - tests/demo-system 演示业务系统(Python 标准库),覆盖应用自建客户端与 IAP 零改造两种姿势 - scripts/run-local-e2e.sh 本机一键起停;scripts/seed-data.sh 物化运行时数据目录 文档 - README.md 概览与快速开始;CLAUDE.md 硬约定与排障速查 - docs/design.md 完整设计;docs/roadmap.md 待执行任务(v2 RS256+JWKS、用户管理界面)
85 lines
2.0 KiB
TOML
85 lines
2.0 KiB
TOML
[workspace]
|
|
members = [
|
|
"nginx-src",
|
|
"nginx-sys",
|
|
"examples",
|
|
]
|
|
|
|
[workspace.package]
|
|
edition = "2024"
|
|
license = "Apache-2.0"
|
|
homepage = "https://github.com/nginx/ngx-rust"
|
|
repository = "https://github.com/nginx/ngx-rust"
|
|
rust-version = "1.85.0"
|
|
|
|
[workspace.lints.clippy]
|
|
alloc_instead_of_core = "warn"
|
|
borrow_as_ptr = "warn"
|
|
std_instead_of_alloc = "warn"
|
|
std_instead_of_core = "warn"
|
|
|
|
[workspace.lints.rust]
|
|
rust-2024-compatibility = "warn"
|
|
|
|
[package]
|
|
name = "ngx"
|
|
version = "0.5.0"
|
|
autoexamples = false
|
|
categories = ["api-bindings", "network-programming"]
|
|
description = "FFI bindings to NGINX"
|
|
include = [
|
|
"/build.rs",
|
|
"/src",
|
|
"/*.md",
|
|
"LICENSE",
|
|
]
|
|
keywords = ["nginx", "module", "sys"]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
default-target = "x86_64-unknown-linux-gnu"
|
|
targets = []
|
|
|
|
[dependencies]
|
|
allocator-api2 = { version = "0.4.0", default-features = false, features = ["fresh-rust"] }
|
|
async-task = { version = "4.7.1", optional = true }
|
|
lock_api = "0.4.13"
|
|
nginx-sys = { path = "nginx-sys", version = "0.5.0"}
|
|
pin-project-lite = { version = "0.2.16", optional = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
# Enables a minimal async runtime built on top of the NGINX event loop.
|
|
async = [
|
|
"alloc",
|
|
"dep:async-task",
|
|
"dep:pin-project-lite",
|
|
]
|
|
# Provides APIs that require allocations via the `alloc` crate.
|
|
alloc = ["allocator-api2/alloc"]
|
|
# Enables serialization support for some of the provided and re-exported types.
|
|
serde = [
|
|
"allocator-api2/serde",
|
|
]
|
|
# Provides APIs that require the standard library.
|
|
std = [
|
|
"alloc",
|
|
"allocator-api2/std"
|
|
]
|
|
# Enables the build scripts to build a copy of nginx source and link against it.
|
|
vendored = ["nginx-sys/vendored"]
|
|
|
|
[badges]
|
|
maintenance = { status = "experimental" }
|
|
|
|
[dev-dependencies]
|
|
tempfile = { version = "3.20.0", default-features = false }
|
|
|
|
[lints]
|
|
workspace = true
|