access

package
v6.9.0-aug.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAccessProviders

func ApplyAccessProviders(manager *sdkaccess.Manager, oldCfg, newCfg *config.Config) (bool, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL