mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-17 12:07:02 +02:00
Fix HelpOperation on sudo-protected paths (#18568)
* Fix HelpOperation on sudo-protected paths Fixes #18566 * Add changelog
This commit is contained in:
parent
1fca38a4ae
commit
4758cc8f86
3
changelog/18568.txt
Normal file
3
changelog/18568.txt
Normal file
@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
core: Fix spurious `permission denied` for all HelpOperations on sudo-protected paths
|
||||
```
|
@ -719,7 +719,9 @@ func (c *Core) performPolicyChecks(ctx context.Context, acl *ACL, te *logical.To
|
||||
if !ret.ACLResults.Allowed {
|
||||
return ret
|
||||
}
|
||||
if !ret.RootPrivs && opts.RootPrivsRequired {
|
||||
// Since HelpOperation was fast-pathed inside AllowOperation, RootPrivs will not have been populated in this
|
||||
// case, so we need to special-case that here as well, or we'll block HelpOperation on all sudo-protected paths.
|
||||
if !ret.RootPrivs && opts.RootPrivsRequired && req.Operation != logical.HelpOperation {
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user