spring - Calling refresh_token doesn't refresh resource ids in token -
flow this:
- we have oauth app registered specific resource ids listed, app has access those
- after time there need add resource id, extending features of our client app
- from time time client app doing refreshing of token, either due errors or access_token expiration.
- using check_token on new access_token gives old set of resource ids. seems taken cache or old token itself.
question: shouldn't refresh token refresh resource ids? againts oauth rfc( couldnt find particular case in )?
we ofcourse revoke tokens oauth app, require our users log in again want avoid.
im not sure if related spring cloud security or rather oauth itself. c
this answers assumes resource identifiers equivalent oauth2 describes scopes description purpose seems similar - constrain reach of access token.
when issuing access token refresh request specification states can include scope
parameter, however:
the scope of access request described section 3.3. requested scope must not include scope not granted resource owner, , if omitted treated equal scope granted resource owner.
additionally, part of response new refresh token issued, again:
the authorization server may issue new refresh token (...) if new refresh token issued, refresh token scope must identical of refresh token included client in request.
(emphasis mine, section 6. of specification)
this means that, per specification, automatically adding new scopes/resources access token not compliant. however, don't need logout users, should need request resource owner consent new scopes.
again, specification states scopes seem match usage scenario. however, there scenarios not apply strictly or end not having real impact. if single organization controls authorization server , client application can decide application enjoy what's sometime known administrative consent resource owner isn't asked explicit consent because trusted application. in these cases, increase scopes/resources without type of user intervention.
Comments
Post a Comment