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

Unable to manually update secret in GUI #2217

Open
2 tasks done
sralloza opened this issue May 2, 2024 · 2 comments · May be fixed by #2240
Open
2 tasks done

Unable to manually update secret in GUI #2217

sralloza opened this issue May 2, 2024 · 2 comments · May be fixed by #2240
Labels
bug Something isn't working

Comments

@sralloza
Copy link

sralloza commented May 2, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

To update a normal variable you just need to click in the value column of the environments view. However secret variables can't be updated like so. To update a secret you need to first uncheck the Secret checkbox, update it and then enable the secret checkbox again.

Is this expected behaviour?

.bru file to reproduce the bug

environment bru file:

vars {
  baseUrl: https://example.com
}
vars:secret [
  access_token,
  admin_cli_password
]

Screenshots/Live demo link

image
@sralloza sralloza added the bug Something isn't working label May 2, 2024
@krummbar
Copy link
Contributor

krummbar commented May 3, 2024

This is something that I found confusing as well.
I think this should be editable even though the value is hidden. Assuming I'm screen sharing, I want to be able to change the value of the secret without showing everyone what I'm entering.

I've checked the cause for this. Looks like if it is set as secret, it renders a div instead of an SingleLineEditor. I can only guess, but probably the reason for this is due to the limitations of CodeMirror with masking capabilities.

I've experimented a little bit, I'm trying to use the SingleLineEditor but changing the rendered output. This seems to work, but currently it is not masking/unmasking immediately when I'm changing a variable type as secret or not. Also I've to check if this has some other implications.

@krummbar
Copy link
Contributor

krummbar commented May 4, 2024

It's now working. If the solution looks fine I'll raise a PR later today. Still wanted to check its not interfering with existing functionality

@krummbar krummbar linked a pull request May 4, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants