Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andrii-korotkov-verkada opened this issue Sep 3, 2024 · 1 comment

Comments

@andrii-korotkov-verkada
Copy link

andrii-korotkov-verkada commented Sep 3, 2024

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.

@andrii-korotkov-verkada andrii-korotkov-verkada changed the title How to store a hash of descriptor instead of a raw descriptor? How to use a hash of descriptor instead of a raw descriptor? Sep 3, 2024
@jespersoderlund
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants