diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r1.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r1.md new file mode 100644 index 0000000..e02171e --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r1.md @@ -0,0 +1,77 @@ +# PR96 S5 direct CAS forgery review r1 / S5 CAS 直接偽装レビュー r1 + +> **Summary:** Changes requested for a port-ownership error in the new rejection test. The disclosed limits of the fakecas check are accurate. +> **概要:** 新しい拒否試験のポート所有者の誤認について修正を求める。fakecas 試験の限界についての開示は正確である。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** an unpublished service's saved port does not identify the process listening there. / 非公開サービスの保存済みポートでは、そこで待ち受けるプロセスを特定できない。 +- Applies to / 対象: RCOSDP/RDM-developer-guide PR #96, head `9e93762438795c3c8ff924082f2ec8811f408a70`. +- Related / 関連: [PR #96](https://github.com/RCOSDP/RDM-developer-guide/pull/96), [Review index / レビュー索引](README.md), [SPEC-06](../spec/06_documentation_conventions.md), [Used by SPEC-04 / 利用先](../spec/04_acceptance_tests.md). +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +Verdict: **CHANGES REQUESTED**. Review used an isolated clone at `/private/tmp/rev-pr96-r1/repo`. No stack or installer was run; no source was changed, committed, pushed, approved or merged. + +### Findings + +1. **R1-01 — P2 — installer/acceptance/test_s5_shibboleth.py:230.** In the shibboleth render, CAS has no published binding (the mapping from a host port to a service), so the retained `GRDM_PORT_CAS` does not identify a current CAS listener. For example, an unrelated process on 8090 is valid while `.env` retains CAS=8090: `plan.published_ports` excludes CAS before `compose.assign_ports`, so render does not reserve or check that port. Another rendered service can also reuse it. The new assertion incorrectly fails a secure deployment and labels that listener CAS. Conversely, checking the old port alone cannot detect publication on a different port. Verify CAS's actual published bindings rather than treating every listener at the saved port as CAS. The substitution at compose.py:1625 changes only configuration `host_ports`; the dotenv update at 1694 uses only `published`, so it does not change the saved CAS port to the SP port. +2. **R1-02 — P3 — docs/spec/04_acceptance_tests.md:91,223.** Both languages agree on the added rejection behavior, but their S5 prerequisites and following prose still say S5 skips outside the shibboleth render. State that the additional rejection alone also runs in full+fakecas. The version 0.20 header otherwise has matching English/Japanese intent. +3. **R1-03 — INFO, non-blocking — installer/acceptance/test_s5_shibboleth.py:239.** Missing institution mapping in fakecas can prevent authentication even if the CAS trust check regresses, making this test non-discriminating for that regression. The PR's limitations section honestly discloses this, the untested internal-container route, and the lack of a live run. Do not treat the added test as independent proof of the trust check. The HTTP 200 assertions also do not identify login-page content; API 401 with no ticket exchange is an additional anonymous-session observation, not proof of why CAS rejected identity. + +### Other checks + +`generate_secret` uses `token_urlsafe(32)` for this key, yielding 43 characters in the accepted alphabet; generated values cannot violate the new 32-character minimum. `compose.run` invokes `secret_format_problems` before rendering. The focused unit test covers unsafe characters and short values. The SP note accurately narrows header removal to its explicit list. + +The module marker and function name classify the added test as S5/rejection. `accept.incomplete_scenarios` uses a set of cases, not an exact row count, so the extra rejection does not break it; skipped success and rejection rows remain represented in fakecas. GET and POST use the guarded client with redirects disabled and a fresh context. CAS absence from ports causes a skip, but normal generated dotenv includes it; TEST_IDP has a fixture default. The shibboleth branch checks only host exposure, not CAS's internal trust decision. + +Validation results are recorded in the bilingual evidence section. Live acceptance in full+fakecas and full+shibboleth remains outstanding; upstream CAS PR #4 tests were not independently rerun in this review. + +--- + + +## 日本語 + +[→ To English](#english) + +判定: **CHANGES REQUESTED**。隔離した clone `/private/tmp/rev-pr96-r1/repo` でレビューした。スタックも installer も実行せず、ソース変更、commit、push、approve、merge は行っていない。 + +### 指摘 + +1. **R1-01 — P2 — installer/acceptance/test_s5_shibboleth.py:230。** shibboleth の描画では CAS の公開 binding(ホストのポートとサービスの対応)が無いため、保存された `GRDM_PORT_CAS` は現在の CAS の待受先を特定しない。例えば `.env` が CAS=8090 を保持していても、無関係なプロセスが 8090 を使うことは正常である。`plan.published_ports` は `compose.assign_ports` より前に CAS を除外するため、そのポートを予約も検査もしない。他の描画サービスが再利用することもある。新しい assert は安全な構成を失敗させ、その待受を CAS と誤認する。逆に古いポートの検査だけでは別ポートの誤公開を検出できない。保存済みポートの任意の待受を CAS と扱わず、CAS 自身の実効公開 binding を検証すること。compose.py:1625 の置換は設定用 `host_ports` のみで、1694 行の dotenv 更新は `published` のみを使うため、保存済み CAS ポートが SP ポートに置き換わるわけではない。 +2. **R1-02 — P3 — docs/spec/04_acceptance_tests.md:91,223。** 追加した拒否の説明は英日で一致するが、S5 の prerequisites と続く説明は shibboleth 以外で skip としている。追加した拒否ケースだけは full+fakecas でも動くことを明記すること。0.20 の版ヘッダの趣旨は英日で一致している。 +3. **R1-03 — INFO、非ブロッキング — installer/acceptance/test_s5_shibboleth.py:239。** fakecas に機関対応表が無いため、CAS の信頼検査が退行しても認証できず、この試験が退行を区別できない可能性がある。PR の限界の節は、この点、コンテナ内部経路の未検証、実機未実行を正直に開示している。追加試験を信頼検査の独立した証明とは扱わないこと。HTTP 200 だけではログイン画面の内容も確認できない。チケット交換なしの API 401 は匿名状態の追加観察であり、CAS が属性を拒んだ理由の証明ではない。 + +### その他の確認 + +この鍵の `generate_secret` は `token_urlsafe(32)` を使い、許可文字種の43文字になるため、新しい32文字以上の条件に反しない。`compose.run` は描画前に `secret_format_problems` を呼ぶ。追加の単体試験は危険な文字と短すぎる値を扱う。SP note がヘッダ除去を明示的な一覧に限定した説明は正確である。 + +モジュールの marker と関数名で追加試験は S5/rejection になる。`accept.incomplete_scenarios` は件数でなくケースの集合を見るため、拒否の追加で壊れない。fakecas でも skip した成功・拒否の行は残る。GET と POST は新しい context とリダイレクト無効の保護されたクライアントを使う。ports に CAS が無いと skip するが通常の生成済み dotenv には存在する。TEST_IDP には fixture の既定値がある。shibboleth の分岐はホストへの公開だけを調べ、CAS 内部の信頼判断は調べない。 + +検証結果は次の英日併記の証跡欄に記録する。full+fakecas と full+shibboleth の実機受入は未了であり、上流 CAS PR #4 の試験は今回独立に再実行していない。 + + +### Evidence / 証跡 + +Commands ran in `/private/tmp/rev-pr96-r1/repo`; results shown are observed, not live-stack claims. / 次のコマンドは隔離 clone 内で実行した。結果は観測済みであり、実機スタックの検証を意味しない。 + +```sh +PYTHONPATH=installer python3 -m unittest discover -s installer/tests +python3 tools/docs_check.py +gh pr checks 96 --repo RCOSDP/RDM-developer-guide +``` + +```toon +validation[3]{check,result,detail} + installer_unit,PASS,788 tests; 14 skipped; 104.793 seconds + docs,PASS,281 files; 8 exempt; 71 warnings + head_ci,PASS,13 checks; queried once on 2026-11-17 +``` + +All expected checks passed; no long CI polling occurred. Logs: `/private/tmp/rev-pr96-r1/unit.log` and `/private/tmp/rev-pr96-r1/docs.log`. / 指定の検査は成功し、CI の長時間ポーリングは行っていない。ログは前記2ファイルに保存した。 diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r2.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r2.md new file mode 100644 index 0000000..fe6390c --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r2.md @@ -0,0 +1,68 @@ +# PR96 S5 direct CAS forgery review r2 / S5 CAS 直接偽装レビュー r2 + +> **Summary:** The documentation findings are resolved, but recognizing a login form still does not identify a direct CAS binding. +> **概要:** 文書の指摘は解決したが、ログインフォームの識別では CAS の直接公開を特定できない。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** the SP intentionally serves CAS pages, so their content cannot prove a bypass. / SP は意図どおり CAS の画面を返すため、その内容で迂回を証明することはできない。 +- Applies to / 対象: PR #96 head `e80963ab012dea5bdf85918fc1a4d73b5d20fea6`, delta from `9e93762438795c3c8ff924082f2ec8811f408a70`. +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). +- Related / 関連: [PR #96](https://github.com/RCOSDP/RDM-developer-guide/pull/96), [Review index / レビュー索引](README.md), [SPEC-06](../spec/06_documentation_conventions.md), [Used by SPEC-04 / 利用先](../spec/04_acceptance_tests.md). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +Verdict: **CHANGES REQUESTED**. + +**R2-01 — P2 — installer/acceptance/test_s5_shibboleth.py:239–244 — R1-01 remains open.** The new probe still fails valid unrelated listeners. A non-HTTP TCP service or HTTPS-only server can close the connection, produce a protocol error or time out during the unconditional HTTP request. An unrelated HTTP server redirecting off loopback also fails: `GuardedRequest` validates redirect targets even when following is disabled. + +There is also a valid SP case: set the retained CAS port equal to the SP port. `published_ports` excludes unpublished CAS before allocation, so no collision is reserved for it. The SP proxies `/login` to CAS (sp-httpd.conf.tmpl:57), legitimately returns the same form containing `name="execution"`, and the new assertion incorrectly calls this a bypass. This follows from code inspection, not a live reproduction. The previous limitation of examining only a retained port also remains: exposure at another port is invisible. + +Check actual published CAS bindings (the mapping between a host port and a service) using read-only runtime/configuration evidence. Cover unrelated listeners, non-HTTP listeners, and equal saved CAS/SP ports. Merely catching all request errors cannot resolve service ownership. Do not weaken the loopback guard to accommodate unrelated redirects. + +R1-02 is resolved: the S5 prerequisites and following prose both explain the additional full+fakecas rejection in English and Japanese. R1-03 is resolved as a disclosure: the docstring now states the fakecas check alone cannot discriminate a broken trust check because institution mapping may fail. The PR body remains honest about this limitation, the internal-container route and the absent live runs, but its claim that another program's listener does not fail is not yet true. Secret validation and success/rejection classification are unchanged from r1. + +No stack or installer was run. The isolated r1 clone was advanced to the exact r2 head; source was not modified or committed. Live acceptance in both renders remains outstanding. The bilingual evidence section records only observed local checks and CI status. + +--- + + +## 日本語 + +[→ To English](#english) + +判定: **CHANGES REQUESTED**。 + +**R2-01 — P2 — installer/acceptance/test_s5_shibboleth.py:239–244 — R1-01 未解決。** 新しい検査でも無関係な正常な待受が失敗する。非 HTTP の TCP サービスや HTTPS 専用サーバーでは、無条件の HTTP 要求が接続切断、プロトコルエラー、タイムアウトになる。外部へリダイレクトする無関係な HTTP サーバーでも、`GuardedRequest` は追跡無効でも宛先を検査するため失敗する。 + +正常な SP でも発生する。保存済み CAS ポートと SP ポートを同じに設定すると、`published_ports` は割当前に非公開の CAS を除外するため、そのポートの重複を予約しない。SP は `/login` を CAS に proxy し(sp-httpd.conf.tmpl:57)、正常に `name="execution"` を含む同じフォームを返すが、新しい assert はこれを迂回と誤判定する。実機再現ではなくコードを追った判断である。保存済みポートだけを見る限界も残り、別ポートへの公開は見えない。 + +読み取り専用の実行状態・設定の証跡を使って、CAS 自身の実効公開 binding(ホストのポートとサービスの対応)を確認すること。無関係な待受、非 HTTP の待受、保存済み CAS/SP ポート一致を扱うこと。要求例外の一律無視だけでは所有者の誤認は解決しない。無関係なリダイレクトのために loopback の保護を弱めないこと。 + +R1-02 は解決した。S5 の prerequisites と続く本文が英日とも追加の full+fakecas 拒否を説明している。R1-03 は限界の開示として解決した。機関対応の失敗があり得るため、fakecas 単独では信頼検査の退行を識別できないことを docstring が明記した。PR 本文もこの限界、内部コンテナの経路、実機未実行を正直に説明しているが、「別のプログラムの待ち受けは失敗にしない」はまだ成立しない。秘密値の検査と成功・拒否の分類は r1 から変更がない。 + +スタックも installer も実行していない。r1 の隔離 clone を r2 の指定 head に進め、ソース変更・commit はしていない。両描画の実機受入は未了である。英日併記の証跡欄には観測済みのローカル検査と CI 状態だけを記録する。 + +### Evidence / 証跡 + +Ran in `/private/tmp/rev-pr96-r1/repo` at the reviewed head. / レビュー対象 head の隔離 clone 内で実行した。 + +```sh +PYTHONPATH=installer python3 -m unittest discover -s installer/tests +python3 tools/docs_check.py +gh pr checks 96 --repo RCOSDP/RDM-developer-guide +``` + +```toon +validation[3]{check,result,detail} + installer_unit,PASS,788 tests; 14 skipped; 100.839 seconds + docs,PASS,281 files; 8 exempt; 71 warnings + head_ci,PASS,13 checks; two queries; initially two pending +``` + +Logs: `/private/tmp/rev-pr96-r1/unit-r2.log` and `/private/tmp/rev-pr96-r1/docs-r2.log`. No live acceptance was attempted. / ログは前記2ファイルに保存した。実機受入は試みていない。 diff --git a/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r3.md b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r3.md new file mode 100644 index 0000000..9fae2ae --- /dev/null +++ b/docs/reviews/2026-11-17_RDM-developer-guide_PR96_S5_Direct_CAS_Forgery_r3.md @@ -0,0 +1,69 @@ +# PR96 S5 direct CAS forgery review r3 / S5 CAS 直接偽装レビュー r3 + +> **Summary:** PASS for the focused r3 change: the rendered CAS service now supplies the evidence instead of an unrelated listener. +> **概要:** r3 の限定された変更は PASS。無関係な待受ではなく、描画した CAS サービスを証跡とするようになった。 + +**Jump:** [English](#english) · [日本語](#japanese) + +- Version / 版: 0.1 — 2026-11-17. **Learned:** a render check avoids listener misidentification but does not establish live-container state. / 描画結果の検査は待受の誤認を避けるが、実行中コンテナの状態は証明しない。 +- Applies to / 対象: PR #96 head `920cc00525cb3736feed2c6fdb6d78ae7fb4ad8b`, delta from `e80963ab012dea5bdf85918fc1a4d73b5d20fea6`. +- Reviewer / レビュワ: REV(担当レビュワ, Codex Astra). +- Related / 関連: [PR #96](https://github.com/RCOSDP/RDM-developer-guide/pull/96), [Review index / レビュー索引](README.md), [SPEC-06](../spec/06_documentation_conventions.md), [Used by SPEC-04 / 利用先](../spec/04_acceptance_tests.md). + +--- + + +## English + +[→ 日本語版へ](#japanese) + +Verdict: **PASS**. No blocking findings in the reviewed delta. R2-01 and its underlying R1-01 are resolved within the explicitly narrowed rendered-configuration scope; R1-02 and R1-03 remain resolved. + +**R3-01 — INFO, non-blocking — installer/acceptance/test_s5_shibboleth.py:232–239.** This establishes that the rendered `services.cas` has no published ports and no `network_mode: host`. It does not inspect running Docker bindings, stale containers or external Compose overrides. A missing Compose file skips, rather than proving protection. Treat PASS as a code-review result, not live acceptance or independent proof of CAS's trust-header check. + +The file path is consistent with the producer: compose.py defines `docker-compose.yml`, serializes it with `json.dumps`, and writes it under the runtime directory; accept.py supplies the runtime dotenv path as `GRDM_ENV_FILE`. Thus `json.loads` and the sibling-path lookup match the generated artifact. Missing service data or malformed JSON fails instead of passing. Neither unrelated non-HTTP listeners nor the legitimate SP on the saved CAS port can affect this branch now. A published port on any host port is rejected, unlike the previous single-port probe. + +An isolated unit-level check executed only the function's extracted syntax tree with temporary JSON and a fake pytest skip handler. It accepted absent/empty ports, rejected published ports and host networking, and skipped a missing file. Equal saved CAS/SP ports were supplied, and a browser fixture that raises if called was never used. This was not the acceptance suite or a live-stack run. + +The SPEC-04 S5 row describes rendered configuration in both languages, and full+fakecas eligibility remains aligned. The PR body describes the same narrower check and continues to disclose the absent live runs, internal-container route and non-discriminating fakecas institution-mapping case. Secret validation and case accounting are unchanged from the checked r1 implementation. + +No source was modified, committed, pushed, merged or approved. Both live renders and upstream CAS tests remain outside this review. Validation results follow in the bilingual evidence section. + +--- + + +## 日本語 + +[→ To English](#english) + +判定: **PASS**。今回の差分にブロッキング指摘はない。描画済み設定に明示的に限定した範囲で R2-01 と元の R1-01 は解決した。R1-02 と R1-03 も解決済みのままである。 + +**R3-01 — INFO、非ブロッキング — installer/acceptance/test_s5_shibboleth.py:232–239。** 描画済み `services.cas` に公開ポートがなく、`network_mode: host` でもないことを確認する。実行中 Docker の binding、古いコンテナ、外部の Compose 上書きは調べない。Compose ファイルが無ければ保護を証明せず skip する。PASS はコードレビューの判定であり、実機受入や CAS の信頼ヘッダ検査の独立した証明ではない。 + +ファイルの場所は生成側と一致する。compose.py は `docker-compose.yml` を定義し、`json.dumps` で runtime 配下へ書く。accept.py は runtime の dotenv の場所を `GRDM_ENV_FILE` に渡す。したがって `json.loads` と同じフォルダを探す方法は生成物に合う。サービス情報欠落や壊れた JSON は合格せず失敗する。無関係な非 HTTP 待受や、保存済み CAS ポートを使う正常な SP はこの分岐に影響しなくなった。以前の単一ポート検査と異なり、任意のホストポートへの公開を拒否する。 + +単体レベルの隔離検査では、関数の構文木だけを取り出し、一時 JSON と模擬 pytest skip を使って実行した。ports 無し・空を許可し、公開ポートと host networking を拒否し、ファイル欠落を skip することを確認した。CAS/SP の保存済みポートを同じにし、呼ばれると失敗する browser fixture は使われなかった。受入スイートや実機スタックの実行ではない。 + +SPEC-04 の S5 行は英日とも描画した設定を説明し、full+fakecas の実行条件も一致する。PR 本文も同じ限定した検査を記述し、実機未実行、内部コンテナ経路、fakecas の機関対応によって防御の退行を識別できない場合を引き続き開示している。秘密値検査とケース集計は r1 で確認した実装から変わらない。 + +ソース変更、commit、push、merge、approve はしていない。両描画の実機受入と上流 CAS の試験は今回の範囲外のままである。検証結果は英日併記の証跡欄に記録する。 + +### Evidence / 証跡 + +Commands ran at the reviewed head in `/private/tmp/rev-pr96-r1/repo`. / 指定 head の隔離 clone 内で実行した。 + +```sh +PYTHONPATH=installer python3 -m unittest discover -s installer/tests +python3 tools/docs_check.py +gh pr checks 96 --repo RCOSDP/RDM-developer-guide +``` + +```toon +validation[4]{check,result,detail} + installer_unit,PASS,788 tests; 14 skipped; 78.590 seconds + docs,PASS,281 files; 8 exempt; 71 warnings + isolated_branch,PASS,5 temporary-file cases; no network + head_ci,PENDING,queried once; 12 passed; Python 3.12 unit job pending +``` + +Logs: `/private/tmp/rev-pr96-r1/unit-r3.log` and `/private/tmp/rev-pr96-r1/docs-r3.log`. CI completion remains to be checked before integration; no failing check was observed. No live stack or installer was run. / ログは前記2ファイルに保存した。統合前に CI 完了の確認が残るが、失敗した検査は観測していない。実機スタックも installer も実行していない。 diff --git a/docs/spec/04_acceptance_tests.md b/docs/spec/04_acceptance_tests.md index 85e01e6..a178827 100644 --- a/docs/spec/04_acceptance_tests.md +++ b/docs/spec/04_acceptance_tests.md @@ -5,7 +5,8 @@ **Jump:** [English](#english) · [日本語](#japanese) -- Version / 版: 0.19 — 2026-11-16. **Learned:** the reason head.js left the list is what the runtime guard saw, not what a static check promises: the CAS pages made 0 external requests on the live stack, while the CAS build check is only a regression guard against an asset added by accident. / head.js が一覧から外れた根拠は、静的な検査の約束ではなく実行時の監視が見たことである。本体のスタックで CAS の画面の外部要求は 0 件で、CAS のビルドの検査は、うっかり足された資産に対する回帰の防止にすぎない。 +- Version / 版: 0.20 — 2026-11-17. **Learned:** a forgery test that goes through the component it checks proves that component, not the one behind it: the S5 forged request passes through the SP, which strips it, so it would pass on a CAS that trusts anyone; S5 now also tries CAS around the SP wherever the host can reach it (PR #88 second review). / 確かめたい部品の手前の部品を通る偽装の試験は、手前の部品しか示さない。S5 の偽装の要求は SP を通り、SP が取り除くので、誰でも信じる CAS でも合格してしまう。そこで S5 は、ホストから届く限り、SP を迂回して CAS も試す(PR #88 の二度目の点検)。 + 0.19 — 2026-11-16. **Learned:** the reason head.js left the list is what the runtime guard saw, not what a static check promises: the CAS pages made 0 external requests on the live stack, while the CAS build check is only a regression guard against an asset added by accident. / head.js が一覧から外れた根拠は、静的な検査の約束ではなく実行時の監視が見たことである。本体のスタックで CAS の画面の外部要求は 0 件で、CAS のビルドの検査は、うっかり足された資産に対する回帰の防止にすぎない。 0.18 — 2026-11-16. **Learned:** an exception approved for the time being is closed by the change that removes its cause, not by a date: the CAS image now loads nothing from another host (RDM-cas-overlay-dev2027 PR #5, checked at build time), so head.js left the known external assets again and the list is back to its M2 content. / 当面として承認した例外は、日付ではなく原因を除く変更で閉じる。CAS のイメージは他のホストから何も読まなくなった(RDM-cas-overlay-dev2027 PR #5。ビルド時に検査する)ので、head.js は既知の外部資産からまた外れ、一覧は M2 の内容に戻った。 0.17 — 2026-11-16. **Learned:** the institution login of RDM runs through CAS, so the S5 row now names the path the code takes (CAS's institution page behind the SP, then the SP, the test IdP, the SP again and CAS) and asserts the institution through the API, because no legacy page shows it for a user without projects; a first institution login lands on /settings/, and the real CAS page added one script to the known external assets (§3 rule 4). / RDM の機関ログインは CAS を通るので、S5 の行はコードがたどる経路(SP の後ろの CAS の機関選択画面、SP、テスト IdP、再び SP と CAS)を書き、機関は API で確かめるようにした。プロジェクトを持たない利用者には、旧来の画面のどこにも機関名が出ないからである。初めての機関ログインは /settings/ に着き、本物の CAS の画面は既知の外部資産にスクリプトを一つ加えた(§3 規則 4)。 0.16 — 2026-11-16. **Learned:** a scenario has to test what the subsystem is for, not what a contract guessed it would offer: S3 wanted a metadata read from aipf_mcp_data_grdm, which only writes and trusts only its issuer's tokens, so the row now signs tokens with a mock issuer's key (ADR-15), stores user_a's PAT through the component's own form and checks the project the component creates in the OSF API, while the rejections cover the token rules and user_b's PAT on user_a's project. / シナリオは、契約が推し量った機能でなく、サブシステムが何のためにあるかを試さなければならない。S3 は aipf_mcp_data_grdm にメタデータの読み取りを求めたが、この部品は書くだけで、自分の発行者のトークンしか信頼しない。そこで行は模擬の発行者の鍵でトークンに署名し(ADR-15)、部品自身の欄から user_a の PAT を預け、部品が作ったプロジェクトを OSF API で確かめる。拒否はトークンの規則と、user_a のプロジェクトでの user_b の PAT を扱う。 @@ -87,10 +88,10 @@ subsystem_scenarios[5]{id,subsystem,success_case,rejection_case,services,prerequ S2,rdmcp (MCP endpoint),"an MCP client registers dynamically with rdmcp and starts /authorize with PKCE (S256); rdmcp sends the browser to the real CAS oauth2/authorize, where user_a signs in with the OSF password and allows the application; on rdmcp's node-selection page user_a finds the run's project and connects; rdmcp's code with the PKCE verifier yields an rdmcp token; MCP initialize, then tools/call rdm_get_node on the run's project returns that node with its title","an MCP request without a token -> transport HTTP 401 with WWW-Authenticate: Bearer (not 200 with an embedded status); user_b's private project is not offered on user_a's node-selection page, and posting its id to the page's endpoint -> 400; with a grant for the run's project only, tools/call rdm_get_node on user_b's project and on user_a's second, unselected project -> tool error (isError, HTTP 200) although user_a can read that second project in GRDM","rdmcp cas api web","full profile (GRDM_PROFILE=full) with GRDM_PORT_RDMCP and GRDM_PORT_CAS in runtime/.env and `accept --seed` (user_a's OSF password for the real CAS); otherwise skip with reason" S3,aipf_mcp_data_grdm,"the test signs JWTs with oidc_mock's key from runtime/.env (iss and aud of the template, exp in 5 min). user_a creates a personal access token (PAT); a token from the AIPF screen (azp grdm-dev-webui, no actor) gets a form token from grdm_token_form, and POST /grdm/token?t=