krakend / krakend-ce

KrakenD Community Edition: High-performance, stateless, declarative, API Gateway written in Go.
https://www.krakend.io
Apache License 2.0
1.92k stars 451 forks source link

Revoked tokens persistence #360

Closed alexzarbn closed 2 years ago

alexzarbn commented 2 years ago

Describe what are you trying to do Hi, we're considering to use KrakenD as an API Gateway, and it is looking good so far.

The only question is token revocation. In the documentation it states that revoked tokens are stored in memory, which leads to the question - what happens, if a token is revoked and KrakenD instance is shut down before the token is invalidated on an end-user's side (let's say, user did not make any requests to an API after the token was revoked)?

Does KrakenD (somehow) restores the list of revoked tokens after a reload or in the scenario above revoked tokens won't be considered as "revoked" anymore and users would still be able to access an API?

Thank you!

kpacha commented 2 years ago

yes, the KrakenD instances keep a set in memory of the revoked tokens. they expect initialization and updates from an external source by using the exposed RPC methods union and add.

here you have two small working examples for the remote client of the RPC service:

the easiest way to implement your client is adding a local bloomfilter into it and using it for sending the initial snapshots to the new instances

alexzarbn commented 2 years ago

@kpacha Okay, thank you ~

github-actions[bot] commented 2 years ago

This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.