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

Backport of UI: Update resultant-acl banner into release/1.15.x #25267

Conversation

hc-github-team-secure-vault-core
Copy link
Contributor

Backport

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

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


This PR updates when the resultant-acl banner is shown to a user.

Before, we were always calling resultant-acl at the current namespace. This typically would fail when the user is accessing a child namespace that they have access to, unless the administrator specifically gave them read access to the resultant-acl path within that namespace. This is a subpar experience for both users and administrators.

With this change:

  • resultant-acl will always be called at the user's root namespace instead of the current namespace
    • eg. if I'm user bob enabled at an auth mount in ns1, my resultant-acl call will always be made to namespace ns1 regardless of the namespace I'm currently accessing
  • As a result of the above, the call should never fail unless the user does not have the default policy attached. This means we can differentiate between no namespace access and a failed call.
    • If the call does fail, a banner with "Resultant ACL check failed" will show
  • Once the call succeeds, we then check if the current namespace the user is accessing is present in any of the paths returned from the call. This allows the behavior to work consistently regardless of the group_policy_application_mode set.
    • When the call succeeds but the namespace is not present in the paths, a banner with "
  • For CE, the namespace link will not show and it will in practice only show the "Resultant ACL check failed" message

When accessing a namespace that is not in your policy:
no namespace access example

When logged in with a user that does not have the default policy attached
no default policy example


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-23578/resultant-acl-fix/precisely-measured-blowfish branch from 7006ec5 to 293a843 Compare February 7, 2024 18:57
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Feb 7, 2024
@hashishaw hashishaw added this to the 1.15.6 milestone Feb 7, 2024
@hashishaw hashishaw enabled auto-merge (squash) February 7, 2024 18:59
Copy link

github-actions bot commented Feb 7, 2024

Build Results:
All builds succeeded! ✅

@hashishaw hashishaw merged commit 22f5b35 into release/1.15.x Feb 7, 2024
67 of 68 checks passed
@hashishaw hashishaw deleted the backport/ui/VAULT-23578/resultant-acl-fix/precisely-measured-blowfish branch February 7, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants