Grant longer subscription TTLs by re-checking access outside renewals

Abierto
#89 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github, go

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
1
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/faucet

Todos los issues de coder/faucet

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.