Skip to content

Commit cfd4af6

Browse files
authored
VAULT-34593 CE changes (#29889)
* VAULT-34593 CE changes * Move nsidentity to mount
1 parent 4238274 commit cfd4af6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

vault/core_metrics.go

+16
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,17 @@ func (c *Core) GetSecretEngineUsageMetrics() map[string]int {
607607

608608
for _, entry := range c.mounts.Entries {
609609
mountType := entry.Type
610+
611+
if mountType == mountTypeNSIdentity {
612+
mountType = pluginconsts.SecretEngineIdentity
613+
}
614+
if mountType == mountTypeNSSystem {
615+
mountType = pluginconsts.SecretEngineSystem
616+
}
617+
if mountType == mountTypeNSCubbyhole {
618+
mountType = pluginconsts.SecretEngineCubbyhole
619+
}
620+
610621
if _, ok := mounts[mountType]; !ok {
611622
mounts[mountType] = 1
612623
} else {
@@ -625,6 +636,11 @@ func (c *Core) GetAuthMethodUsageMetrics() map[string]int {
625636

626637
for _, entry := range c.auth.Entries {
627638
authType := entry.Type
639+
640+
if authType == mountTypeNSToken {
641+
authType = pluginconsts.AuthTypeToken
642+
}
643+
628644
if _, ok := mounts[authType]; !ok {
629645
mounts[authType] = 1
630646
} else {

vault/mount.go

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const (
7575
mountTypeSystem = "system"
7676
mountTypeNSSystem = "ns_system"
7777
mountTypeIdentity = "identity"
78+
mountTypeNSIdentity = "ns_identity"
7879
mountTypeCubbyhole = "cubbyhole"
7980
mountTypePlugin = "plugin"
8081
mountTypeKV = "kv"

0 commit comments

Comments
 (0)