ldhertert / harness-cli

Apache License 2.0
18 stars 14 forks source link

GraphQL API does not respect/support default secret manager #2

Open ldhertert opened 3 years ago

ldhertert commented 3 years ago

https://harness.atlassian.net/browse/SWAT-3402

1) "secretManagerId" is a required field in CreateSecretInput. The expected behavior for me is that this should be an optional field, and if not present, the default secret manager should be used

2) To exacerbate the issue above, the secret manager API does not provide any way to filter/fetch the default secret manager, and there is no property available in the response that indicates whether or not a secret manager is default or not.

edit Additional findings after testing

3) When listing secret managers, “Harness Secret Manager” is not returned. In my account, I do not have any custom secret managers, so the response is an empty list

4) When retrieving a secret manager by name, and specifying “Harness Secret Manager”, I get an error that suggests that there is no secret manager with that name

5) I was able to retrieve the Harness Secret manager id by inspecting an existing secret via the API, but I get an error when trying to fetch this secret manager by id

The only time I’m able to successfully reference the default secret manager is when referencing it by ID in the createSecret mutation