mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
Add a check for missing entity during local alias invalidation. (#14622)
This commit is contained in:
parent
846db6a7d3
commit
6b6a97f502
2 changed files with 7 additions and 0 deletions
3
changelog/14622.txt
Normal file
3
changelog/14622.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
replication (enterprise): fix panic due to missing entity during invalidation of local aliases.
|
||||
```
|
||||
|
|
@ -773,6 +773,10 @@ func (i *IdentityStore) Invalidate(ctx context.Context, key string) {
|
|||
i.logger.Error("failed to fetch entity during local alias invalidation", "entity_id", alias.CanonicalID, "error", err)
|
||||
return
|
||||
}
|
||||
if entity == nil {
|
||||
i.logger.Error("failed to fetch entity during local alias invalidation, missing entity", "entity_id", alias.CanonicalID, "error", err)
|
||||
continue
|
||||
}
|
||||
|
||||
// Delete local aliases from the entity.
|
||||
err = i.deleteAliasesInEntityInTxn(txn, entity, []*identity.Alias{alias})
|
||||
|
|
|
|||
Loading…
Reference in a new issue