community icon indicating copy to clipboard operation
community copied to clipboard

listing secrets from vault

Open jbrockopp opened this issue 3 years ago • 0 comments

Description

A bug was discovered when attempting to list shared secrets using the vault engine.

At this time, we're unsure if the issue is isolated to shared secrets when using this engine.

In the UI (https://vela.example.com/-/secrets/vault/shared/<org>/<team>), we see:

image

In the CLI, we see:

$ vela get secret --secret.engine vault --secret.type shared --org <org> --team <team>
NAME	ORG	TYPE	KEY

In the go-vela/server logs we see:

/__w/server/api/secret.go:286 (0x13c9010)
/__w/server/secret/vault/list.go:63 (0x133af44)
/__w/server/server/secret/vault/get.go:40 (0x133a339)
/__w/server/server/secret/vault/vault.go:127 (0x133ed04)
/usr/local/go/src/runtime/iface.go:261 (0x40d30e)
interface conversion: interface {} is nil, not map[string]interface {}
2022/01/04 15:31:52 [Recovery] 2022/01/04 - 15:31:52 panic recovered:

The above stack trace follows the following code path:

https://github.com/go-vela/server/blob/v0.11.0/api/secret.go#L286

->

https://github.com/go-vela/server/blob/v0.11.0/secret/vault/list.go#L63

->

https://github.com/go-vela/server/blob/v0.11.0/secret/vault/get.go#L40

->

https://github.com/go-vela/server/blob/v0.11.0/secret/vault/vault.go#L127

Value

  • improve user experience
  • reduce technical debt

Useful Information

  1. What is the output of vela --version?

v0.11.0

  1. What operating system is being used?

Linux

  1. Any other important details?

N/A

jbrockopp avatar Jan 05 '22 16:01 jbrockopp