Monday, December 1, 2014

How to reduce API Manager oauth token table growth and clean old tokens - WSO2 API Manager

With current model token table will not grow fast. AFAIR in API Manager 1.1.0 and 1.2.0 we had this problem due to having multiple active access tokens for same user/app combination. But according to current model we will have only one active access token at given time. And if user requests token again and again we will issue same user access token with update lifetime(do not issue new one). So with that access token table growth should be minimum and will not cause problem.
On the other hand having old access token data will help us to maintain history data. Sometimes we might need to know who is token owner, when it was issues, was it revoked or expired etc(when we analyze logs). In such cases this data will help us.
However if user really need to remove this data we can delete them using db query. We should delete only revoked, expired, inactive tokens(token state) when we have active access token for same consumer key + user combination.

No comments:

Post a Comment