identity_authorized_for_scope? scans token table at RS time
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- ruby
- Área
- authentication, backend
Línea de trabajo
Start in API::V1::ApplicationController and trace how the acting_as_program path resolves identity scopes and app grants. Then check the authorization flow that could capture or derive the scope set before this query runs. Done means this path checks the resolved scopes without scanning live tokens, while preserving delegation-specific authorization.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
problem
in API::V1::ApplicationController:
```ruby
def identity_authorized_for_scope?(identity, scope)
if current_identity
@current_token.scopes.include?(scope)
else
identity.access_tokens.to_a.any? { |t| t.active? && t.application_id == current_program.id && t.scopes.include?(scope) }
end
end
```
the `else` branch (program_key / acting_as_program path) loads all active tokens for an identity and scans them to check consent. the RS is reaching into the AS's token store to reconstruct authorization decisions at query time.
impact
- with on-behalf-of, different delegation chains would be conflated
- per-request token table scans add latency that grows with the number of active tokens
direction
the acting_as_program path should use a pre-resolved scope set per identity (captured at authorization time or derived from the app's grants), not scan live tokens.
- Lenguaje dominante
- Ruby
- Estrellas
- 85
- Forks
- 72
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hackclub/auth
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
Todos los issues de hackclub/auth
Issues similares
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ruby/securerandom#92 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
open-feature/ruby-sdk-contrib#340 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zold-io/wts.zold.io#651 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
erkamyaman/rust-anything#788 ·
Los mantenedores suelen responder en 1 día