You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v1.8.0 R1: narrow refreshed access-token scopes while preserving the refresh grant #451
Refresh requests currently ignore scope narrowing. An access token always inherits the original refresh-token scope, preventing a caller from requesting a less privileged token for one use.
Evidence
libs/oauth2/src/protocol/TokenService.cc assigns storedRt.scope to the new access token and refresh token. Memory and PostgreSQL rotation currently require access-token scope byte equality. The token controller does not forward a refresh scope request. This is the R1 slice of #408 and #417, based on the v1.7.0 release-preparation baseline and dependent on #446.
Suggested fix
Add a separately named scope-aware API while preserving old signatures/defaults. Validate explicit RFC 6749 scope tokens and subsets after authoritative Ready inspection, preserve original refresh-grant bytes, and use the effective scope for access-token claims. Reject duplicate scope parameters before folding them; preserve client authentication and replay-revocation ordering. Share an allocation-free subset predicate in both storage implementations under the original locks.
Acceptance criteria
Explicit equal/subset scope succeeds and echoes canonical effective scope; omitted/empty preserves old response shape and scope bytes.
Invalid scope leaves an unused RT reusable; semantic bad scope cannot bypass AlreadyUsed revocation.
Raw parser, Domain, real Memory/Postgres rotation, owned PG HTTP and SDK consumer checks cover positive and negative cases.
OpenAPI, generated clients and additive API baseline are synchronized using the existing generators.
Final-head required CI, sanitizers, SDK and original hard coverage gates pass; no thresholds are weakened.
Out of scope / follow-ups
Resource authorization, offline_access, Token Exchange, JWK changes, migrations, routes, other grant parsers, teardown issue #300, merging or releasing. This child issue does not close #408 or #417. R1 remains draft until the F0 dependency is integrated and its actual final base is revalidated.
Activity
feat(oauth2): support refresh access-token scope narrowing
feat(oauth2): support refresh access-token scope narrowing
feat(oauth2): support refresh access-token scope narrowing