Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAccessProviders ¶
ApplyAccessProviders reconciles the configured access providers against the currently registered providers and updates the manager. It logs a concise summary of the detected changes and returns whether any provider changed.
Types ¶
type AuthRateLimiter ¶
type AuthRateLimiter struct {
// contains filtered or unexported fields
}
AuthRateLimiter tracks per-IP authentication failures and enforces rate limits: after maxFailures failures within failureWindow, the IP is locked out for lockoutDuration.
func NewAuthRateLimiter ¶
func NewAuthRateLimiter() *AuthRateLimiter
NewAuthRateLimiter creates a rate limiter and starts background cleanup.
func (*AuthRateLimiter) IsLimited ¶
func (rl *AuthRateLimiter) IsLimited(ip string) bool
IsLimited returns true if the given IP is currently locked out.
func (*AuthRateLimiter) RecordFailure ¶
func (rl *AuthRateLimiter) RecordFailure(ip string)
RecordFailure records an authentication failure for the given IP. If the failure count reaches the threshold within the window, the IP is locked out.
func (*AuthRateLimiter) RecordSuccess ¶
func (rl *AuthRateLimiter) RecordSuccess(ip string)
RecordSuccess clears all failure state for the given IP.
func (*AuthRateLimiter) Stop ¶
func (rl *AuthRateLimiter) Stop()
Stop terminates the background cleanup goroutine. Safe to call multiple times.