add audience claim to access tokens

Abierto
#371 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ruby

Línea de trabajo

Start by reading Doorkeeper's custom_access_token_attributes hook and trace how OAuthToken is created during authorization and checked in API authentication. The issue calls for adding and populating an audience column, then validating it during authentication; done means tokens are bound to their intended resource server and invalid audiences are rejected. The payload does not name files or tests, so first locate those entry points and their existing tests.

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

Descripción

enhancement

problem

opaque access tokens have no `audience` field. every valid token works against every endpoint on the RS. the OIDC id_token gets an `aud` from doorkeeper-openid-connect, but the access token itself carries no audience binding.

impact

  • fine while HCA is the only RS, breaks if tokens are ever issued for external RSes
  • token exchange (RFC 8693) requires specifying target audience for downscoping — no audience field means no downscoping target

direction

add an `audience` column to OAuthToken, populate it during authorization, validate it in API authentication. doorkeeper's `custom_access_token_attributes` hook supports this.

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.