envoyproxy / ratelimit

Go/gRPC service designed to enable generic rate limit scenarios from different types of applications.
Apache License 2.0
2.3k stars 451 forks source link

How to use a hash of descriptor instead of a raw descriptor? #699

Closed andrii-korotkov-verkada closed 1 month ago

andrii-korotkov-verkada commented 2 months ago

Hello, I hope your day is going well. There's a use case of rate limiting per auth token (stored in a header), which effectively means rate limit per caller. However, it's not desired to store a raw token in Redis as a part of a key. What's the best way to get a hashed value of the auth token to be used as a descriptor? Thanks.

jespersoderlund commented 2 months ago

How about creating the hash in a lua-script in your envoy config and put it into a dynamic variable and use that to ratelimit on?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.