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

Ratelimit based on JWT claim #7175

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Ratelimit based on JWT claim #7175

wants to merge 5 commits into from

Conversation

pdabelf5
Copy link
Collaborator

Proposed changes

Allow the rate-limiting policy to use a $jwt_claim_ variable to be used as the key in the rate limit zone

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pdabelf5 pdabelf5 requested a review from a team as a code owner January 21, 2025 12:29
@github-actions github-actions bot added documentation Pull requests/issues for documentation go Pull requests that update Go code labels Jan 21, 2025
@pdabelf5 pdabelf5 requested a review from a team as a code owner January 21, 2025 12:31
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-ingress-controller/7175/

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.73%. Comparing base (86c9752) to head (8c47bf9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7175   +/-   ##
=======================================
  Coverage   52.73%   52.73%           
=======================================
  Files          89       89           
  Lines       20843    20843           
=======================================
  Hits        10992    10992           
  Misses       9394     9394           
  Partials      457      457           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ADubhlaoich ADubhlaoich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I wonder if the example could be made a live documentation page instead of a repo example (I know it's relatively small).

At the least, creating a link to it somewhere from documentation makes it more discoverable.

@github-actions github-actions bot added python Pull requests that update Python code tests Pull requests that update tests labels Jan 21, 2025
pdabelf5 and others added 5 commits January 21, 2025 17:22
Bumps the actions group with 2 updates: [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) and [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action).


Updates `reviewdog/action-actionlint` from 1.63.0 to 1.64.1
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](reviewdog/action-actionlint@f3dcc52...abd5374)

Updates `DavidAnson/markdownlint-cli2-action` from 19.0.0 to 19.1.0
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@a23dae2...05f3221)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Venktesh Shivam Patel <[email protected]>
@pdabelf5 pdabelf5 force-pushed the ratelimit-jwt-variable branch from fecfc73 to 81dea70 Compare January 21, 2025 17:22
@github-actions github-actions bot added github_actions Pull requests that update Github_actions code chore Pull requests for routine tasks labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks documentation Pull requests/issues for documentation github_actions Pull requests that update Github_actions code go Pull requests that update Go code python Pull requests that update Python code tests Pull requests that update tests
Projects
Status: Todo ☑
Development

Successfully merging this pull request may close these issues.

2 participants