TFA & RBAC
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- express, node.js, postgresql, typescript
調査の方向性
ファイルやテストは指定されていません。まず Passport のログインスクリプト、Postgres のログイン関数、org_membership、および既存の is_owner 権限チェックを把握し、その後 TFA と RBAC の設計オプションを解決して、メンバー招待、機密性の高い操作、置き換えとなる権限チェックの受け入れ基準を定義してください。
索引モデルが issue の本文から書いたものです。
説明
I'm just looking at my roadmap and I need to write these two features at some point in the future. I may as well contribute them back if you'd like them..
I'm a bit torn about how I'd like to do implementation on the above, interested in your thoughts. If we can come to an agreement that works in my use case and for your boilerplate then I can contrib back.
TFA:
Opt 1 - make this part of the login sequence and add it into the passport login script. TOTP only probably, do the validation on login inside typescript with a node library for TOTP checking (i.e if a tfa is set don't call the Postgres login function until we have validated the TOTP token. Drag session times down. I'm thinking this is probably a bit too simplistic for my use case but could be OK. Super simple to write.
Opt 2 - decouple it and ask for it at login, but also whenever we do something sensitive. Write a handler that will allow us to require them to re-TFA on doing special operations. E.g if you want to delete a record then resupply TFA. This would probably mean we might want to do the TOTP validation in Postgres. Not entirely thought this out, but it could be that we carry in Postgres "last_tfa_timestamp" and check for this being < 5 minutes ago and then throw an error which causes the frontend to run a verifyTFA operation and retry the query or ask for it directly in those functions which are special or write middleware which will do this in express for a statically defined list of queries..
### RBAC:
Opt 1- flexible : So we have a group table, and a permissions table. User or admin can create a group with A,B and C permissions and then add a permissions group UUID to the org_membership table. Select 1 if permission where group = $groupUUID. Keep track of permissions in a JSON file under source control. Default "Owner Group" that replaces is_owner.
Opt 2- flexibleBasic : Directly assign permissions to a org_member maybe in an array e.g permissions varchar[] - {"CRUSER", "DLUSR"}.
Opt 3- staticBasic : Super simple static permissions where we recommend for example the default of a org_member is read only for records in that organisation, then e.g a Tier1 and Tier2 T/F permissions rows in the database similar to the existing is_owner implemenation. The user can decide how to use Tier 2 -- e.g Might be also write/update simple nonconsequential things. Tier 1 could be write/update all things (i.e like old 'is_owner' check). User could always add in more tiers if they need it manually.
Opt 4- Use Postgres rbac and groups to do all the hard work for us and change the context.
For any of the above
-Invite member with permissions XYZ should be implemented
-is_owner and is_billing stay as business logic only fields. For example where to send billing or account emails. All cureent is_owner permsission checks get shifted to the new RBAC method.
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 226
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphile/starter のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
🐛 bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
-
username sanitization is case sensitive; column is citext対応中かも @hydrandt が 1812 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
graphile/starter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
rel: fix
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Deltares/fews-web-oc#2400 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ardia-browser/ardia#4426 ·
メンテナーはふだん 1 日以内に返信
-
Bug report: isValidISODateDashOnly accepts text before or after the date-time対応中かも @bardrop が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
pnp/cli-microsoft365#7713 ·
メンテナーはふだん 1 日以内に返信
-
Diagram: Journey Type: Bug / Error
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mermaid-js/mermaid-v13#1293 ·
メンテナーはふだん 1 日以内に返信