summaryrefslogtreecommitdiff
path: root/internal/middlewares/bridge.go
AgeCommit message (Collapse)Author
2025-03-01feat(middlewares): tokenized bucket rate limit (#8321)James Elliott
This adds rate limits to the TOTP second factor endpoint, the Duo second factor endpoint, Session Elevation endpoint, and the Reset Password endpoint. This protection exists as several configurable tokenized buckets anchored to the users remote IP address. In the event the rate limit is exceeded by the user the middleware will respond with a 429 status, a Retry-After header, and JSON body indicating it's rate limited, which the UI will gracefully handle. This has several benefits that compliment the 1FA regulation, specifically in simple architectures it limits the number of SMTP sends a unique client can make, as well as the number of requests a particular client can make in general on specific endpoints where too many requests may indicate either a fault or some form of abuse. Closes #7353, Closes #1947 Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2022-06-10refactor(middlewares): convert the bridge to a builder (#3338)James Elliott
This adjusts the bridge to be utilized as a builder in order to make it more reusable.