Grant longer subscription TTLs by re-checking access outside renewals

Ouverte
#89 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
28/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
github, go

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Go
Étoiles
1
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de coder/faucet

Toutes les issues de coder/faucet

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.