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

properly handle init queue for hierarchical paths #115

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

fairclothjm
Copy link
Contributor

@fairclothjm fairclothjm commented Sep 20, 2024

This PR fixes a bug where roles names with hierarchical paths caused a panic on reloads of the backend.

Roles can be defined with hierarchical paths, e.g. "foo/bar/baz". Howerver, the storage.List() call to the top-level static role path will only return the top-level keys in the hierarchy. So we perform a non-recursive breadth-first search through all the keys returned from storage.List(). If a given node points to a static role, we append to the return slice and use that slice to initialize the queue.

Closes hashicorp/vault#27907
Closes #114

Copy link
Contributor

@thyton thyton left a comment

Choose a reason for hiding this comment

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

LGTM

@fairclothjm fairclothjm merged commit fb5c655 into main Sep 23, 2024
4 checks passed
@fairclothjm fairclothjm deleted the VAULT-30629/fix-init-queue/heirarchical-paths branch September 23, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants