Skip to content

Commit

Permalink
Update comment to indicate ok on marking token as orphan
Browse files Browse the repository at this point in the history
  • Loading branch information
calvn committed Mar 26, 2018
1 parent 5648624 commit 564de0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vault/token_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,13 @@ func (ts *TokenStore) revokeSalted(ctx context.Context, saltedId string) (ret er
}

// Mark all children token as orphan by removing
// their parent index, and clear the parent entry
// their parent index, and clear the parent entry.
//
// Marking the token as orphan is the correct behavior in here since
// revokeTreeSalted will ensure that they are deleted anyways if it's not an
// explicit call to orphan the child tokens (the delete occurs at the leaf
// node and uses parent prefix, not entry.Parent, to build the tree for
// traversal).
parentPath := parentPrefix + saltedId + "/"
children, err := ts.view.List(ctx, parentPath)
if err != nil {
Expand Down

0 comments on commit 564de0d

Please sign in to comment.