Auth: Add empty role usage metrics for service and user accounts (#73108)

* Add tests for service accounts metrics usage

* Add service account store implementation

* Add service account service implementation

* Add tests for org metrics usage

* Add org implementation

* Add service implementation
This commit is contained in:
linoman
2023-08-16 10:56:47 +02:00
committed by GitHub
parent 75b0788377
commit 1c7f89c41b
9 changed files with 155 additions and 17 deletions
+8
View File
@@ -72,6 +72,14 @@ func (s *Service) GetUsageStats(ctx context.Context) map[string]interface{} {
}
stats["stats.case_insensitive_login.count"] = caseInsensitiveLoginVal
count, err := s.store.CountUserAccountsWithEmptyRole(ctx)
if err != nil {
return nil
}
stats["stats.user.role_none.count"] = count
return stats
}