mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
add warning to identify which entities have 1+ aliases with the same mount accessor (#28054)
* add warning to identity which entities have 1+ aliases with the same mount accessor * remove redundant log
This commit is contained in:
@@ -459,6 +459,10 @@ LOOP:
|
||||
|
||||
mountAccessors := getAccessorsOnDuplicateAliases(entity.Aliases)
|
||||
|
||||
if len(mountAccessors) > 0 {
|
||||
i.logger.Warn("Entity has multiple aliases on the same mount(s)", "entity_id", entity.ID, "mount_accessors", mountAccessors)
|
||||
}
|
||||
|
||||
for _, accessor := range mountAccessors {
|
||||
if _, ok := duplicatedAccessors[accessor]; !ok {
|
||||
duplicatedAccessors[accessor] = struct{}{}
|
||||
@@ -498,10 +502,6 @@ LOOP:
|
||||
accessorCounter++
|
||||
}
|
||||
|
||||
if len(duplicatedAccessorsList) > 0 {
|
||||
i.logger.Warn("One or more entities have multiple aliases on the same mount(s), remove duplicates to avoid ACL templating issues", "mount_accessors", duplicatedAccessorsList)
|
||||
}
|
||||
|
||||
if i.logger.IsInfo() {
|
||||
i.logger.Info("entities restored")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user