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

UI/fix kv data cache #14489

Merged
merged 7 commits into from
Mar 16, 2022
Merged

UI/fix kv data cache #14489

merged 7 commits into from
Mar 16, 2022

Conversation

hashishaw
Copy link
Collaborator

This PR fixes some strange behavior within the KV secrets engine (see gifs below):

User reader has the following policy:

path "kv/metadata" {
  capabilities = ["list"]
}
path "kv/data/*" {
  capabilities = ["read", "update"]
}

User admin has the following policy:

path "kv/metadata" {
  capabilities = ["list"]
}
path "kv/data/*" {
  capabilities = ["read", "update"]
}
path "kv/metadata/*" {
  capabilities = ["read", "update"]
}

BEFORE: reader cannot click button create new version, but experiences no issues when creating a version other than the new version doesn't show after redirect to show view
kv-new-version-before

AFTER: admin can still create new version from specific version (this behavior is preserved, if user has metadata read access)
kv-new-version-after

AFTER: reader can create new version, and it always creates from the most recent version due to no metadata read access
kv-new-version-metadata

@hashishaw hashishaw added ui bug Used to indicate a potential bug backport/1.9.x labels Mar 14, 2022
@hashishaw hashishaw added this to the 1.9.5 milestone Mar 14, 2022
Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this!

@vercel vercel bot temporarily deployed to Preview – vault March 16, 2022 15:36 Inactive
@hashishaw hashishaw modified the milestones: 1.9.5, 1.10 Mar 16, 2022
@hashishaw hashishaw merged commit 1cc28a6 into main Mar 16, 2022
@hashishaw hashishaw deleted the ui/fix-kv-data-cache branch March 16, 2022 16:02
hashishaw added a commit that referenced this pull request Mar 16, 2022
* KV fetches recent version on every page, no longer disallow new version without metadata access

* Don't flash no read permissions warning

* Send noMetadataVersion on destroy if version is undefined

* test coverage

* add changelog, fix tests

* Fix failing test
hashishaw added a commit that referenced this pull request Mar 16, 2022
* KV fetches recent version on every page, no longer disallow new version without metadata access

* Don't flash no read permissions warning

* Send noMetadataVersion on destroy if version is undefined

* test coverage

* add changelog, fix tests

* Fix failing test
hashishaw added a commit that referenced this pull request Mar 16, 2022
* KV fetches recent version on every page, no longer disallow new version without metadata access

* Don't flash no read permissions warning

* Send noMetadataVersion on destroy if version is undefined

* test coverage

* add changelog, fix tests

* Fix failing test
hashishaw added a commit that referenced this pull request Mar 16, 2022
* KV fetches recent version on every page, no longer disallow new version without metadata access

* Don't flash no read permissions warning

* Send noMetadataVersion on destroy if version is undefined

* test coverage

* add changelog, fix tests

* Fix failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants