Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix group alias loading when identity memdb is initialized #5289

Merged
merged 2 commits into from
Sep 6, 2018

Conversation

uepoch
Copy link
Contributor

@uepoch uepoch commented Sep 6, 2018

Fixes #5288

This move the MemDB Alias upsert deeper in UpsertGroupInTxn which get called in loadGroups at initialization.

This way aliases get initialized properly when loading groups from storagePacker

@jefferai jefferai added this to the 0.11.1 milestone Sep 6, 2018
@@ -1092,6 +1086,12 @@ func (i *IdentityStore) UpsertGroupInTxn(txn *memdb.Txn, group *identity.Group,
// Increment the modify index of the group
group.ModifyIndex++

if group.Alias != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is also present in https://github.com/hashicorp/vault/blob/master/vault/identity_store.go#L222 which needs to be removed.

Copy link
Member

@vishalnayak vishalnayak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM outside of one minor comment that I left.

@vishalnayak
Copy link
Member

We'd like this PR to be in sooner. So we'll be addressing the comment post-merge. Thanks for submitting this!

@vishalnayak vishalnayak merged commit 0b3607a into hashicorp:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants