declare all OAuth scopes and enable enforce_configured_scopes

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
57/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ruby

Línea de trabajo

Start with doorkeeper.rb and locate the optional_scopes declaration and the commented enforce_configured_scopes setting. Find the app's actual requested scopes and ensure they are all declared before enabling enforcement. Done means undeclared scopes are rejected at authorize time; the issue also calls for auditing registered app scopes before deployment.

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

Descripción

bug

problem

doorkeeper.rb declares only 4 optional scopes (openid, profile, phone, birthdate) but the app uses 12+: email, name, groups, verification_status, slack_id, legal_name, basic_info, address, set_slack_id, etc. enforce_configured_scopes is commented out.

any app can request scope=literally_anything and doorkeeper puts it on the token. the RS ignores unrecognized scopes at render time so nothing leaks, but tokens carry junk scopes. token exchange (RFC 8693) needs a canonical scope list to validate downscoping against.

fix

add all real scopes to optional_scopes and uncomment enforce_configured_scopes. apps requesting undeclared scopes get rejected at authorize time.

behavioral change: any app currently requesting an undeclared scope will start getting rejected. audit existing apps' registered scopes before deploying.

Lenguaje dominante
Ruby
Estrellas
85
Forks
72
Merge medio
3 d 12 h
PR fusionados (30 d)
22

Preparar el entorno

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 hackclub/auth

Todos los issues de hackclub/auth

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.