Grant longer subscription TTLs by re-checking access outside renewals

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

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

評価

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

調査の方向性

Read faucet/subscribe.go around the renewal handler and the RepoIDFresh call to see where the GitHub access check currently happens, then read docs/webhooks.md for the documented 10-minute TTL and the poll path's cached permission check the proposal wants to reuse. Decide where a server-side re-verification schedule or delivery-time check belongs, how terminated is emitted on revocation, and how the client-suggested TTL is capped at about a day. This is a design change touching renewal, caching and termination, so write the approach down before editing, and treat the spec sections cited in the issue as the acceptance criteria.

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

説明

Problem

Grants are capped at 10 minutes because access is checked only at renewal (faucet/subscribe.go, docs/webhooks.md). Each renewal of a browser-login subscription asks GitHub again (RepoIDFresh). A long-lived client, such as a Coder deployment holding a subscription per automation, must then renew every subscription every few minutes forever with a fresh token, and each renewal spends one GitHub API call.

The spec recommends "grants from a few minutes up to about a day" and lets a long-lived tenant suggest days, so that it is not "forced to refresh on a cadence the server invented" (events.mdx L457-L461). It also says the server SHOULD periodically re-verify permissions at delivery time and terminate on revocation (L841).

Proposal

Move the access re-check off the renewal path: re-verify each subscription's access on a server-side schedule (or at delivery, reusing the cached check that poll uses), send terminated on revocation, and then grant TTLs up to the client's suggestion, capped at about a day.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要言語
Go
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

coder/faucet のほかの issue

coder/faucet の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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