VAULT-34593 CE changes (#29889)

* VAULT-34593 CE changes

* Move nsidentity to mount
This commit is contained in:
Violet Hynes 2025-03-11 09:59:35 -04:00 committed by GitHub
parent 4238274692
commit cfd4af68a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View File

@ -607,6 +607,17 @@ func (c *Core) GetSecretEngineUsageMetrics() map[string]int {
for _, entry := range c.mounts.Entries {
mountType := entry.Type
if mountType == mountTypeNSIdentity {
mountType = pluginconsts.SecretEngineIdentity
}
if mountType == mountTypeNSSystem {
mountType = pluginconsts.SecretEngineSystem
}
if mountType == mountTypeNSCubbyhole {
mountType = pluginconsts.SecretEngineCubbyhole
}
if _, ok := mounts[mountType]; !ok {
mounts[mountType] = 1
} else {
@ -625,6 +636,11 @@ func (c *Core) GetAuthMethodUsageMetrics() map[string]int {
for _, entry := range c.auth.Entries {
authType := entry.Type
if authType == mountTypeNSToken {
authType = pluginconsts.AuthTypeToken
}
if _, ok := mounts[authType]; !ok {
mounts[authType] = 1
} else {

View File

@ -75,6 +75,7 @@ const (
mountTypeSystem = "system"
mountTypeNSSystem = "ns_system"
mountTypeIdentity = "identity"
mountTypeNSIdentity = "ns_identity"
mountTypeCubbyhole = "cubbyhole"
mountTypePlugin = "plugin"
mountTypeKV = "kv"