lua-resty-openidc icon indicating copy to clipboard operation
lua-resty-openidc copied to clipboard

Cache abstraction

Open jnivala opened this issue 4 years ago • 0 comments

Hi,

We are planning to use NGINX Plus in a cluster setup. We'd like to share Lua-resty-openidc state (jwks, discovery, introspection) across the cluster. To do that, NGINX Plus provides key value storage that can be used via API and whose data can be made automatically sync to cluster.

Lua-resty-openidc, however, uses ngx.shared[type] as a cache explicitly. That does not allow us to utilize our own cache.

Would it be feasible to add optional abstraction to cache access? That is, allow specifying optional callbacks or object that would do cache access. That would allow us to use our own cache.

Edit: The problem description mentioned session and PKCE data. That did not make sense as neither of them are handled by lua-resty-openidc. Session is by lua-resty-session and PKCE is handled by us (btw that could be included in lua-resty-openidc).

But the principle stands: it would be nice to allow deciding what cache to use.

Regards, Janne

jnivala avatar Mar 27 '20 09:03 jnivala