program_key authentication should become a proper client_credentials grant

Abierto
#369 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ruby

Línea de trabajo

Start by reading API::V1::ApplicationController#authenticate! and the ident_scope behavior described in the issue. Trace how the program_key path sets authentication context and how OAuth tokens represent delegated users, then decide whether this should use a client credentials grant or a separate API surface. Done means program keys no longer bypass delegation semantics, with the intended behavior covered by tests.

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

Descripción

enhancement

problem

API::V1::ApplicationController#authenticate! accepts two credential types in the same Authorization header:

  • OAuthToken — standard user-delegated access token (RS behavior)
  • Program.program_key — app-level static key, no user delegation

the program_key path sets @current_identity = nil and @current_scopes = @current_program.scopes (the app's full registered scope list). ident_scope then returns every identity that ever authorized the app — all users, all scopes, no per-user consent.

this is a client_credentials grant wearing a trenchcoat. it bypasses the delegation model entirely.

impact on DPoP/on-behalf-of

  • DPoP binds tokens to a key pair held by the presenter. a program_key is a static secret with no presenter concept.
  • on-behalf-of (RFC 8693) assumes the initial token represents a user delegation. program_key represents no user.

direction

the program_key path should become a proper client_credentials grant with its own token, or a separate API surface with explicit non-delegated semantics. the acting_as_program boolean is a code smell for what should be a distinct authentication context.

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.