Clarify the importance of NOINHERIT to properly create a role on the DOCS
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- postgresql
調査の方向性
まず、issue にリンクされている PostgreSQL GRANT ドキュメントを確認し、このリポジトリ内の対応するロール作成のガイダンスを見つけてください。NOINHERIT の動作、ロールの永続性、および分離された ALTER ROLE の例を明確にしてください。完了の基準は、ドキュメントが認可リスクを正確に説明し、後から実行する CREATE ROLE が既存のロールを変更するかのように示唆しないことです。
索引モデルが issue の本文から書いたものです。
説明
When a ROLE is created in PG, it may inherit privileges from other roles. It specially inherits all privileges from the PUBLIC role.
From the DOCs:
"Any particular role will have the sum of privileges granted directly to it, privileges granted to any role it is presently a member of, and privileges granted to PUBLIC.".
If your application is implementing a whitelist logic (most of the cases), this may represent a leak of authorization. So all roles must be created using the NOINHERIT clause, but there is another gotcha: creating a role and them altering it to NOINHERIT is a safer option than creating a role with NOINHERIT.
-- OK if there is no graphile_visitor already in your system
CREATE ROLE graphile_visitor NOINHERIT;
-- A better option, specially during development if you use dropdb to "reset" your application
CREATE ROLE graphile_visitor;
ALTER ROLE graphile_visitor NOINHERIT;
When a ROLE is created, it's not stored into the database itself, but inside a private catalog called pg_user. If graphile_visitor by accident was crate without the NOINHERIT, dropping the database won't erase it, so adding the NOINHERIT to its creation clause afterward will have no effect at all.
-- this is a mistake
CREATE ROLE graphile_visitor;
-- this isn't a bug fix
CREATE ROLE graphile_visitor NOINHERIT;
This happens because, when it runs the second query, PG will identify that a role with the same name already exists so it will skip the CREATE ROLE. Keeping creation and alteration separated will ensure the intended behavior.
- 主要言語
- SCSS
- スター
- 27
- フォーク
- 124
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphile/graphile.github.io のほかの issue
-
help wanted quick
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
graphile/graphile.github.io#401 · コメント 1 件 · リアクション 1 件 ·
-
website: Update details on homepage and sponsor page再び着手できるかも @jemgillam が 1119 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンquick
graphile/graphile.github.io#399 · コメント 4 件 · 担当者 1 名 ·
-
sponsor page: New wording around Grafast needed!再び着手できるかも @jemgillam が 1149 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
graphile/graphile.github.io#393 · リアクション 1 件 · 担当者 1 名 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
graphile/graphile.github.io#341 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
graphile/graphile.github.io#280 · コメント 2 件 · リアクション 5 件 ·
graphile/graphile.github.io の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
gke-labs/kube-agents#7308 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 62/100
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·