feat(pggomtm): slim to validator-only with minimal database-token v1 (gomtm#310) - #11
Merged
Conversation
…(gomtm#310) - 删除 executor 产品全部:executor/ 源码/测试/Dockerfile、根 Cargo workspace 成员、 executor-v* release 入口与 executor CI 步骤、docs/executor-runtime.md、 共享 PG18 harness 的 run-executor 矩阵,及 README/MAINTAINERS/AGENTS 中 executor 引用 - database-token contract 收敛为最小 v1:claims 仅 iss/aud/sub/iat/exp/jti/scope/profile 并 deny unknown;删除 delegation_id/auth_method/authority_version/client_id/credential_id/db_role, profile 即数据库角色(startup role 必须与 profile 精确同名) - system_user 身份编码改为 oauth:<issuer-host>:v1;u=<userId>;p=<profile>, 彻底移除 oauth:pggomtm:v2;u=...;actor=...;d=...;m=...;a=...;p=... 编码及前缀常量 - validator Cargo.toml 升 0.3.0;离线 JWKS 快照、/etc/pggomtm 双文件契约、fail-closed、 reason-code 脱敏闭集、ES256/P-256、aud!=iss、TTL 30-300s、拒绝网络/SQL/SPI 保持不变 - 更新 Rust 领域测试、PG18 harness fixture 与 final-image smoke;ABI 测试不动 - openspec 新增 slim-validator-only-database-token-v1 change, 并标注 publish-rust-sql-executor / release-host-artifacts / standardize-profile-role-contract-v2 被硬切取代
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
gomtm issue #310 硬切第一步(M1):mtmpg 只保留数据库内核(
pggomtm.sovalidator),Rust SQL executor 整个删除,不做任何兼容/过渡设计。同时把 database-token 契约最小化到 v1。契约变更(database-token v1,validator 0.3.0)
iss、aud、sub(^[A-Za-z0-9_-]{1,64}$)、iat、exp(iat+30..iat+300)、jti、scope="database"、profile∈{ordinary,business_admin,database_developer};其他字段一律 deny unknown。delegation_id、auth_method、authority_version、client_id、credential_id、db_role(及旧db_profile);profile即数据库角色,startup requested role 必须与 profile 精确同名。oauth:<issuer-host>:v1;u=<userId>;p=<profile>,彻底移除oauth:pggomtm:v2;...编码及其前缀常量。/etc/pggomtm双文件契约(pggomtm-validator-config/v1)、fail-closed、reason-code 脱敏闭集(24 code 字符串语义不变)、ES256/P-256/use=sig/key_ops=verify、aud≠iss、TTL 30–300s、拒绝网络/SQL/SPI。删除清单(executor 硬切)
executor/目录(源码+测试+Dockerfile)Cargo.toml的 executor workspace 成员与孤儿 dev-depsha2.github/workflows/ci.yml的 executor CI 步骤(executor_domain / executor_pg18 / executor_image,及 validator 内 executor 版本解析、libpq layout probe、executor runtime image).github/workflows/release.yml的executor-v*release 入口与 publish 内 executor 分支docs/executor-runtime.md;README / MAINTAINERS / AGENTS / docs 中 executor 引用publish-rust-sql-executor、release-host-artifacts(executor 部分)、standardize-profile-role-contract-v2标注「被 issue-310 硬切取代」保留为历史测试与文档
oauth:candidate.example.test:v1)+ 拒绝旧字段矩阵。Cargo.toml升0.3.0(契约变更 = 新 module+consumer 版本)。CI 证据
bdbae1d,conclusion success,Rustfmt/Clippy/Cargo tests/真实 PG18 OAuth/final-image 全绿)。32010963197,两处 jwt_identity.rs 格式差异,追加 commitbdbae1d修复后转绿。1d407dc(deps PR chore(deps): upgrade sha2/hmac/reqwest with digest 0.11 adaptations (PRs #5 #8 #9) #10 合并后),解决 executor modify/delete 冲突,无 force push。后续 consumer 依赖(gomtm M2/M3)
oauth:<issuer-host>:v1解析 system_user。profile与 startup role 同名。