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

Call runFilteredPathsEvaluation from within mountInternal/enableCredentialInternal #21260

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

ncabatoff
Copy link
Collaborator

This fixes a bug with backend initialization and path filters. This requires that we hold both the mountsLock and authLock (instead of just one or the other) while calling it, so for simplicity we grab them both at the outset.

While working on this I noticed that ListAuths grabs the wrong lock, so I also fixed that.

And I modified ClusterSetup: as a convenience, it now populates the factories for all the builtin engines in the config it returns.

…ide mountInternal/enableCredentialInternal, while we hold the lock. This requires that we grab both the mountsLock and authLock, for reasons that only make sense when looking at the ent code.

While fixing this I noticed that ListAuths grabs the wrong lock, so I also fixed that.

And I modified ClusterSetup: as a convenience, it now populates the factories for all the builtin engines in the config it returns.
Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Based on comments in the original PR I think this looks good.

@ncabatoff ncabatoff added this to the 1.11.12 milestone Jun 15, 2023
@ncabatoff ncabatoff enabled auto-merge (squash) June 15, 2023 16:26
@ncabatoff ncabatoff merged commit c5549cd into main Jun 15, 2023
@ncabatoff ncabatoff deleted the vault-16453-path-filter-backend-init-oss branch June 15, 2023 16:56
ncabatoff added a commit that referenced this pull request Jun 15, 2023
…ntialInternal (#21260)

The main point of this work is to move runFilteredPathsEvaluation inside mountInternal/enableCredentialInternal, while we hold the lock.  This requires that we grab both the mountsLock and authLock, for reasons that only make sense when looking at the ent code.

While fixing this I noticed that ListAuths grabs the wrong lock, so I also fixed that.

And I modified ClusterSetup: as a convenience, it now populates the factories for all the builtin engines in the config it returns.
# Conflicts:
#	vault/core.go
@ncabatoff
Copy link
Collaborator Author

Manual 1.11 backport: #21292

ncabatoff added a commit that referenced this pull request Jun 15, 2023
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.

None yet

2 participants