Skip to content

Commit

Permalink
Properly invalidate group alias in a secondary (#6564)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak authored Apr 10, 2019
1 parent 9e08b35 commit 41a7517
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vault/identity_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ func (i *IdentityStore) Invalidate(ctx context.Context, key string) {
i.logger.Error("failed to delete group from MemDB", "group_id", group.ID, "error", err)
return
}

if group.Alias != nil {
err := i.MemDBDeleteAliasByIDInTxn(txn, group.Alias.ID, true)
if err != nil {
i.logger.Error("failed to delete group alias from MemDB", "error", err)
return
}
}
}

// Get the storage bucket entry
Expand Down

0 comments on commit 41a7517

Please sign in to comment.