Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultHostServices ¶
func NewDefaultHostServices() core.AuthnHostServices
NewDefaultHostServices constructs the explicit production host implementation bundle.
Types ¶
type DefaultBruteForceService ¶
type DefaultBruteForceService struct{}
DefaultBruteForceService implements core.BruteForceService in the auth subpackage. It mirrors the legacy behavior previously implemented in core.
func (DefaultBruteForceService) LoadHistories ¶
func (DefaultBruteForceService) LoadHistories(ctx *gin.Context, auth *core.AuthState, accountName string)
LoadHistories mirrors the legacy logic that created a BucketManager and populated the AuthState's LoginAttempts/Passwords* counters.
func (DefaultBruteForceService) WaitDelay ¶
func (DefaultBruteForceService) WaitDelay(maxWaitDelay, loginAttempt uint) int
WaitDelay implements the same hyperbolic tangent curve used previously in calculateWaitDelay.
type DefaultCacheService ¶
type DefaultCacheService struct{}
DefaultCacheService implements core.CacheService in the auth subpackage. It mirrors the legacy behavior: on success, write a PositivePasswordCache to Redis. On failure, there is no Redis write here (brute-force bookkeeping is handled elsewhere).
func (DefaultCacheService) OnFailure ¶
func (DefaultCacheService) OnFailure(_ *core.AuthState, _ string)
OnFailure handles the actions required in case of an unsuccessful authentication attempt for the given account name. No negative cache is written here (historic behavior); brute-force metrics are handled by other parts of the pipeline.
type DefaultLuaSubject ¶
type DefaultLuaSubject struct{}
DefaultLuaSubject executes exact generation-owned Lua subject sources.
func (DefaultLuaSubject) AnalyzeSource ¶
func (DefaultLuaSubject) AnalyzeSource( ctx *gin.Context, view *core.StateView, passDBResult *core.PassDBResult, name string, prototype *lua.FunctionProto, pools *vmpool.Manager, poolKey vmpool.PoolKey, modules *luaseal.Modules, ) definitions.AuthResult
AnalyzeSource executes one exact generation-owned precompiled subject source.
type DefaultPasswordVerifier ¶
type DefaultPasswordVerifier struct{}
DefaultPasswordVerifier implements core.PasswordVerifier by mirroring the legacy verification loop using core helpers. It iterates configured backends and returns the first decisive result or an aggregated configuration error.
type DefaultRBLService ¶
type DefaultRBLService struct{}
DefaultRBLService implements the parallel RBL checks analogous to the previous logic in environment.go.
func (DefaultRBLService) ScoreWithFacts ¶
func (DefaultRBLService) ScoreWithFacts(ctx *gin.Context, view *core.StateView) (core.RBLPolicyFact, error)
ScoreWithFacts computes the aggregated RBL score and request-local policy facts.