diff --git a/vault/activity_log.go b/vault/activity_log.go index fb866640a..026ad3500 100644 --- a/vault/activity_log.go +++ b/vault/activity_log.go @@ -1600,9 +1600,8 @@ func (a *ActivityLog) HandleTokenUsage(entry *logical.TokenEntry) { return } - // Do not count root tokens in client count. This includes generated root tokens - // as well. - if len(entry.Policies) == 1 && entry.Policies[0] == "root" { + // Do not count root tokens in client count. + if entry.IsRoot() { return }