Hi Torsten, Stefanie, Marius


I wanted to suggest an addition to the token revocation rfc7009 to provide more 
clarity on how revocation of refresh tokens should be handled. I feel the rfc 
should,

1. Describe how the client/resource-owner can provide "standing instructions" 
to the OAuth server to revoke refresh tokens.

2. Describe the default way to for the OAuth server to define constrains for 
revocation of refresh token if this constrains are not specified by the 
client/resource owner.



The way it could be handled is:

1. Store a Client level threshold (clt) of number of valid refresh tokens per 
"user-client" combination (and OAuth server can store the default value for 
clt, if undefined by the client or resource owner).

2. Keep the "time to live" for the access token reasonably small (few minutes 
to couple of hours).

a. Revocation of active token removes the token ad the refresh token.

b. When new tokens are generated, up to "clt" number of Refresh tokens is 
maintained by the OAuth server (the most recent refresh token over writes the 
cltth  refresh token for user-client combination).

c. Revocation of inactive token removes the refresh token.



We have implemented such a scheme for our OAuth server, whereby "clt" is set to 
five by default (if not specified in client the properties). Therefore,

1. Whenever a new token and refresh token is created, it overwrites the 5th 
(clt=5) oldest refresh token (for clientId-userId combination).

2. Code grant tokens are only valid for 1 hour. When the token expires, refresh 
token is not removed.

3. When an "active" token is revoked, Token and it's refresh token is also 
revoked.

4. When an "expired" token is revoked, only the corresponding refresh token is 
revoked.



The above example explicitly specify how to handle revocation of refresh tokens 
when the client has not informed the OAuth server about how expiry of refresh 
tokens should be handled. This also allows clients to specify certain 
constrains (like default time to live for tokens, and client level threshold 
for number of refresh tokens to keep active for each client-user combination).



Are you planning to update the RFC on the scheme to handle revocation of 
refresh token? If not, would you be willing to include the proposed changes to 
RFC7009? Please let me know.

--

Thanks,

Amit

_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth

Reply via email to