mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-30 18:29:21 +08:00
I've vendored in parts of gravitational/oxy under the lib/limiter/internal/ratelimit package, taking the opportunity to convert to slog and replace mailgun dependencies (ttlmap, timetools) with Teleport equivalents. This commit also removes the max_users limiter option. This setting never actually did what it claims to do. The max_users option was passed in as a capacity to a TTL map, but the TTL map doesn't reject new entries when the capacity is exceeded, it just removes old entries to make room. Removing old entries from the TTL map did not enforce any sort of user limit - it has the opposite effect. It "resets" existing limits for the old user, effectively un-limiting them! In practice, we've never actually been able to enforce a maximum number of simultaneous users, so rather than changing the behavior I've opted to remove the field from everything other than the config file.