Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
15.17k stars 879 forks source link

[ENG-288] `infisical run` with linked secrets having tags fails #1213

Open bohemima opened 10 months ago

bohemima commented 10 months ago

Describe the bug

When you use linked secrets and any of the linked secrets have a tag, running infisical run fails with:

λ infisical run --env=dev --path=/MyFolder token=st.sometoken -l trace -- env
4:46PM DBG Trying to fetch secrets using service token
error: CallGetSecretsV3: Unable to complete api request [err=json: cannot unmarshal string into Go struct field EncryptedSecretV3.imports.secrets.tags of type struct { ID string "json:\"_id\""; Name string "json:\"name\""; Slug string "json:\"slug\""; Workspace string "json:\"workspace\"" }]

Having tags on secrets in the requested folder works like expected. No error is thrown.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Folder "Common"
  2. Create a secret and tag it
  3. Create a Folder "MyFolder"
  4. Link "Common" in to "MyFolder"
  5. Run infisical run --env=dev --path=/MyFolder --token=sometoken -l trace -- env
  6. See error

Expected behavior

No errors and environment variables being printed.

Platform you are having the issue on:

λ sw_vers
ProductName:        macOS
ProductVersion:     14.1.2
BuildVersion:       23B92

 λ infisical -v
infisical version 0.15.0

From SyncLinear.com | ENG-288

MingJen commented 8 months ago

I encounter the same problem when I add tags to the keys in the environment settings, and this issue also occurs with the Kubernetes Operator.