community icon indicating copy to clipboard operation
community copied to clipboard

secrets with a name that starts with #/? are unable to be deleted or updated via UI/CLI

Open GregoryDosh opened this issue 3 years ago • 1 comments

Description

A secret with a name that begins with # such as #slack-channel-name can be created via the UI, but is unable to be deleted via the UI or CLI.

$ vela add secret --org GregoryDosh --repo VelaTesting --name "#test" --value asdf
{
	AllowCommand: true,
	Events: [deployment push tag],
	ID: 446,
	Images: [],
	Name: test,
	Org: GregoryDosh,
	Repo: VelaTesting,
	Team: ,
	Type: repo,
	Value: [secure],
}
$ vela update secret --org GregoryDosh --repo VelaTesting --name "#test" --value asdf
FATA[0000] unable to update secret repo/GregoryDosh/VelaTesting/ for native service: record not found
$ vela remove secret --org GregoryDosh --repo VelaTesting --name "#test"
FATA[0000] unable to delete secret repo/GregoryDosh/VelaTesting/ from native service: record not found

Value

An inability to delete or update certain secrets causing end user confusion.

Useful Information

  1. What is the output of vela --version?
vela --version
vela version v0.11.0
  1. What operating system is being used? macOS Monterey

  2. Any other important details? This occurs in the UI as well. Screen Shot 2022-02-03 at 10 25 32 AM

GregoryDosh avatar Feb 03 '22 16:02 GregoryDosh

Talking with @wass3r and hypothesizing it's URL encoding issues, and testing this seems to confirm.

It also happens when a name starts with "?" too.

vela remove secret --org GregoryDosh --repo VelaTesting --name "?test"
FATA[0000] unable to delete secret repo/GregoryDosh/VelaTesting/ from native service: record not found

but if you use %3F instead of ? it will work.

vela remove secret --org GregoryDosh --repo VelaTesting --name "%3Ftest"
secret repo/GregoryDosh/VelaTesting/?test deleted from native service

GregoryDosh avatar Feb 03 '22 16:02 GregoryDosh

also true for ' anywhere in its name

wass3rw3rk avatar Jun 22 '23 15:06 wass3rw3rk