3scale / openid-connect-api-gateway-rhsso

OpenID Connect for API authentication using 3scale API gateway and Red Hat Single Sign-On
MIT License
0 stars 2 forks source link

Auth Out Of Band Does not Work As Intended #3

Open tschiman opened 5 years ago

tschiman commented 5 years ago

https://github.com/3scale/openid-connect-api-gateway-rhsso/blob/e830121918114b32f1b7360ecba74def8a8fe60a/nginx.conf#L99

This block of code does not work as intended with the caching. This block is executed synchronously with every request.

To test add a loop in the LUA code that has 100k plus iterations that does something like add values to the cache. You will see progressive degredation on response times as the loop interation grows.

tschiman commented 5 years ago

The fix is either to move 3scale caching to another application or change the cache to include a managed timeout and incremental count on endpoint access to track usage. Or just change nginx to hit 3scale synchronously so the behavior isn't obscured.

NGINX/LUA cannot be made to run asychronous behavior within a request.