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

Default to Json editor if KV secret is nested #24290

Merged
merged 6 commits into from
Nov 30, 2023

Conversation

Monkeychip
Copy link
Contributor

@Monkeychip Monkeychip commented Nov 29, 2023

For a secret that is an object/nested ex: { "foo": { "bar": "baz" } }, when you navigate to the details view it should default to a readonly JSON editor and disabled JSON toggle.

image

Making a different ticket for a nice-to-have as it's "new" and should not be backported: show only the keys unless “show values” is toggled on (new toggle)

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Nov 29, 2023
@Monkeychip Monkeychip added this to the 1.15.4 milestone Nov 29, 2023
@Monkeychip Monkeychip added the ui label Nov 29, 2023
@Monkeychip Monkeychip marked this pull request as ready for review November 29, 2023 18:11
Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

Elegant! Nice work 🚀

@Monkeychip Monkeychip enabled auto-merge (squash) November 30, 2023 16:21
@Monkeychip Monkeychip merged commit 2e9578b into main Nov 30, 2023
70 checks passed
@Monkeychip Monkeychip deleted the ui/VAULT-22208/kv-details-complex branch November 30, 2023 16:36
Monkeychip added a commit that referenced this pull request Nov 30, 2023
* initial fix

* changelog

* fix

* fix test and add test coverage

* remove useless escape characters

* pr comments add more test coverage
@chichi13
Copy link

I don't really understand the point of this PR... This is a regression for me.

A step backwards in terms of security --> all secrets are now visible, whereas before we could select only the secret we wanted. And now we don't even have the choice of seeing it as we did before.

There should be a global option to display JSON by default or not. And not impose the JSON view, which for me is a big step backwards.

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 ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants