use jwt in rate limiting
See original GitHub issuehi
how can I use jwt as client id fir client rate limiting?
i thing i should "ClientIdHeader": "Authorization"
in my appsetting.json
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
[Tutorial] Securing Rate Limit Actions with JSON Web ...
Rate limiting is a strategy implemented in API or Edge Gateways to protect backend services by preventing service outages from being overrun ...
Read more >Rate limiting on token claims | Edge Stack
Ambassador Edge Stack is able to perform Rate Limiting based on JWT Token claims from either a JWT or OAuth2 Filter implementation.
Read more >The Curious Problem of Rate Limiting an Unauthenticated ...
Endpoints were rate limited by an issued JWT but the endpoint that issues the JWT can't be rate limited. This might be fine...
Read more >NGINX rate limitting by decoded values from JWT token
As you may know that rate limit is applied through unique ip address for best result you should use unique jwt value or...
Read more >Rate limiting policy is not being applied dynamically using ...
I have created an api using JWT authentication type. actially I want to rate limit dynamically on the basis of JWT policy claims....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same question. As a workaround i’ve used
"ClientIdHeader": "Authorization"
, however the API can be configured to accept JWT tokens via query strings.The problem is that the client rate limiting middleware is executed before MVC authorisation handles parse JWT token, and so
httpContext.User
is not set.It would be nice to have an option for
ClientRateLimitMiddleware
to be executed after user context is set.I had a similar problem with wanting to use claims-based ratelimiting. My solution was to register the ratelimiting middleware after authentication. In
Startup.cs#Configure
:Then using a custom configuration and resolver: