ThreeMammals/Ocelot

Claim-based rate limiting

Ouverte

#1 587 ouverte le 18 juil. 2022

 (8 commentaires) (0 réaction) (0 personne assignée)C# (1 617 forks)batch import
AuthenticationRate Limitingacceptedfeaturehelp wantedproposal

Métriques du dépôt

Stars
 (8 137 étoiles)
Métriques de merge PR
 (Merge moyen 44j 17h) (6 PRs mergées en 30 j)

Description

New Feature

Extracting claims from the token and use as a Client ID in the rate limiting. Suggesting a new feature to implement the rate limiting based on the claims in the token.

Motivation for New Feature

Current rate limiting is based on the Client ID passed in the header from the request. There are chances that anyone can manipulate the request by updating headers and using APIs without any restriction.

So, instead of depending on the consumer to provide the Client ID in the header, we can use the claims from the token. Which is more secure and not modifiable. Considering this, a rate limit will be applicable for authenticated endpoints only.

Specifications

  • Version: 18.1.0
  • Platform: .NET 6

Guide contributeur