From 3f5aa438810853e3bbb6fb3c235dd4986c0b59f1 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Fri, 22 Dec 2023 13:50:32 -0500 Subject: [PATCH] Use the cache for user login state. It was discovered that the user login state isn't being used for the user login state generator. This means that role lookups are not being cached, which is an unnecessary performance burden, and any potential further cache updates would not be used. This has been fixed. --- lib/auth/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth/auth.go b/lib/auth/auth.go index 74ddb8e9bed9e..44e3ad1ae1b34 100644 --- a/lib/auth/auth.go +++ b/lib/auth/auth.go @@ -451,8 +451,8 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (*Server, error) { // Add in a login hook for generating state during user login. as.ulsGenerator, err = userloginstate.NewGenerator(userloginstate.GeneratorConfig{ Log: log, - AccessLists: services, - Access: services, + AccessLists: &as, + Access: &as, UsageEvents: &as, Clock: cfg.Clock, })