Skip to content

WIP: Add reactive caching for error tracking list_projects API

Reuben Pereira requested to merge 55199-reactive-caching into master

What does this MR do?

Adds reactive caching for the list_projects API.

The list_projects API receives api_host and token as POST parameters. These parameters are used to make an API call to Sentry without saving these values to DB.

Since the api_host and token are not saved into DB, reactive caching gets a little tricky. The cache normally uses the DB id as key. In this case, we need to use the api_host and token as additional qualifiers to the cache key.

This, however, has security implications. Storing a token in the cache may cause security issues.

I tried using the encrypted token and IV as qualifiers instead of the plaintext token. This does not work because any assignment to the token causes a new IV to be generated, which also results in a new encrypted value even if the plaintext value is the same. This means that the same POST params will cause a cache miss because the IV and encrypted value will be different each time.

Any suggestions on how to implement reactive caching are welcome.

What are the relevant issue numbers?

#55199 (closed)

Does this MR meet the acceptance criteria?

Merge request reports