interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
233 stars 83 forks source link

Move auth's koa session state out of service #2673

Closed BlairCurrey closed 4 months ago

BlairCurrey commented 5 months ago

Feature Request

Describe the feature you'd like to request

Dont keep state in-memory for koa-session in auth.

Describe the solution you'd like

Use redis as external session store for koa-session in auth. https://github.com/koajs/session?tab=readme-ov-file#external-session-stores. Note that koa-session is also used in a test context, which this doesn't really need to change.

Describe alternatives you've considered

In light of discussions about migrating away from redis I also considered storing it in postgres instead. However even if we migrate away from redis, I think migrating from a redis to a redis-like service will be much simpler (probably just changing image in docker compose, no code changes) and just generally more fit for this purpose.