Lane-sequence repair gives no route for sequences owned by an application role

オープン
#682 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, rust

調査の方向性

The issue names awa.lane_sequence_problems, awa.repair_lane_sequence, awa migrate, awa storage lane-sequences --repair, and the security guide’s lane-ownership section. Start by reading the 0.6.14 definer_lane_provisioning patch and the guide section, then inspect the reported repair roles and permissions. Done means repairable roles or role combinations are reported, superuser-only cases are explicit, and the manual fix is documented.

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

説明

When a lane sequence belongs to an application login role that the migration role isn't a member of (for example a lane created on 0.6.13 by a runtime role with schema CREATE), the repair tooling can't fix it, and doesn't say who can.

  • awa.lane_sequence_problems(schema) returns repair_roles = {} for such a sequence, even though its reassign_sql (ALTER SEQUENCE … OWNER TO awa_owner) works for a superuser, or for a role that is a member of both the current owner and the schema owner.
  • awa.repair_lane_sequence has EXECUTE revoked from PUBLIC, so the owning app role can't run the repair itself either.
  • awa migrate and awa storage lane-sequences --repair report these sequences as left over, which is correct, but the operator is left without a next step.

Reproduced on a database brought to 0.6.13's state with awa migrate, a lane created by an app login through awa storage prepare-queue, and then the 0.6.14 definer_lane_provisioning patch plus repair run as a migration login that is a member of the schema owner. The 16 app-owned sequences stayed unrepaired with empty repair_roles, and another runtime role got permission denied for sequence on them.

Proposal

  • Report the roles or role combinations that can repair a sequence: the owner itself, a role holding both the owner's and the schema owner's privileges, or a superuser. Say explicitly when only a superuser can.
  • Document the manual fix in the security guide's lane-ownership section.
主要言語
Rust
スター
37
フォーク
8
平均マージ
14時間 16分
マージ済み PR(30日)
244

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

hardbyte/awa のほかの issue

hardbyte/awa の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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