mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-12-06 11:03:52 +00:00
fix(admin): list the anonymous user in snapshot views
The auth snapshot built users from the key digest map only. The keyless principal never appeared in usage, catalog, metrics or fleet views, and its rejection counter was pruned on a users-file reload. The snapshot now adds the anonymous principal once, with source anonymous.
This commit is contained in:
@@ -1462,6 +1462,19 @@ func (a *authStore) snapshot() ([]userSummary, []groupSummary) {
|
||||
memberCounts[name]++
|
||||
}
|
||||
}
|
||||
if anon := a.anonymous; anon != nil {
|
||||
users = append(users, userSummary{
|
||||
limits: anon.user.limits,
|
||||
limitSources: anon.user.limitSources,
|
||||
name: anon.user.name,
|
||||
groupName: anon.user.groupName,
|
||||
groups: cloneStringSlice(anon.user.groupNames),
|
||||
source: "anonymous",
|
||||
})
|
||||
for _, name := range anon.user.groupNames {
|
||||
memberCounts[name]++
|
||||
}
|
||||
}
|
||||
a.mu.RUnlock()
|
||||
sort.Slice(users, func(i, j int) bool { return users[i].name < users[j].name })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user