auth: queue and task grants for inspect and admin tokens

クローズ
#989 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #1012 @stromanni による — マージ済み

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

Start with Grant::parse and Admin::scope, then compare the narrowed-access pattern in Producer::scope_narrowed and the #987 behavior for GetJob. Trace the listed queue, task, dead-letter, periodic-task, and listing methods to determine where resources are loaded and scopes are checked. Done means narrowed operator grants can be minted, permitted resources work, out-of-scope rows return *_NOT_FOUND, and spanning methods refuse safely with SCOPE_DENIED metadata.

索引モデルが issue の本文から書いたものです。

説明

area/server area/wire P2 security

Follow-up to #839 / #987.

inspect and admin can only be granted whole: Grant::parse refuses a qualifier on them, and both Admin::scope and the auth layer require whole access. So an operator token reaches every queue, dead letter, schedule and override in its namespace.

Wanted: an operator token for one team's queues. For example, admin:queue=billing could pause or resume billing and replay its dead letters, and could touch nothing else.

Methods that name a resource:

  • PauseQueue / ResumeQueue (queue)
  • Set/ClearQueueOverride (queue)
  • Set/ClearTaskOverride (task_name)
  • PutPeriodicTask (task_name, queue)
  • PurgeDeadLetters (task_name arm)

Methods keyed by id: Get/Replay/DeleteDeadLetter and the periodic Get/Delete/Pause/Resume/Trigger need the row loaded first. A row outside the grants should read as *_NOT_FOUND, the same way GetJob answers since #987.

Methods that span queues: ListQueues, GetThroughput, ListDeadLetters, ListWorkers, ListPeriodicTasks and ListOverrides must follow the #987 rule: either the request names a reachable resource, or the method is refused. No post-filtering, because a short page leaks a count.

Pattern to reuse: the default Admin::scope stays closed. Each method opts in on purpose, as Producer::scope_narrowed does. Refusals reuse SCOPE_DENIED with queue / task metadata.

Until then: a narrowed operator grant stays unmintable.

主要言語
Rust
スター
20
フォーク
2
平均マージ
10時間 50分
マージ済み PR(30日)
61

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ByteVeda/flexiq のほかの issue

ByteVeda/flexiq の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。