Skip to content

Backport of VAULT-3825: Wildcard ACL policies without a trailing slash should match LIST operations into release/1.13.x#23875

Merged
miagilepner merged 1 commit intorelease/1.13.xfrom
backport/miagilepner/VAULT-3825-wildcard-policy/visually-welcome-gator
Oct 27, 2023
Merged

Backport of VAULT-3825: Wildcard ACL policies without a trailing slash should match LIST operations into release/1.13.x#23875
miagilepner merged 1 commit intorelease/1.13.xfrom
backport/miagilepner/VAULT-3825-wildcard-policy/visually-welcome-gator

Conversation

@hc-github-team-secure-vault-core
Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #23874 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


I'll split this into an OSS PR and add a changelog there once it's approved.

When a LIST operation is executed on namespace foo, both of the following policies will independently allow the operation:

path "foo/sys/policies/acl" {
	capabilities = ["list"]
}

and

path "foo/sys/policies/acl/" {
	capabilities = ["list"]
}

both work 👍

However, when we use a wildcard in the policy path, we get different behavior:

path "+/sys/policies/acl" {
	capabilities = ["list"]
}

^ this fails

path "+/sys/policies/acl/" {
	capabilities = ["list"]
}

but ^ this succeeds.

This PR fixes the behavior so that it's the same for a wildcard versus no wildcard.

I considered stripping the trailing slash earlier in the request flow, but that would mean that any users that had written rules assuming that there was a trailing slash would need to update their policies after this change.

Tests for this are in enterprise.


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/miagilepner/VAULT-3825-wildcard-policy/visually-welcome-gator branch 2 times, most recently from aac8d0f to 11acab6 Compare October 27, 2023 14:00
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 27, 2023
@miagilepner miagilepner added this to the 1.13.10 milestone Oct 27, 2023
@miagilepner miagilepner enabled auto-merge (squash) October 27, 2023 14:00
@github-actions
Copy link
Copy Markdown

Build Results:
All builds succeeded! ✅

@miagilepner miagilepner merged commit fa2be33 into release/1.13.x Oct 27, 2023
@miagilepner miagilepner deleted the backport/miagilepner/VAULT-3825-wildcard-policy/visually-welcome-gator branch October 27, 2023 14:19
@github-actions
Copy link
Copy Markdown

CI Results:
All Go tests succeeded! ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants