Apply consistent access checks across Studio endpoints

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
49/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start in the hotfixes viewsets and plain views, then inspect neighbouring endpoints for their permission-scoped query patterns. Check serializers for requester fields and review tests around the Stripe webhook, logout, and public channel token endpoints. Add regression coverage for each access denial or refused request; done means every scoped gap follows the stated pattern and its regression test passes.

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

説明

DEV: backend

Overview

Several Studio endpoints don't apply the access checks the rest of the API follows. Some viewset actions query models directly instead of through the permission-scoped queryset. Some writable fields should come from the logged-in user. Some views accept requests they should refuse. Each sub-issue closes one gap so it matches the access pattern of its neighbouring endpoints.

Scope
  • Included: viewset actions and plain views on hotfixes whose access check is missing or weaker than their neighbours'.
  • Included: request hardening next to those checks: the Stripe webhook secret, logout over GET, and rate limits on the public channel token endpoints.
  • Excluded: the /api/internal/* endpoints, which are to be deprecated.
  • Excluded: organization role management, which #6312–#6315 track.
Guidance
  • Target hotfixes.
  • Each access-check fix needs a regression test showing that a user without access gets the same response as for a nonexistent object. Each hardening fix needs a regression test for the request it now refuses.
Strategy
  • Viewset actions load objects through get_object() / get_edit_object(), or the model's filter_view_queryset / filter_edit_queryset, never Model.objects directly.
  • A field that identifies the requester is read-only in the serializer and set from request.user.

AI usage

I chose which audit findings belong here and set the access pattern. Claude Code found and reproduced each gap and drafted this issue.

主要言語
Python
スター
212
フォーク
321
平均マージ
1日 7時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

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

learningequality/studio のほかの issue

learningequality/studio の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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