Grant longer subscription TTLs by re-checking access outside renewals
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 28/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- github, go
- 領域
- authorization, backend
研究方向
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,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
coder/faucet 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 68/100
-
難度 4/5 3-5 天 新手友好度 30/100
-
難度 3/5 1-2 天 新手友好度 62/100
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
GetBatchResponseById panics for items without a body (204/302) and for unknown ids可能已有人在做 @0z5a 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
-
bug
難度 2/5 1-3 小時 新手友好度 80/100
JuliusBrussee/caveman#1567 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
-
bug postgresql
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆