An Inspiring Caching Scenario

Customer said: “We have a legacy application which is used company wide for user management. It keeps data in IBM DB2 database. We want to be able to retrieve the roles of our clients from this database, and use these roles for endpoint based authorization after the JWT authentication.”

Problem: Updating the existing application or the clients’ code were not an option. On the other hand, the query  to gather the roles from the application’s database was too complex, and that would possibly create a performance issue.

What the Customer did: A senior developer in the company managed to solve the problem with Apinizer’s features.

First, using Apinizer DB-2-API he created an API that will return the roles of the given user.

Then he configured Apinizer to cache the responses of this API. Since the roles of the users were not being modified often, a not very short invalidation period for the cache was enough to increase the performance of the API even though the query behind the API was not so fast.

Next step was creating an API Call Policy to enrich the original request of any authenticated client with the roles provided by this new API for the client.  

Finally, backend APIs were able to take the roles of the client from the header of the messages.

Result: A complex requirement was handled by the customer elitely without coding. The scenario was really inspiring even for the Apinizer Team