add audience claim to access tokens

Aperta
#371 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ruby

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Ruby
Stelle
85
Fork
72
Merge medio
3g 12h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hackclub/auth

Tutte le issue di hackclub/auth

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.