Home session expiry maps 401 by exact error-string match (Low)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with home_projection_token_error in elastos/crates/elastos-server/src/api/gateway_home_runtime.rs, then read grant_bound_token_expiry in gateway_home_token.rs and RoomSessionAuthorization::validate in room_service.rs. Replace the exact message comparison with typed error handling, and log the underlying grant-store error before it is collapsed. Done when inactive or revoked grants map to 401 regardless of message wording and the underlying error is logged.
索引モデルが issue の本文から書いたものです。
説明
Severity: Low (fails closed; correctness and observability only)
Found in the security review of #536.
Current behavior
home_projection_token_error (elastos/crates/elastos-server/src/api/gateway_home_runtime.rs) decides 401 by exact string equality:
if err.to_string() == "home launch token auth session is not active" { 401 } else { 500 }
A future rewording of load_active_session_grant, an added .context(...), or any anyhow display change falls through to gateway_internal_error → 500. Access is still denied, but the client loses its "re-authenticate" signal and logs fill with misleading 500s.
Fix
- Use a typed error (an enum such as
HomeTokenError::SessionInactive, orerr.downcast_ref) instead of string equality. - Log the underlying error before the
map_err(|_| …)collapses ingrant_bound_token_expiry(gateway_home_token.rs) andRoomSessionAuthorization::validate(room_service.rs), so a lapsed grant is distinguishable from I/O or state corruption.
Done means
- A lapsed or revoked grant maps to 401 regardless of how the grant loader's message is worded.
- The underlying grant-store error is logged before it is collapsed to an auth failure.
- 主要言語
- Rust
- スター
- 6
- フォーク
- 2
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 42
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
elastos/elastos-runtime のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elastos/elastos-runtime#563 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
elastos/elastos-runtime#508 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elastos/elastos-runtime#436 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
elastos/elastos-runtime#427 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
elastos/elastos-runtime#405 ·
メンテナーはふだん 1 日以内に返信
elastos/elastos-runtime の issue をすべて見る
似ている issue
-
bug good first issue help wanted linux macos testing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
area: app type: test
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
storytold/photocraft#12706 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
IngvarConsulting/unica#2822 ·
メンテナーはふだん 1 日以内に返信